rterm-backend 2.8.1 → 2.8.3

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.
package/bin/gybackend.js CHANGED
@@ -11,10 +11,10 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
11
11
  var __getOwnPropNames = Object.getOwnPropertyNames;
12
12
  var __getProtoOf = Object.getPrototypeOf;
13
13
  var __hasOwnProp = Object.prototype.hasOwnProperty;
14
- var __glob = (map3) => (path31) => {
15
- var fn = map3[path31];
14
+ var __glob = (map3) => (path32) => {
15
+ var fn = map3[path32];
16
16
  if (fn) return fn();
17
- throw new Error("Module not found in bundle: " + path31);
17
+ throw new Error("Module not found in bundle: " + path32);
18
18
  };
19
19
  var __esm = (fn, res) => function __init() {
20
20
  return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
@@ -11810,7 +11810,9 @@ var init_betterSqlite3Runtime = __esm({
11810
11810
  import_node_path3 = __toESM(require("node:path"), 1);
11811
11811
  import_node_module = require("node:module");
11812
11812
  import_meta3 = {};
11813
- require2 = (0, import_node_module.createRequire)(import_meta3.url);
11813
+ require2 = (0, import_node_module.createRequire)(
11814
+ typeof __filename !== "undefined" ? __filename : import_meta3.url
11815
+ );
11814
11816
  NODE_RUNTIME_PACKAGE_NAME = "better-sqlite3";
11815
11817
  ELECTRON_RUNTIME_PACKAGE_NAME = "better-sqlite3-electron";
11816
11818
  cachedConstructor = null;
@@ -28426,8 +28428,8 @@ var require_pdf_worker = __commonJS({
28426
28428
  if (font.data && (isAddToPathSet || this.options.disableFontFace)) {
28427
28429
  var buildPath = function buildPath2(fontChar) {
28428
28430
  if (!font.renderer.hasBuiltPath(fontChar)) {
28429
- var path31 = font.renderer.getPathJs(fontChar);
28430
- _this5.handler.send("commonobj", [font.loadedName + "_path_" + fontChar, "FontPath", path31]);
28431
+ var path32 = font.renderer.getPathJs(fontChar);
28432
+ _this5.handler.send("commonobj", [font.loadedName + "_path_" + fontChar, "FontPath", path32]);
28431
28433
  }
28432
28434
  };
28433
28435
  for (var i = 0, ii = glyphs.length; i < ii; i++) {
@@ -71115,10 +71117,10 @@ var require_pdf = __commonJS({
71115
71117
  ctx.save();
71116
71118
  ctx.beginPath();
71117
71119
  for (var i = 0; i < paths.length; i++) {
71118
- var path31 = paths[i];
71119
- ctx.setTransform.apply(ctx, path31.transform);
71120
- ctx.translate(path31.x, path31.y);
71121
- path31.addToPath(ctx, path31.fontSize);
71120
+ var path32 = paths[i];
71121
+ ctx.setTransform.apply(ctx, path32.transform);
71122
+ ctx.translate(path32.x, path32.y);
71123
+ path32.addToPath(ctx, path32.fontSize);
71122
71124
  }
71123
71125
  ctx.restore();
71124
71126
  ctx.clip();
@@ -73311,8 +73313,8 @@ var require_pdf = __commonJS({
73311
73313
  function PDFNodeStreamFsFullReader2(stream) {
73312
73314
  _classCallCheck(this, PDFNodeStreamFsFullReader2);
73313
73315
  var _this7 = _possibleConstructorReturn(this, (PDFNodeStreamFsFullReader2.__proto__ || Object.getPrototypeOf(PDFNodeStreamFsFullReader2)).call(this, stream));
73314
- var path31 = decodeURI(_this7._url.path);
73315
- fs22.lstat(path31, function(error40, stat) {
73316
+ var path32 = decodeURI(_this7._url.path);
73317
+ fs22.lstat(path32, function(error40, stat) {
73316
73318
  if (error40) {
73317
73319
  _this7._errored = true;
73318
73320
  _this7._reason = error40;
@@ -73320,7 +73322,7 @@ var require_pdf = __commonJS({
73320
73322
  return;
73321
73323
  }
73322
73324
  _this7._contentLength = stat.size;
73323
- _this7._setReadableStream(fs22.createReadStream(path31));
73325
+ _this7._setReadableStream(fs22.createReadStream(path32));
73324
73326
  _this7._headersCapability.resolve();
73325
73327
  });
73326
73328
  return _this7;
@@ -90630,8 +90632,8 @@ var require_pdf_worker2 = __commonJS({
90630
90632
  if (font.data && (isAddToPathSet || this.options.disableFontFace)) {
90631
90633
  var buildPath = function buildPath2(fontChar) {
90632
90634
  if (!font.renderer.hasBuiltPath(fontChar)) {
90633
- var path31 = font.renderer.getPathJs(fontChar);
90634
- _this5.handler.send("commonobj", [font.loadedName + "_path_" + fontChar, "FontPath", path31]);
90635
+ var path32 = font.renderer.getPathJs(fontChar);
90636
+ _this5.handler.send("commonobj", [font.loadedName + "_path_" + fontChar, "FontPath", path32]);
90635
90637
  }
90636
90638
  };
90637
90639
  for (var i = 0, ii = glyphs.length; i < ii; i++) {
@@ -133427,10 +133429,10 @@ var require_pdf2 = __commonJS({
133427
133429
  ctx.save();
133428
133430
  ctx.beginPath();
133429
133431
  for (var i = 0; i < paths.length; i++) {
133430
- var path31 = paths[i];
133431
- ctx.setTransform.apply(ctx, path31.transform);
133432
- ctx.translate(path31.x, path31.y);
133433
- path31.addToPath(ctx, path31.fontSize);
133432
+ var path32 = paths[i];
133433
+ ctx.setTransform.apply(ctx, path32.transform);
133434
+ ctx.translate(path32.x, path32.y);
133435
+ path32.addToPath(ctx, path32.fontSize);
133434
133436
  }
133435
133437
  ctx.restore();
133436
133438
  ctx.clip();
@@ -135147,8 +135149,8 @@ var require_pdf2 = __commonJS({
135147
135149
  function PDFNodeStreamFsFullReader2(stream) {
135148
135150
  _classCallCheck(this, PDFNodeStreamFsFullReader2);
135149
135151
  var _this7 = _possibleConstructorReturn(this, (PDFNodeStreamFsFullReader2.__proto__ || Object.getPrototypeOf(PDFNodeStreamFsFullReader2)).call(this, stream));
135150
- var path31 = decodeURI(_this7._url.path);
135151
- fs22.lstat(path31, function(error40, stat) {
135152
+ var path32 = decodeURI(_this7._url.path);
135153
+ fs22.lstat(path32, function(error40, stat) {
135152
135154
  if (error40) {
135153
135155
  _this7._errored = true;
135154
135156
  _this7._reason = error40;
@@ -135156,7 +135158,7 @@ var require_pdf2 = __commonJS({
135156
135158
  return;
135157
135159
  }
135158
135160
  _this7._contentLength = stat.size;
135159
- _this7._setReadableStream(fs22.createReadStream(path31));
135161
+ _this7._setReadableStream(fs22.createReadStream(path32));
135160
135162
  _this7._headersCapability.resolve();
135161
135163
  });
135162
135164
  return _this7;
@@ -152733,8 +152735,8 @@ var require_pdf_worker3 = __commonJS({
152733
152735
  if (font.data && (isAddToPathSet || this.options.disableFontFace)) {
152734
152736
  var buildPath = function buildPath2(fontChar) {
152735
152737
  if (!font.renderer.hasBuiltPath(fontChar)) {
152736
- var path31 = font.renderer.getPathJs(fontChar);
152737
- _this5.handler.send("commonobj", [font.loadedName + "_path_" + fontChar, "FontPath", path31]);
152738
+ var path32 = font.renderer.getPathJs(fontChar);
152739
+ _this5.handler.send("commonobj", [font.loadedName + "_path_" + fontChar, "FontPath", path32]);
152738
152740
  }
152739
152741
  };
152740
152742
  for (var i = 0, ii = glyphs.length; i < ii; i++) {
@@ -187189,10 +187191,10 @@ var require_pdf3 = __commonJS({
187189
187191
  ctx.save();
187190
187192
  ctx.beginPath();
187191
187193
  for (var i = 0; i < paths.length; i++) {
187192
- var path31 = paths[i];
187193
- ctx.setTransform.apply(ctx, path31.transform);
187194
- ctx.translate(path31.x, path31.y);
187195
- path31.addToPath(ctx, path31.fontSize);
187194
+ var path32 = paths[i];
187195
+ ctx.setTransform.apply(ctx, path32.transform);
187196
+ ctx.translate(path32.x, path32.y);
187197
+ path32.addToPath(ctx, path32.fontSize);
187196
187198
  }
187197
187199
  ctx.restore();
187198
187200
  ctx.clip();
@@ -212587,8 +212589,8 @@ var require_pdf_worker4 = __commonJS({
212587
212589
  if (font.data && (isAddToPathSet || this.options.disableFontFace || state.fillColorSpace.name === "Pattern")) {
212588
212590
  var buildPath = function buildPath2(fontChar) {
212589
212591
  if (!font.renderer.hasBuiltPath(fontChar)) {
212590
- var path31 = font.renderer.getPathJs(fontChar);
212591
- _this5.handler.send("commonobj", [font.loadedName + "_path_" + fontChar, "FontPath", path31]);
212592
+ var path32 = font.renderer.getPathJs(fontChar);
212593
+ _this5.handler.send("commonobj", [font.loadedName + "_path_" + fontChar, "FontPath", path32]);
212592
212594
  }
212593
212595
  };
212594
212596
  for (var i = 0, ii = glyphs.length; i < ii; i++) {
@@ -244552,10 +244554,10 @@ var require_pdf4 = __commonJS({
244552
244554
  ctx.save();
244553
244555
  ctx.beginPath();
244554
244556
  for (var i = 0; i < paths.length; i++) {
244555
- var path31 = paths[i];
244556
- ctx.setTransform.apply(ctx, path31.transform);
244557
- ctx.translate(path31.x, path31.y);
244558
- path31.addToPath(ctx, path31.fontSize);
244557
+ var path32 = paths[i];
244558
+ ctx.setTransform.apply(ctx, path32.transform);
244559
+ ctx.translate(path32.x, path32.y);
244560
+ path32.addToPath(ctx, path32.fontSize);
244559
244561
  }
244560
244562
  ctx.restore();
244561
244563
  ctx.clip();
@@ -250178,11 +250180,11 @@ var require_pdf4 = __commonJS({
250178
250180
  function PDFNodeStreamFsFullReader2(stream) {
250179
250181
  _classCallCheck(this, PDFNodeStreamFsFullReader2);
250180
250182
  var _this7 = _possibleConstructorReturn(this, (PDFNodeStreamFsFullReader2.__proto__ || Object.getPrototypeOf(PDFNodeStreamFsFullReader2)).call(this, stream));
250181
- var path31 = decodeURIComponent(_this7._url.path);
250183
+ var path32 = decodeURIComponent(_this7._url.path);
250182
250184
  if (fileUriRegex.test(_this7._url.href)) {
250183
- path31 = path31.replace(/^\//, "");
250185
+ path32 = path32.replace(/^\//, "");
250184
250186
  }
250185
- fs22.lstat(path31, function(error40, stat) {
250187
+ fs22.lstat(path32, function(error40, stat) {
250186
250188
  if (error40) {
250187
250189
  _this7._errored = true;
250188
250190
  _this7._reason = error40;
@@ -250190,7 +250192,7 @@ var require_pdf4 = __commonJS({
250190
250192
  return;
250191
250193
  }
250192
250194
  _this7._contentLength = stat.size;
250193
- _this7._setReadableStream(fs22.createReadStream(path31));
250195
+ _this7._setReadableStream(fs22.createReadStream(path32));
250194
250196
  _this7._headersCapability.resolve();
250195
250197
  });
250196
250198
  return _this7;
@@ -250202,11 +250204,11 @@ var require_pdf4 = __commonJS({
250202
250204
  function PDFNodeStreamFsRangeReader2(stream, start, end) {
250203
250205
  _classCallCheck(this, PDFNodeStreamFsRangeReader2);
250204
250206
  var _this8 = _possibleConstructorReturn(this, (PDFNodeStreamFsRangeReader2.__proto__ || Object.getPrototypeOf(PDFNodeStreamFsRangeReader2)).call(this, stream));
250205
- var path31 = decodeURIComponent(_this8._url.path);
250207
+ var path32 = decodeURIComponent(_this8._url.path);
250206
250208
  if (fileUriRegex.test(_this8._url.href)) {
250207
- path31 = path31.replace(/^\//, "");
250209
+ path32 = path32.replace(/^\//, "");
250208
250210
  }
250209
- _this8._setReadableStream(fs22.createReadStream(path31, {
250211
+ _this8._setReadableStream(fs22.createReadStream(path32, {
250210
250212
  start,
250211
250213
  end: end - 1
250212
250214
  }));
@@ -259326,8 +259328,8 @@ var require_utils2 = __commonJS({
259326
259328
  }
259327
259329
  return ind;
259328
259330
  }
259329
- function removeDotSegments(path31) {
259330
- let input = path31;
259331
+ function removeDotSegments(path32) {
259332
+ let input = path32;
259331
259333
  const output = [];
259332
259334
  let nextSlash = -1;
259333
259335
  let len = 0;
@@ -259526,8 +259528,8 @@ var require_schemes = __commonJS({
259526
259528
  wsComponent.secure = void 0;
259527
259529
  }
259528
259530
  if (wsComponent.resourceName) {
259529
- const [path31, query] = wsComponent.resourceName.split("?");
259530
- wsComponent.path = path31 && path31 !== "/" ? path31 : void 0;
259531
+ const [path32, query] = wsComponent.resourceName.split("?");
259532
+ wsComponent.path = path32 && path32 !== "/" ? path32 : void 0;
259531
259533
  wsComponent.query = query;
259532
259534
  wsComponent.resourceName = void 0;
259533
259535
  }
@@ -268585,7 +268587,7 @@ var require_windows = __commonJS({
268585
268587
  module2.exports = isexe;
268586
268588
  isexe.sync = sync;
268587
268589
  var fs22 = require("fs");
268588
- function checkPathExt(path31, options) {
268590
+ function checkPathExt(path32, options) {
268589
268591
  var pathext = options.pathExt !== void 0 ? options.pathExt : process.env.PATHEXT;
268590
268592
  if (!pathext) {
268591
268593
  return true;
@@ -268596,25 +268598,25 @@ var require_windows = __commonJS({
268596
268598
  }
268597
268599
  for (var i = 0; i < pathext.length; i++) {
268598
268600
  var p = pathext[i].toLowerCase();
268599
- if (p && path31.substr(-p.length).toLowerCase() === p) {
268601
+ if (p && path32.substr(-p.length).toLowerCase() === p) {
268600
268602
  return true;
268601
268603
  }
268602
268604
  }
268603
268605
  return false;
268604
268606
  }
268605
- function checkStat(stat, path31, options) {
268607
+ function checkStat(stat, path32, options) {
268606
268608
  if (!stat.isSymbolicLink() && !stat.isFile()) {
268607
268609
  return false;
268608
268610
  }
268609
- return checkPathExt(path31, options);
268611
+ return checkPathExt(path32, options);
268610
268612
  }
268611
- function isexe(path31, options, cb) {
268612
- fs22.stat(path31, function(er, stat) {
268613
- cb(er, er ? false : checkStat(stat, path31, options));
268613
+ function isexe(path32, options, cb) {
268614
+ fs22.stat(path32, function(er, stat) {
268615
+ cb(er, er ? false : checkStat(stat, path32, options));
268614
268616
  });
268615
268617
  }
268616
- function sync(path31, options) {
268617
- return checkStat(fs22.statSync(path31), path31, options);
268618
+ function sync(path32, options) {
268619
+ return checkStat(fs22.statSync(path32), path32, options);
268618
268620
  }
268619
268621
  }
268620
268622
  });
@@ -268625,13 +268627,13 @@ var require_mode = __commonJS({
268625
268627
  module2.exports = isexe;
268626
268628
  isexe.sync = sync;
268627
268629
  var fs22 = require("fs");
268628
- function isexe(path31, options, cb) {
268629
- fs22.stat(path31, function(er, stat) {
268630
+ function isexe(path32, options, cb) {
268631
+ fs22.stat(path32, function(er, stat) {
268630
268632
  cb(er, er ? false : checkStat(stat, options));
268631
268633
  });
268632
268634
  }
268633
- function sync(path31, options) {
268634
- return checkStat(fs22.statSync(path31), options);
268635
+ function sync(path32, options) {
268636
+ return checkStat(fs22.statSync(path32), options);
268635
268637
  }
268636
268638
  function checkStat(stat, options) {
268637
268639
  return stat.isFile() && checkMode(stat, options);
@@ -268664,7 +268666,7 @@ var require_isexe = __commonJS({
268664
268666
  }
268665
268667
  module2.exports = isexe;
268666
268668
  isexe.sync = sync;
268667
- function isexe(path31, options, cb) {
268669
+ function isexe(path32, options, cb) {
268668
268670
  if (typeof options === "function") {
268669
268671
  cb = options;
268670
268672
  options = {};
@@ -268674,7 +268676,7 @@ var require_isexe = __commonJS({
268674
268676
  throw new TypeError("callback not provided");
268675
268677
  }
268676
268678
  return new Promise(function(resolve2, reject) {
268677
- isexe(path31, options || {}, function(er, is) {
268679
+ isexe(path32, options || {}, function(er, is) {
268678
268680
  if (er) {
268679
268681
  reject(er);
268680
268682
  } else {
@@ -268683,7 +268685,7 @@ var require_isexe = __commonJS({
268683
268685
  });
268684
268686
  });
268685
268687
  }
268686
- core2(path31, options || {}, function(er, is) {
268688
+ core2(path32, options || {}, function(er, is) {
268687
268689
  if (er) {
268688
268690
  if (er.code === "EACCES" || options && options.ignoreErrors) {
268689
268691
  er = null;
@@ -268693,9 +268695,9 @@ var require_isexe = __commonJS({
268693
268695
  cb(er, is);
268694
268696
  });
268695
268697
  }
268696
- function sync(path31, options) {
268698
+ function sync(path32, options) {
268697
268699
  try {
268698
- return core2.sync(path31, options || {});
268700
+ return core2.sync(path32, options || {});
268699
268701
  } catch (er) {
268700
268702
  if (options && options.ignoreErrors || er.code === "EACCES") {
268701
268703
  return false;
@@ -268711,7 +268713,7 @@ var require_isexe = __commonJS({
268711
268713
  var require_which = __commonJS({
268712
268714
  "../../node_modules/which/which.js"(exports2, module2) {
268713
268715
  var isWindows = process.platform === "win32" || process.env.OSTYPE === "cygwin" || process.env.OSTYPE === "msys";
268714
- var path31 = require("path");
268716
+ var path32 = require("path");
268715
268717
  var COLON = isWindows ? ";" : ":";
268716
268718
  var isexe = require_isexe();
268717
268719
  var getNotFoundError = (cmd) => Object.assign(new Error(`not found: ${cmd}`), { code: "ENOENT" });
@@ -268749,7 +268751,7 @@ var require_which = __commonJS({
268749
268751
  return opt.all && found.length ? resolve2(found) : reject(getNotFoundError(cmd));
268750
268752
  const ppRaw = pathEnv[i];
268751
268753
  const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
268752
- const pCmd = path31.join(pathPart, cmd);
268754
+ const pCmd = path32.join(pathPart, cmd);
268753
268755
  const p = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd;
268754
268756
  resolve2(subStep(p, i, 0));
268755
268757
  });
@@ -268776,7 +268778,7 @@ var require_which = __commonJS({
268776
268778
  for (let i = 0; i < pathEnv.length; i++) {
268777
268779
  const ppRaw = pathEnv[i];
268778
268780
  const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
268779
- const pCmd = path31.join(pathPart, cmd);
268781
+ const pCmd = path32.join(pathPart, cmd);
268780
268782
  const p = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd;
268781
268783
  for (let j = 0; j < pathExt.length; j++) {
268782
268784
  const cur = p + pathExt[j];
@@ -268824,7 +268826,7 @@ var require_path_key = __commonJS({
268824
268826
  var require_resolveCommand = __commonJS({
268825
268827
  "../../node_modules/cross-spawn/lib/util/resolveCommand.js"(exports2, module2) {
268826
268828
  "use strict";
268827
- var path31 = require("path");
268829
+ var path32 = require("path");
268828
268830
  var which = require_which();
268829
268831
  var getPathKey = require_path_key();
268830
268832
  function resolveCommandAttempt(parsed, withoutPathExt) {
@@ -268842,7 +268844,7 @@ var require_resolveCommand = __commonJS({
268842
268844
  try {
268843
268845
  resolved = which.sync(parsed.command, {
268844
268846
  path: env[getPathKey({ env })],
268845
- pathExt: withoutPathExt ? path31.delimiter : void 0
268847
+ pathExt: withoutPathExt ? path32.delimiter : void 0
268846
268848
  });
268847
268849
  } catch (e) {
268848
268850
  } finally {
@@ -268851,7 +268853,7 @@ var require_resolveCommand = __commonJS({
268851
268853
  }
268852
268854
  }
268853
268855
  if (resolved) {
268854
- resolved = path31.resolve(hasCustomCwd ? parsed.options.cwd : "", resolved);
268856
+ resolved = path32.resolve(hasCustomCwd ? parsed.options.cwd : "", resolved);
268855
268857
  }
268856
268858
  return resolved;
268857
268859
  }
@@ -268905,8 +268907,8 @@ var require_shebang_command = __commonJS({
268905
268907
  if (!match) {
268906
268908
  return null;
268907
268909
  }
268908
- const [path31, argument] = match[0].replace(/#! ?/, "").split(" ");
268909
- const binary2 = path31.split("/").pop();
268910
+ const [path32, argument] = match[0].replace(/#! ?/, "").split(" ");
268911
+ const binary2 = path32.split("/").pop();
268910
268912
  if (binary2 === "env") {
268911
268913
  return argument;
268912
268914
  }
@@ -268941,7 +268943,7 @@ var require_readShebang = __commonJS({
268941
268943
  var require_parse2 = __commonJS({
268942
268944
  "../../node_modules/cross-spawn/lib/parse.js"(exports2, module2) {
268943
268945
  "use strict";
268944
- var path31 = require("path");
268946
+ var path32 = require("path");
268945
268947
  var resolveCommand = require_resolveCommand();
268946
268948
  var escape2 = require_escape();
268947
268949
  var readShebang = require_readShebang();
@@ -268966,7 +268968,7 @@ var require_parse2 = __commonJS({
268966
268968
  const needsShell = !isExecutableRegExp.test(commandFile);
268967
268969
  if (parsed.options.forceShell || needsShell) {
268968
268970
  const needsDoubleEscapeMetaChars = isCmdShimRegExp.test(commandFile);
268969
- parsed.command = path31.normalize(parsed.command);
268971
+ parsed.command = path32.normalize(parsed.command);
268970
268972
  parsed.command = escape2.command(parsed.command);
268971
268973
  parsed.args = parsed.args.map((arg) => escape2.argument(arg, needsDoubleEscapeMetaChars));
268972
268974
  const shellCommand = [parsed.command].concat(parsed.args).join(" ");
@@ -269056,7 +269058,7 @@ var require_cross_spawn = __commonJS({
269056
269058
  var cp = require("child_process");
269057
269059
  var parse8 = require_parse2();
269058
269060
  var enoent = require_enoent();
269059
- function spawn4(command, args, options) {
269061
+ function spawn3(command, args, options) {
269060
269062
  const parsed = parse8(command, args, options);
269061
269063
  const spawned = cp.spawn(parsed.command, parsed.args, parsed.options);
269062
269064
  enoent.hookChildProcess(spawned, parsed);
@@ -269068,8 +269070,8 @@ var require_cross_spawn = __commonJS({
269068
269070
  result.error = result.error || enoent.verifyENOENTSync(result.status, parsed);
269069
269071
  return result;
269070
269072
  }
269071
- module2.exports = spawn4;
269072
- module2.exports.spawn = spawn4;
269073
+ module2.exports = spawn3;
269074
+ module2.exports.spawn = spawn3;
269073
269075
  module2.exports.sync = spawnSync;
269074
269076
  module2.exports._parse = parse8;
269075
269077
  module2.exports._enoent = enoent;
@@ -278590,7 +278592,7 @@ var require_ws_transport = __commonJS({
278590
278592
  let protocol;
278591
278593
  let port;
278592
278594
  const host = url2.hostname;
278593
- const path31 = url2.pathname;
278595
+ const path32 = url2.pathname;
278594
278596
  const search = url2.search || "";
278595
278597
  switch (srcProto) {
278596
278598
  case "http:":
@@ -278610,7 +278612,7 @@ var require_ws_transport = __commonJS({
278610
278612
  protocol = encrypted === true ? "wss:" : "ws:";
278611
278613
  break;
278612
278614
  }
278613
- return `${protocol}//${host}:${port}${path31}${search}`;
278615
+ return `${protocol}//${host}:${port}${path32}${search}`;
278614
278616
  }
278615
278617
  function wsconnect(opts = {}) {
278616
278618
  (0, transport_1.setTransportFactory)({
@@ -279613,7 +279615,7 @@ var init_natsEventBus = __esm({
279613
279615
  });
279614
279616
 
279615
279617
  // ../../packages/backend/src/runtimes/gybackend/startGyBackend.ts
279616
- var import_node_path27 = __toESM(require("node:path"), 1);
279618
+ var import_node_path28 = __toESM(require("node:path"), 1);
279617
279619
  var import_node_process2 = __toESM(require("node:process"), 1);
279618
279620
 
279619
279621
  // ../../packages/backend/src/services/TerminalService.ts
@@ -279627,7 +279629,6 @@ var isSshConnectionConfig = (config2) => config2.type === "ssh";
279627
279629
  var isTerminalFileSystemBackend = (backend) => typeof backend.readFile === "function" && typeof backend.writeFile === "function" && typeof backend.readFileChunk === "function" && typeof backend.writeFileChunk === "function" && typeof backend.statFile === "function" && typeof backend.listDirectory === "function" && typeof backend.createDirectory === "function" && typeof backend.createFile === "function" && typeof backend.deletePath === "function" && typeof backend.renamePath === "function" && typeof backend.writeFileBytes === "function";
279628
279630
 
279629
279631
  // ../../packages/backend/src/services/NodePtyBackend.ts
279630
- var pty = __toESM(require("node-pty"), 1);
279631
279632
  var os = __toESM(require("os"), 1);
279632
279633
  var fs = __toESM(require("fs"), 1);
279633
279634
  var path = __toESM(require("path"), 1);
@@ -279722,6 +279723,16 @@ var parseWindowsPromptMarkerLine = (line) => {
279722
279723
  };
279723
279724
 
279724
279725
  // ../../packages/backend/src/services/NodePtyBackend.ts
279726
+ var pty = null;
279727
+ function loadPty() {
279728
+ if (pty) return pty;
279729
+ try {
279730
+ pty = require("node-pty");
279731
+ return pty;
279732
+ } catch (e) {
279733
+ throw new Error(`node-pty is not available in this build (local PTY terminals are unavailable; SSH/WinRM/serial terminals still work): ${e instanceof Error ? e.message : String(e)}`);
279734
+ }
279735
+ }
279725
279736
  var execFileAsync = (0, import_util.promisify)(import_child_process.execFile);
279726
279737
  var GYSHELL_READY_MARKER = "__GYSHELL_READY__";
279727
279738
  var NodePtyBackend = class {
@@ -280057,7 +280068,7 @@ var NodePtyBackend = class {
280057
280068
  commandOutputPath
280058
280069
  } = this.buildShellIntegration(shell2);
280059
280070
  const mergedEnv = { ...env, ...localeEnv, ...envOverrides };
280060
- const ptyProcess = pty.spawn(shell2, args, {
280071
+ const ptyProcess = loadPty().spawn(shell2, args, {
280061
280072
  name: "xterm-256color",
280062
280073
  cols: config2.cols || 80,
280063
280074
  rows: config2.rows || 24,
@@ -280578,7 +280589,6 @@ add-zsh-hook precmd gyshell_precmd
280578
280589
  };
280579
280590
 
280580
280591
  // ../../packages/backend/src/services/SSHBackend.ts
280581
- var ssh2 = __toESM(require("ssh2"), 1);
280582
280592
  var fs2 = __toESM(require("fs"), 1);
280583
280593
  var net = __toESM(require("net"), 1);
280584
280594
  var import_node_path = require("node:path");
@@ -280715,6 +280725,16 @@ var DEFAULT_SFTP_TRANSFER_PROFILES = [
280715
280725
  ];
280716
280726
 
280717
280727
  // ../../packages/backend/src/services/SSHBackend.ts
280728
+ var ssh2 = null;
280729
+ function loadSsh2() {
280730
+ if (ssh2) return ssh2;
280731
+ try {
280732
+ ssh2 = require("ssh2");
280733
+ return ssh2;
280734
+ } catch (e) {
280735
+ throw new Error(`ssh2 is not available in this build (SSH terminals are unavailable; WinRM/serial/local terminals still work): ${e instanceof Error ? e.message : String(e)}`);
280736
+ }
280737
+ }
280718
280738
  var GYSHELL_READY_MARKER2 = "__GYSHELL_READY__";
280719
280739
  var SSH_CONNECT_READY_TIMEOUT_MS = 2e4;
280720
280740
  var SSH_KEEPALIVE_INTERVAL_MS = 3e4;
@@ -281529,7 +281549,7 @@ var SSHBackend = class _SSHBackend {
281529
281549
  `\x1B[36m\u25B9 ${jumpId} Establishing tunnel via jump host ${sshConfig.jumpHost.host}...\x1B[0m\r
281530
281550
  `
281531
281551
  );
281532
- const jumpClient = new ssh2.Client();
281552
+ const jumpClient = new (loadSsh2()).Client();
281533
281553
  const jumpSock = await this.buildConnectSocketIfNeeded(
281534
281554
  sshConfig.jumpHost,
281535
281555
  emit9
@@ -281873,7 +281893,7 @@ var SSHBackend = class _SSHBackend {
281873
281893
  throw new Error("SSHBackend only supports ssh connections");
281874
281894
  }
281875
281895
  const sshConfig = config2;
281876
- const client2 = new ssh2.Client();
281896
+ const client2 = new (loadSsh2()).Client();
281877
281897
  const instance = {
281878
281898
  client: client2,
281879
281899
  sshConfig,
@@ -292285,8 +292305,8 @@ function shallowCopy(obj) {
292285
292305
  }
292286
292306
  function replaceSecrets(root, secretsMap) {
292287
292307
  const result = shallowCopy(root);
292288
- for (const [path31, secretId] of Object.entries(secretsMap)) {
292289
- const [last, ...partsReverse] = path31.split(".").reverse();
292308
+ for (const [path32, secretId] of Object.entries(secretsMap)) {
292309
+ const [last, ...partsReverse] = path32.split(".").reverse();
292290
292310
  let current = result;
292291
292311
  for (const part of partsReverse.reverse()) {
292292
292312
  if (current[part] === void 0) break;
@@ -297041,7 +297061,7 @@ var AutoBatchQueue = class {
297041
297061
  ];
297042
297062
  }
297043
297063
  };
297044
- var Client2 = class _Client {
297064
+ var Client = class _Client {
297045
297065
  get _fetch() {
297046
297066
  return this.fetchImplementation || _getFetchImplementation(this.debug);
297047
297067
  }
@@ -297350,9 +297370,9 @@ var Client2 = class _Client {
297350
297370
  }
297351
297371
  return headers;
297352
297372
  }
297353
- _getPlatformEndpointPath(path31) {
297373
+ _getPlatformEndpointPath(path32) {
297354
297374
  const needsV1Prefix = this.apiUrl.slice(-3) !== "/v1" && this.apiUrl.slice(-4) !== "/v1/";
297355
- return needsV1Prefix ? `/v1/platform/${path31}` : `/platform/${path31}`;
297375
+ return needsV1Prefix ? `/v1/platform/${path32}` : `/platform/${path32}`;
297356
297376
  }
297357
297377
  async processInputs(inputs) {
297358
297378
  if (this.hideInputs === false) {
@@ -297388,9 +297408,9 @@ var Client2 = class _Client {
297388
297408
  }
297389
297409
  return runParams;
297390
297410
  }
297391
- async _getResponse(path31, queryParams) {
297411
+ async _getResponse(path32, queryParams) {
297392
297412
  const paramsString = queryParams?.toString() ?? "";
297393
- const url2 = `${this.apiUrl}${path31}?${paramsString}`;
297413
+ const url2 = `${this.apiUrl}${path32}?${paramsString}`;
297394
297414
  const response = await this.caller.call(async () => {
297395
297415
  const res = await this._fetch(url2, {
297396
297416
  method: "GET",
@@ -297398,22 +297418,22 @@ var Client2 = class _Client {
297398
297418
  signal: AbortSignal.timeout(this.timeout_ms),
297399
297419
  ...this.fetchOptions
297400
297420
  });
297401
- await raiseForStatus(res, `fetch ${path31}`);
297421
+ await raiseForStatus(res, `fetch ${path32}`);
297402
297422
  return res;
297403
297423
  });
297404
297424
  return response;
297405
297425
  }
297406
- async _get(path31, queryParams) {
297407
- const response = await this._getResponse(path31, queryParams);
297426
+ async _get(path32, queryParams) {
297427
+ const response = await this._getResponse(path32, queryParams);
297408
297428
  return response.json();
297409
297429
  }
297410
- async *_getPaginated(path31, queryParams = new URLSearchParams(), transform2) {
297430
+ async *_getPaginated(path32, queryParams = new URLSearchParams(), transform2) {
297411
297431
  let offset = Number(queryParams.get("offset")) || 0;
297412
297432
  const limit2 = Number(queryParams.get("limit")) || 100;
297413
297433
  while (true) {
297414
297434
  queryParams.set("offset", String(offset));
297415
297435
  queryParams.set("limit", String(limit2));
297416
- const url2 = `${this.apiUrl}${path31}?${queryParams}`;
297436
+ const url2 = `${this.apiUrl}${path32}?${queryParams}`;
297417
297437
  const response = await this.caller.call(async () => {
297418
297438
  const res = await this._fetch(url2, {
297419
297439
  method: "GET",
@@ -297421,7 +297441,7 @@ var Client2 = class _Client {
297421
297441
  signal: AbortSignal.timeout(this.timeout_ms),
297422
297442
  ...this.fetchOptions
297423
297443
  });
297424
- await raiseForStatus(res, `fetch ${path31}`);
297444
+ await raiseForStatus(res, `fetch ${path32}`);
297425
297445
  return res;
297426
297446
  });
297427
297447
  const items = transform2 ? transform2(await response.json()) : await response.json();
@@ -297435,19 +297455,19 @@ var Client2 = class _Client {
297435
297455
  offset += items.length;
297436
297456
  }
297437
297457
  }
297438
- async *_getCursorPaginatedList(path31, body = null, requestMethod = "POST", dataKey = "runs") {
297458
+ async *_getCursorPaginatedList(path32, body = null, requestMethod = "POST", dataKey = "runs") {
297439
297459
  const bodyParams = body ? { ...body } : {};
297440
297460
  while (true) {
297441
297461
  const body2 = JSON.stringify(bodyParams);
297442
297462
  const response = await this.caller.call(async () => {
297443
- const res = await this._fetch(`${this.apiUrl}${path31}`, {
297463
+ const res = await this._fetch(`${this.apiUrl}${path32}`, {
297444
297464
  method: requestMethod,
297445
297465
  headers: { ...this.headers, "Content-Type": "application/json" },
297446
297466
  signal: AbortSignal.timeout(this.timeout_ms),
297447
297467
  ...this.fetchOptions,
297448
297468
  body: body2
297449
297469
  });
297450
- await raiseForStatus(res, `fetch ${path31}`);
297470
+ await raiseForStatus(res, `fetch ${path32}`);
297451
297471
  return res;
297452
297472
  });
297453
297473
  const responseBody = await response.json();
@@ -298376,8 +298396,8 @@ Context: ${context2}`);
298376
298396
  limit: Number(limit2) || 100
298377
298397
  };
298378
298398
  let currentOffset = Number(offset) || 0;
298379
- const path31 = "/runs/group";
298380
- const url2 = `${this.apiUrl}${path31}`;
298399
+ const path32 = "/runs/group";
298400
+ const url2 = `${this.apiUrl}${path32}`;
298381
298401
  while (true) {
298382
298402
  const currentBody = {
298383
298403
  ...baseBody,
@@ -298393,7 +298413,7 @@ Context: ${context2}`);
298393
298413
  ...this.fetchOptions,
298394
298414
  body
298395
298415
  });
298396
- await raiseForStatus(res, `Failed to fetch ${path31}`);
298416
+ await raiseForStatus(res, `Failed to fetch ${path32}`);
298397
298417
  return res;
298398
298418
  });
298399
298419
  const items = await response.json();
@@ -298710,20 +298730,20 @@ Message: ${Array.isArray(result.detail) ? result.detail.join("\n") : "Unspecifie
298710
298730
  return result;
298711
298731
  }
298712
298732
  async hasProject({ projectId, projectName }) {
298713
- let path31 = "/sessions";
298733
+ let path32 = "/sessions";
298714
298734
  const params = new URLSearchParams();
298715
298735
  if (projectId !== void 0 && projectName !== void 0) {
298716
298736
  throw new Error("Must provide either projectName or projectId, not both");
298717
298737
  } else if (projectId !== void 0) {
298718
298738
  assertUuid(projectId);
298719
- path31 += `/${projectId}`;
298739
+ path32 += `/${projectId}`;
298720
298740
  } else if (projectName !== void 0) {
298721
298741
  params.append("name", projectName);
298722
298742
  } else {
298723
298743
  throw new Error("Must provide projectName or projectId");
298724
298744
  }
298725
298745
  const response = await this.caller.call(async () => {
298726
- const res = await this._fetch(`${this.apiUrl}${path31}?${params}`, {
298746
+ const res = await this._fetch(`${this.apiUrl}${path32}?${params}`, {
298727
298747
  method: "GET",
298728
298748
  headers: this.headers,
298729
298749
  signal: AbortSignal.timeout(this.timeout_ms),
@@ -298746,13 +298766,13 @@ Message: ${Array.isArray(result.detail) ? result.detail.join("\n") : "Unspecifie
298746
298766
  }
298747
298767
  }
298748
298768
  async readProject({ projectId, projectName, includeStats }) {
298749
- let path31 = "/sessions";
298769
+ let path32 = "/sessions";
298750
298770
  const params = new URLSearchParams();
298751
298771
  if (projectId !== void 0 && projectName !== void 0) {
298752
298772
  throw new Error("Must provide either projectName or projectId, not both");
298753
298773
  } else if (projectId !== void 0) {
298754
298774
  assertUuid(projectId);
298755
- path31 += `/${projectId}`;
298775
+ path32 += `/${projectId}`;
298756
298776
  } else if (projectName !== void 0) {
298757
298777
  params.append("name", projectName);
298758
298778
  } else {
@@ -298761,7 +298781,7 @@ Message: ${Array.isArray(result.detail) ? result.detail.join("\n") : "Unspecifie
298761
298781
  if (includeStats !== void 0) {
298762
298782
  params.append("include_stats", includeStats.toString());
298763
298783
  }
298764
- const response = await this._get(path31, params);
298784
+ const response = await this._get(path32, params);
298765
298785
  let result;
298766
298786
  if (Array.isArray(response)) {
298767
298787
  if (response.length === 0) {
@@ -298924,19 +298944,19 @@ Message: ${Array.isArray(result.detail) ? result.detail.join("\n") : "Unspecifie
298924
298944
  return result;
298925
298945
  }
298926
298946
  async readDataset({ datasetId, datasetName }) {
298927
- let path31 = "/datasets";
298947
+ let path32 = "/datasets";
298928
298948
  const params = new URLSearchParams({ limit: "1" });
298929
298949
  if (datasetId && datasetName) {
298930
298950
  throw new Error("Must provide either datasetName or datasetId, not both");
298931
298951
  } else if (datasetId) {
298932
298952
  assertUuid(datasetId);
298933
- path31 += `/${datasetId}`;
298953
+ path32 += `/${datasetId}`;
298934
298954
  } else if (datasetName) {
298935
298955
  params.append("name", datasetName);
298936
298956
  } else {
298937
298957
  throw new Error("Must provide datasetName or datasetId");
298938
298958
  }
298939
- const response = await this._get(path31, params);
298959
+ const response = await this._get(path32, params);
298940
298960
  let result;
298941
298961
  if (Array.isArray(response)) {
298942
298962
  if (response.length === 0) {
@@ -298980,20 +299000,20 @@ Message: ${Array.isArray(result.detail) ? result.detail.join("\n") : "Unspecifie
298980
299000
  return response;
298981
299001
  }
298982
299002
  async readDatasetOpenaiFinetuning({ datasetId, datasetName }) {
298983
- const path31 = "/datasets";
299003
+ const path32 = "/datasets";
298984
299004
  if (datasetId !== void 0) {
298985
299005
  } else if (datasetName !== void 0) {
298986
299006
  datasetId = (await this.readDataset({ datasetName })).id;
298987
299007
  } else {
298988
299008
  throw new Error("Must provide either datasetName or datasetId");
298989
299009
  }
298990
- const response = await this._getResponse(`${path31}/${datasetId}/openai_ft`);
299010
+ const response = await this._getResponse(`${path32}/${datasetId}/openai_ft`);
298991
299011
  const datasetText = await response.text();
298992
299012
  const dataset = datasetText.trim().split("\n").map((line) => JSON.parse(line));
298993
299013
  return dataset;
298994
299014
  }
298995
299015
  async *listDatasets({ limit: limit2 = 100, offset = 0, datasetIds, datasetName, datasetNameContains, metadata } = {}) {
298996
- const path31 = "/datasets";
299016
+ const path32 = "/datasets";
298997
299017
  const params = new URLSearchParams({
298998
299018
  limit: limit2.toString(),
298999
299019
  offset: offset.toString()
@@ -299012,7 +299032,7 @@ Message: ${Array.isArray(result.detail) ? result.detail.join("\n") : "Unspecifie
299012
299032
  if (metadata !== void 0) {
299013
299033
  params.append("metadata", JSON.stringify(metadata));
299014
299034
  }
299015
- for await (const datasets of this._getPaginated(path31, params)) {
299035
+ for await (const datasets of this._getPaginated(path32, params)) {
299016
299036
  yield* datasets;
299017
299037
  }
299018
299038
  }
@@ -299081,7 +299101,7 @@ Message: ${Array.isArray(result.detail) ? result.detail.join("\n") : "Unspecifie
299081
299101
  });
299082
299102
  }
299083
299103
  async deleteDataset({ datasetId, datasetName }) {
299084
- let path31 = "/datasets";
299104
+ let path32 = "/datasets";
299085
299105
  let datasetId_ = datasetId;
299086
299106
  if (datasetId !== void 0 && datasetName !== void 0) {
299087
299107
  throw new Error("Must provide either datasetName or datasetId, not both");
@@ -299091,18 +299111,18 @@ Message: ${Array.isArray(result.detail) ? result.detail.join("\n") : "Unspecifie
299091
299111
  }
299092
299112
  if (datasetId_ !== void 0) {
299093
299113
  assertUuid(datasetId_);
299094
- path31 += `/${datasetId_}`;
299114
+ path32 += `/${datasetId_}`;
299095
299115
  } else {
299096
299116
  throw new Error("Must provide datasetName or datasetId");
299097
299117
  }
299098
299118
  await this.caller.call(async () => {
299099
- const res = await this._fetch(this.apiUrl + path31, {
299119
+ const res = await this._fetch(this.apiUrl + path32, {
299100
299120
  method: "DELETE",
299101
299121
  headers: this.headers,
299102
299122
  signal: AbortSignal.timeout(this.timeout_ms),
299103
299123
  ...this.fetchOptions
299104
299124
  });
299105
- await raiseForStatus(res, `delete ${path31}`, true);
299125
+ await raiseForStatus(res, `delete ${path32}`, true);
299106
299126
  return res;
299107
299127
  });
299108
299128
  }
@@ -299293,8 +299313,8 @@ Message: ${Array.isArray(result.detail) ? result.detail.join("\n") : "Unspecifie
299293
299313
  }
299294
299314
  async readExample(exampleId) {
299295
299315
  assertUuid(exampleId);
299296
- const path31 = `/examples/${exampleId}`;
299297
- const rawExample = await this._get(path31);
299316
+ const path32 = `/examples/${exampleId}`;
299317
+ const rawExample = await this._get(path32);
299298
299318
  const { attachment_urls, ...rest } = rawExample;
299299
299319
  const example = rest;
299300
299320
  if (attachment_urls) {
@@ -299377,15 +299397,15 @@ Message: ${Array.isArray(result.detail) ? result.detail.join("\n") : "Unspecifie
299377
299397
  }
299378
299398
  async deleteExample(exampleId) {
299379
299399
  assertUuid(exampleId);
299380
- const path31 = `/examples/${exampleId}`;
299400
+ const path32 = `/examples/${exampleId}`;
299381
299401
  await this.caller.call(async () => {
299382
- const res = await this._fetch(this.apiUrl + path31, {
299402
+ const res = await this._fetch(this.apiUrl + path32, {
299383
299403
  method: "DELETE",
299384
299404
  headers: this.headers,
299385
299405
  signal: AbortSignal.timeout(this.timeout_ms),
299386
299406
  ...this.fetchOptions
299387
299407
  });
299388
- await raiseForStatus(res, `delete ${path31}`, true);
299408
+ await raiseForStatus(res, `delete ${path32}`, true);
299389
299409
  return res;
299390
299410
  });
299391
299411
  }
@@ -299398,9 +299418,9 @@ Message: ${Array.isArray(result.detail) ? result.detail.join("\n") : "Unspecifie
299398
299418
  async deleteExamples(exampleIds, options) {
299399
299419
  exampleIds.forEach((id) => assertUuid(id));
299400
299420
  if (options?.hardDelete) {
299401
- const path31 = this._getPlatformEndpointPath("datasets/examples/delete");
299421
+ const path32 = this._getPlatformEndpointPath("datasets/examples/delete");
299402
299422
  await this.caller.call(async () => {
299403
- const res = await this._fetch(`${this.apiUrl}${path31}`, {
299423
+ const res = await this._fetch(`${this.apiUrl}${path32}`, {
299404
299424
  method: "POST",
299405
299425
  headers: { ...this.headers, "Content-Type": "application/json" },
299406
299426
  body: JSON.stringify({
@@ -299634,21 +299654,21 @@ Message: ${Array.isArray(result.detail) ? result.detail.join("\n") : "Unspecifie
299634
299654
  }
299635
299655
  async readFeedback(feedbackId) {
299636
299656
  assertUuid(feedbackId);
299637
- const path31 = `/feedback/${feedbackId}`;
299638
- const response = await this._get(path31);
299657
+ const path32 = `/feedback/${feedbackId}`;
299658
+ const response = await this._get(path32);
299639
299659
  return response;
299640
299660
  }
299641
299661
  async deleteFeedback(feedbackId) {
299642
299662
  assertUuid(feedbackId);
299643
- const path31 = `/feedback/${feedbackId}`;
299663
+ const path32 = `/feedback/${feedbackId}`;
299644
299664
  await this.caller.call(async () => {
299645
- const res = await this._fetch(this.apiUrl + path31, {
299665
+ const res = await this._fetch(this.apiUrl + path32, {
299646
299666
  method: "DELETE",
299647
299667
  headers: this.headers,
299648
299668
  signal: AbortSignal.timeout(this.timeout_ms),
299649
299669
  ...this.fetchOptions
299650
299670
  });
299651
- await raiseForStatus(res, `delete ${path31}`, true);
299671
+ await raiseForStatus(res, `delete ${path32}`, true);
299652
299672
  return res;
299653
299673
  });
299654
299674
  }
@@ -300962,7 +300982,7 @@ var RunTree = class _RunTree {
300962
300982
  }
300963
300983
  static getSharedClient() {
300964
300984
  if (!_RunTree.sharedClient) {
300965
- _RunTree.sharedClient = new Client2();
300985
+ _RunTree.sharedClient = new Client();
300966
300986
  }
300967
300987
  return _RunTree.sharedClient;
300968
300988
  }
@@ -302142,7 +302162,7 @@ var client;
302142
302162
  var getDefaultLangChainClientSingleton = () => {
302143
302163
  if (client === void 0) {
302144
302164
  const clientParams = getEnvironmentVariable("LANGCHAIN_CALLBACKS_BACKGROUND") === "false" ? { blockOnRootRunFinalization: true } : {};
302145
- client = new Client2(clientParams);
302165
+ client = new Client(clientParams);
302146
302166
  }
302147
302167
  return client;
302148
302168
  };
@@ -303244,12 +303264,12 @@ function isInteger(str3) {
303244
303264
  }
303245
303265
  return true;
303246
303266
  }
303247
- function escapePathComponent(path31) {
303248
- if (path31.indexOf("/") === -1 && path31.indexOf("~") === -1) return path31;
303249
- return path31.replace(/~/g, "~0").replace(/\//g, "~1");
303267
+ function escapePathComponent(path32) {
303268
+ if (path32.indexOf("/") === -1 && path32.indexOf("~") === -1) return path32;
303269
+ return path32.replace(/~/g, "~0").replace(/\//g, "~1");
303250
303270
  }
303251
- function unescapePathComponent(path31) {
303252
- return path31.replace(/~1/g, "/").replace(/~0/g, "~");
303271
+ function unescapePathComponent(path32) {
303272
+ return path32.replace(/~1/g, "/").replace(/~0/g, "~");
303253
303273
  }
303254
303274
  function hasUndefined(obj) {
303255
303275
  if (obj === void 0) return true;
@@ -303443,8 +303463,8 @@ function applyOperation(document2, operation, validateOperation = false, mutateD
303443
303463
  else return returnValue;
303444
303464
  } else {
303445
303465
  if (!mutateDocument) document2 = _deepClone(document2);
303446
- const path31 = operation.path || "";
303447
- const keys = path31.split("/");
303466
+ const path32 = operation.path || "";
303467
+ const keys = path32.split("/");
303448
303468
  let obj = document2;
303449
303469
  let t = 1;
303450
303470
  let len = keys.length;
@@ -303567,7 +303587,7 @@ function _areEquals(a, b) {
303567
303587
  }
303568
303588
 
303569
303589
  // ../../node_modules/@langchain/core/dist/utils/fast-json-patch/src/duplex.js
303570
- function _generate(mirror, obj, patches, path31, invertible) {
303590
+ function _generate(mirror, obj, patches, path32, invertible) {
303571
303591
  if (obj === mirror) return;
303572
303592
  if (typeof obj.toJSON === "function") obj = obj.toJSON();
303573
303593
  var newKeys = _objectKeys(obj);
@@ -303579,40 +303599,40 @@ function _generate(mirror, obj, patches, path31, invertible) {
303579
303599
  var oldVal = mirror[key];
303580
303600
  if (hasOwnProperty(obj, key) && !(obj[key] === void 0 && oldVal !== void 0 && Array.isArray(obj) === false)) {
303581
303601
  var newVal = obj[key];
303582
- if (typeof oldVal == "object" && oldVal != null && typeof newVal == "object" && newVal != null && Array.isArray(oldVal) === Array.isArray(newVal)) _generate(oldVal, newVal, patches, path31 + "/" + escapePathComponent(key), invertible);
303602
+ if (typeof oldVal == "object" && oldVal != null && typeof newVal == "object" && newVal != null && Array.isArray(oldVal) === Array.isArray(newVal)) _generate(oldVal, newVal, patches, path32 + "/" + escapePathComponent(key), invertible);
303583
303603
  else if (oldVal !== newVal) {
303584
303604
  changed = true;
303585
303605
  if (invertible) patches.push({
303586
303606
  op: "test",
303587
- path: path31 + "/" + escapePathComponent(key),
303607
+ path: path32 + "/" + escapePathComponent(key),
303588
303608
  value: _deepClone(oldVal)
303589
303609
  });
303590
303610
  patches.push({
303591
303611
  op: "replace",
303592
- path: path31 + "/" + escapePathComponent(key),
303612
+ path: path32 + "/" + escapePathComponent(key),
303593
303613
  value: _deepClone(newVal)
303594
303614
  });
303595
303615
  }
303596
303616
  } else if (Array.isArray(mirror) === Array.isArray(obj)) {
303597
303617
  if (invertible) patches.push({
303598
303618
  op: "test",
303599
- path: path31 + "/" + escapePathComponent(key),
303619
+ path: path32 + "/" + escapePathComponent(key),
303600
303620
  value: _deepClone(oldVal)
303601
303621
  });
303602
303622
  patches.push({
303603
303623
  op: "remove",
303604
- path: path31 + "/" + escapePathComponent(key)
303624
+ path: path32 + "/" + escapePathComponent(key)
303605
303625
  });
303606
303626
  deleted = true;
303607
303627
  } else {
303608
303628
  if (invertible) patches.push({
303609
303629
  op: "test",
303610
- path: path31,
303630
+ path: path32,
303611
303631
  value: mirror
303612
303632
  });
303613
303633
  patches.push({
303614
303634
  op: "replace",
303615
- path: path31,
303635
+ path: path32,
303616
303636
  value: obj
303617
303637
  });
303618
303638
  changed = true;
@@ -303623,7 +303643,7 @@ function _generate(mirror, obj, patches, path31, invertible) {
303623
303643
  var key = newKeys[t];
303624
303644
  if (!hasOwnProperty(mirror, key) && obj[key] !== void 0) patches.push({
303625
303645
  op: "add",
303626
- path: path31 + "/" + escapePathComponent(key),
303646
+ path: path32 + "/" + escapePathComponent(key),
303627
303647
  value: _deepClone(obj[key])
303628
303648
  });
303629
303649
  }
@@ -305009,10 +305029,10 @@ function assignProp(target, prop, value) {
305009
305029
  configurable: true
305010
305030
  });
305011
305031
  }
305012
- function getElementAtPath(obj, path31) {
305013
- if (!path31)
305032
+ function getElementAtPath(obj, path32) {
305033
+ if (!path32)
305014
305034
  return obj;
305015
- return path31.reduce((acc, key) => acc?.[key], obj);
305035
+ return path32.reduce((acc, key) => acc?.[key], obj);
305016
305036
  }
305017
305037
  function promiseAllObject(promisesObj) {
305018
305038
  const keys = Object.keys(promisesObj);
@@ -305332,11 +305352,11 @@ function aborted(x, startIndex = 0) {
305332
305352
  }
305333
305353
  return false;
305334
305354
  }
305335
- function prefixIssues(path31, issues) {
305355
+ function prefixIssues(path32, issues) {
305336
305356
  return issues.map((iss) => {
305337
305357
  var _a3;
305338
305358
  (_a3 = iss).path ?? (_a3.path = []);
305339
- iss.path.unshift(path31);
305359
+ iss.path.unshift(path32);
305340
305360
  return iss;
305341
305361
  });
305342
305362
  }
@@ -305473,7 +305493,7 @@ function treeifyError(error40, _mapper) {
305473
305493
  return issue2.message;
305474
305494
  };
305475
305495
  const result = { errors: [] };
305476
- const processError = (error41, path31 = []) => {
305496
+ const processError = (error41, path32 = []) => {
305477
305497
  var _a3, _b;
305478
305498
  for (const issue2 of error41.issues) {
305479
305499
  if (issue2.code === "invalid_union" && issue2.errors.length) {
@@ -305483,7 +305503,7 @@ function treeifyError(error40, _mapper) {
305483
305503
  } else if (issue2.code === "invalid_element") {
305484
305504
  processError({ issues: issue2.issues }, issue2.path);
305485
305505
  } else {
305486
- const fullpath = [...path31, ...issue2.path];
305506
+ const fullpath = [...path32, ...issue2.path];
305487
305507
  if (fullpath.length === 0) {
305488
305508
  result.errors.push(mapper(issue2));
305489
305509
  continue;
@@ -305513,9 +305533,9 @@ function treeifyError(error40, _mapper) {
305513
305533
  processError(error40);
305514
305534
  return result;
305515
305535
  }
305516
- function toDotPath(path31) {
305536
+ function toDotPath(path32) {
305517
305537
  const segs = [];
305518
- for (const seg of path31) {
305538
+ for (const seg of path32) {
305519
305539
  if (typeof seg === "number")
305520
305540
  segs.push(`[${seg}]`);
305521
305541
  else if (typeof seg === "symbol")
@@ -315418,8 +315438,8 @@ function getErrorMap() {
315418
315438
 
315419
315439
  // ../../node_modules/zod/v3/helpers/parseUtil.js
315420
315440
  var makeIssue = (params) => {
315421
- const { data, path: path31, errorMaps, issueData } = params;
315422
- const fullPath = [...path31, ...issueData.path || []];
315441
+ const { data, path: path32, errorMaps, issueData } = params;
315442
+ const fullPath = [...path32, ...issueData.path || []];
315423
315443
  const fullIssue = {
315424
315444
  ...issueData,
315425
315445
  path: fullPath
@@ -315535,11 +315555,11 @@ var errorUtil;
315535
315555
 
315536
315556
  // ../../node_modules/zod/v3/types.js
315537
315557
  var ParseInputLazyPath = class {
315538
- constructor(parent, value, path31, key) {
315558
+ constructor(parent, value, path32, key) {
315539
315559
  this._cachedPath = [];
315540
315560
  this.parent = parent;
315541
315561
  this.data = value;
315542
- this._path = path31;
315562
+ this._path = path32;
315543
315563
  this._key = key;
315544
315564
  }
315545
315565
  get path() {
@@ -321800,10 +321820,10 @@ var Runnable = class extends Serializable {
321800
321820
  }
321801
321821
  const paths = log.ops.filter((op) => op.path.startsWith("/logs/")).map((op) => op.path.split("/")[2]);
321802
321822
  const dedupedPaths = [...new Set(paths)];
321803
- for (const path31 of dedupedPaths) {
321823
+ for (const path32 of dedupedPaths) {
321804
321824
  let eventType;
321805
321825
  let data = {};
321806
- const logEntry = runLog.state.logs[path31];
321826
+ const logEntry = runLog.state.logs[path32];
321807
321827
  if (logEntry.end_time === void 0) if (logEntry.streamed_output.length > 0) eventType = "stream";
321808
321828
  else eventType = "start";
321809
321829
  else eventType = "end";
@@ -324799,7 +324819,7 @@ var LangSmithLoader = class extends BaseDocumentLoader {
324799
324819
  constructor(fields) {
324800
324820
  super();
324801
324821
  if (fields.client && fields.clientConfig) throw new Error("client and clientConfig cannot both be provided.");
324802
- this.client = fields.client ?? new Client2(fields?.clientConfig);
324822
+ this.client = fields.client ?? new Client(fields?.clientConfig);
324803
324823
  this.contentKey = fields.contentKey ? fields.contentKey.split(".") : [];
324804
324824
  this.formatContent = fields.formatContent ?? _stringify;
324805
324825
  this.datasetId = fields.datasetId;
@@ -333868,13 +333888,13 @@ function combineAliasesAndInvert(constructor) {
333868
333888
  }, {});
333869
333889
  }
333870
333890
  async function reviver(value) {
333871
- const { optionalImportsMap, optionalImportEntrypoints: optionalImportEntrypoints$1, importMap, secretsMap, secretsFromEnv, path: path31, depth, maxDepth } = this;
333872
- const pathStr = path31.join(".");
333891
+ const { optionalImportsMap, optionalImportEntrypoints: optionalImportEntrypoints$1, importMap, secretsMap, secretsFromEnv, path: path32, depth, maxDepth } = this;
333892
+ const pathStr = path32.join(".");
333873
333893
  if (depth > maxDepth) throw new Error(`Maximum recursion depth (${maxDepth}) exceeded during deserialization. This may indicate a malicious payload or you may need to increase maxDepth.`);
333874
333894
  if (typeof value !== "object" || value == null) return value;
333875
333895
  if (Array.isArray(value)) return Promise.all(value.map((v, i) => reviver.call({
333876
333896
  ...this,
333877
- path: [...path31, `${i}`],
333897
+ path: [...path32, `${i}`],
333878
333898
  depth: depth + 1
333879
333899
  }, v)));
333880
333900
  const record2 = value;
@@ -333929,7 +333949,7 @@ async function reviver(value) {
333929
333949
  if (typeof builder !== "function") throw new Error(`Invalid identifer: ${pathStr} -> ${str3}`);
333930
333950
  const kwargs = await reviver.call({
333931
333951
  ...this,
333932
- path: [...path31, "kwargs"],
333952
+ path: [...path32, "kwargs"],
333933
333953
  depth: depth + 1
333934
333954
  }, serialized.kwargs);
333935
333955
  const instance = new builder(mapKeys(kwargs, keyFromJson, combineAliasesAndInvert(builder)));
@@ -333939,7 +333959,7 @@ async function reviver(value) {
333939
333959
  const result = {};
333940
333960
  for (const [key, val] of Object.entries(record2)) result[key] = await reviver.call({
333941
333961
  ...this,
333942
- path: [...path31, key],
333962
+ path: [...path32, key],
333943
333963
  depth: depth + 1
333944
333964
  }, val);
333945
333965
  return result;
@@ -339067,10 +339087,10 @@ var Graph$1 = class {
339067
339087
  this.edges.add([startKey, endKey]);
339068
339088
  return this;
339069
339089
  }
339070
- addConditionalEdges(source, path31, pathMap) {
339090
+ addConditionalEdges(source, path32, pathMap) {
339071
339091
  const options = typeof source === "object" ? source : {
339072
339092
  source,
339073
- path: path31,
339093
+ path: path32,
339074
339094
  pathMap
339075
339095
  };
339076
339096
  this.warnIfCompiled("Adding an edge to a graph that has already been compiled. This will not be reflected in the compiled graph.");
@@ -340469,16 +340489,16 @@ var Diff = class {
340469
340489
  }
340470
340490
  }
340471
340491
  }
340472
- addToPath(path31, added, removed, oldPosInc, options) {
340473
- const last = path31.lastComponent;
340492
+ addToPath(path32, added, removed, oldPosInc, options) {
340493
+ const last = path32.lastComponent;
340474
340494
  if (last && !options.oneChangePerToken && last.added === added && last.removed === removed) {
340475
340495
  return {
340476
- oldPos: path31.oldPos + oldPosInc,
340496
+ oldPos: path32.oldPos + oldPosInc,
340477
340497
  lastComponent: { count: last.count + 1, added, removed, previousComponent: last.previousComponent }
340478
340498
  };
340479
340499
  } else {
340480
340500
  return {
340481
- oldPos: path31.oldPos + oldPosInc,
340501
+ oldPos: path32.oldPos + oldPosInc,
340482
340502
  lastComponent: { count: 1, added, removed, previousComponent: last }
340483
340503
  };
340484
340504
  }
@@ -348341,12 +348361,12 @@ function encodeURIPath(str3) {
348341
348361
  return str3.replace(/[^A-Za-z0-9\-._~!$&'()*+,;=:@]+/g, encodeURIComponent);
348342
348362
  }
348343
348363
  var EMPTY = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.create(null));
348344
- var createPathTagFunction = (pathEncoder = encodeURIPath) => function path31(statics, ...params) {
348364
+ var createPathTagFunction = (pathEncoder = encodeURIPath) => function path32(statics, ...params) {
348345
348365
  if (statics.length === 1)
348346
348366
  return statics[0];
348347
348367
  let postPath = false;
348348
348368
  const invalidSegments = [];
348349
- const path32 = statics.reduce((previousValue, currentValue, index2) => {
348369
+ const path33 = statics.reduce((previousValue, currentValue, index2) => {
348350
348370
  if (/[?#]/.test(currentValue)) {
348351
348371
  postPath = true;
348352
348372
  }
@@ -348363,7 +348383,7 @@ var createPathTagFunction = (pathEncoder = encodeURIPath) => function path31(sta
348363
348383
  }
348364
348384
  return previousValue + currentValue + (index2 === params.length ? "" : encoded);
348365
348385
  }, "");
348366
- const pathOnly = path32.split(/[?#]/, 1)[0];
348386
+ const pathOnly = path33.split(/[?#]/, 1)[0];
348367
348387
  const invalidSegmentPattern = /(?<=^|\/)(?:\.|%2e){1,2}(?=\/|$)/gi;
348368
348388
  let match;
348369
348389
  while ((match = invalidSegmentPattern.exec(pathOnly)) !== null) {
@@ -348384,10 +348404,10 @@ var createPathTagFunction = (pathEncoder = encodeURIPath) => function path31(sta
348384
348404
  }, "");
348385
348405
  throw new OpenAIError(`Path parameters result in path with invalid segments:
348386
348406
  ${invalidSegments.map((e) => e.error).join("\n")}
348387
- ${path32}
348407
+ ${path33}
348388
348408
  ${underline}`);
348389
348409
  }
348390
- return path32;
348410
+ return path33;
348391
348411
  };
348392
348412
  var path8 = /* @__PURE__ */ createPathTagFunction(encodeURIPath);
348393
348413
 
@@ -353204,9 +353224,9 @@ var OpenAI = class {
353204
353224
  this.apiKey = token;
353205
353225
  return true;
353206
353226
  }
353207
- buildURL(path31, query, defaultBaseURL) {
353227
+ buildURL(path32, query, defaultBaseURL) {
353208
353228
  const baseURL = !__classPrivateFieldGet(this, _OpenAI_instances, "m", _OpenAI_baseURLOverridden).call(this) && defaultBaseURL || this.baseURL;
353209
- const url2 = isAbsoluteURL(path31) ? new URL(path31) : new URL(baseURL + (baseURL.endsWith("/") && path31.startsWith("/") ? path31.slice(1) : path31));
353229
+ const url2 = isAbsoluteURL(path32) ? new URL(path32) : new URL(baseURL + (baseURL.endsWith("/") && path32.startsWith("/") ? path32.slice(1) : path32));
353210
353230
  const defaultQuery = this.defaultQuery();
353211
353231
  if (!isEmptyObj(defaultQuery)) {
353212
353232
  query = { ...defaultQuery, ...query };
@@ -353230,24 +353250,24 @@ var OpenAI = class {
353230
353250
  */
353231
353251
  async prepareRequest(request, { url: url2, options }) {
353232
353252
  }
353233
- get(path31, opts) {
353234
- return this.methodRequest("get", path31, opts);
353253
+ get(path32, opts) {
353254
+ return this.methodRequest("get", path32, opts);
353235
353255
  }
353236
- post(path31, opts) {
353237
- return this.methodRequest("post", path31, opts);
353256
+ post(path32, opts) {
353257
+ return this.methodRequest("post", path32, opts);
353238
353258
  }
353239
- patch(path31, opts) {
353240
- return this.methodRequest("patch", path31, opts);
353259
+ patch(path32, opts) {
353260
+ return this.methodRequest("patch", path32, opts);
353241
353261
  }
353242
- put(path31, opts) {
353243
- return this.methodRequest("put", path31, opts);
353262
+ put(path32, opts) {
353263
+ return this.methodRequest("put", path32, opts);
353244
353264
  }
353245
- delete(path31, opts) {
353246
- return this.methodRequest("delete", path31, opts);
353265
+ delete(path32, opts) {
353266
+ return this.methodRequest("delete", path32, opts);
353247
353267
  }
353248
- methodRequest(method, path31, opts) {
353268
+ methodRequest(method, path32, opts) {
353249
353269
  return this.request(Promise.resolve(opts).then((opts2) => {
353250
- return { method, path: path31, ...opts2 };
353270
+ return { method, path: path32, ...opts2 };
353251
353271
  }));
353252
353272
  }
353253
353273
  request(options, remainingRetries = null) {
@@ -353351,8 +353371,8 @@ var OpenAI = class {
353351
353371
  }));
353352
353372
  return { response, options, controller, requestLogID, retryOfRequestLogID, startTime };
353353
353373
  }
353354
- getAPIList(path31, Page2, opts) {
353355
- return this.requestAPIList(Page2, { method: "get", path: path31, ...opts });
353374
+ getAPIList(path32, Page2, opts) {
353375
+ return this.requestAPIList(Page2, { method: "get", path: path32, ...opts });
353356
353376
  }
353357
353377
  requestAPIList(Page2, options) {
353358
353378
  const request = this.makeRequest(options, null, void 0);
@@ -353430,8 +353450,8 @@ var OpenAI = class {
353430
353450
  }
353431
353451
  async buildRequest(inputOptions, { retryCount = 0 } = {}) {
353432
353452
  const options = { ...inputOptions };
353433
- const { method, path: path31, query, defaultBaseURL } = options;
353434
- const url2 = this.buildURL(path31, query, defaultBaseURL);
353453
+ const { method, path: path32, query, defaultBaseURL } = options;
353454
+ const url2 = this.buildURL(path32, query, defaultBaseURL);
353435
353455
  if ("timeout" in options)
353436
353456
  validatePositiveInteger("timeout", options.timeout);
353437
353457
  options.timeout = options.timeout ?? this.timeout;
@@ -355047,23 +355067,23 @@ function isNullable(schema2) {
355047
355067
  }
355048
355068
  return false;
355049
355069
  }
355050
- function ensureStrictJsonSchema(jsonSchema, path31, root) {
355070
+ function ensureStrictJsonSchema(jsonSchema, path32, root) {
355051
355071
  if (typeof jsonSchema === "boolean") {
355052
- throw new TypeError(`Expected object schema but got boolean; path=${path31.join("/")}`);
355072
+ throw new TypeError(`Expected object schema but got boolean; path=${path32.join("/")}`);
355053
355073
  }
355054
355074
  if (!isObject4(jsonSchema)) {
355055
- throw new TypeError(`Expected ${JSON.stringify(jsonSchema)} to be an object; path=${path31.join("/")}`);
355075
+ throw new TypeError(`Expected ${JSON.stringify(jsonSchema)} to be an object; path=${path32.join("/")}`);
355056
355076
  }
355057
355077
  const defs = jsonSchema.$defs;
355058
355078
  if (isObject4(defs)) {
355059
355079
  for (const [defName, defSchema] of Object.entries(defs)) {
355060
- ensureStrictJsonSchema(defSchema, [...path31, "$defs", defName], root);
355080
+ ensureStrictJsonSchema(defSchema, [...path32, "$defs", defName], root);
355061
355081
  }
355062
355082
  }
355063
355083
  const definitions = jsonSchema.definitions;
355064
355084
  if (isObject4(definitions)) {
355065
355085
  for (const [definitionName, definitionSchema] of Object.entries(definitions)) {
355066
- ensureStrictJsonSchema(definitionSchema, [...path31, "definitions", definitionName], root);
355086
+ ensureStrictJsonSchema(definitionSchema, [...path32, "definitions", definitionName], root);
355067
355087
  }
355068
355088
  }
355069
355089
  const typ = jsonSchema.type;
@@ -355075,31 +355095,31 @@ function ensureStrictJsonSchema(jsonSchema, path31, root) {
355075
355095
  if (isObject4(properties)) {
355076
355096
  for (const [key, value] of Object.entries(properties)) {
355077
355097
  if (!isNullable(value) && !required2.includes(key)) {
355078
- throw new Error(`Zod field at \`${[...path31, "properties", key].join("/")}\` uses \`.optional()\` without \`.nullable()\` which is not supported by the API. See: https://platform.openai.com/docs/guides/structured-outputs?api-mode=responses#all-fields-must-be-required`);
355098
+ throw new Error(`Zod field at \`${[...path32, "properties", key].join("/")}\` uses \`.optional()\` without \`.nullable()\` which is not supported by the API. See: https://platform.openai.com/docs/guides/structured-outputs?api-mode=responses#all-fields-must-be-required`);
355079
355099
  }
355080
355100
  }
355081
355101
  jsonSchema.required = Object.keys(properties);
355082
355102
  jsonSchema.properties = Object.fromEntries(Object.entries(properties).map(([key, propSchema]) => [
355083
355103
  key,
355084
- ensureStrictJsonSchema(propSchema, [...path31, "properties", key], root)
355104
+ ensureStrictJsonSchema(propSchema, [...path32, "properties", key], root)
355085
355105
  ]));
355086
355106
  }
355087
355107
  const items = jsonSchema.items;
355088
355108
  if (isObject4(items)) {
355089
- jsonSchema.items = ensureStrictJsonSchema(items, [...path31, "items"], root);
355109
+ jsonSchema.items = ensureStrictJsonSchema(items, [...path32, "items"], root);
355090
355110
  }
355091
355111
  const anyOf = jsonSchema.anyOf;
355092
355112
  if (Array.isArray(anyOf)) {
355093
- jsonSchema.anyOf = anyOf.map((variant, i) => ensureStrictJsonSchema(variant, [...path31, "anyOf", String(i)], root));
355113
+ jsonSchema.anyOf = anyOf.map((variant, i) => ensureStrictJsonSchema(variant, [...path32, "anyOf", String(i)], root));
355094
355114
  }
355095
355115
  const allOf = jsonSchema.allOf;
355096
355116
  if (Array.isArray(allOf)) {
355097
355117
  if (allOf.length === 1) {
355098
- const resolved = ensureStrictJsonSchema(allOf[0], [...path31, "allOf", "0"], root);
355118
+ const resolved = ensureStrictJsonSchema(allOf[0], [...path32, "allOf", "0"], root);
355099
355119
  Object.assign(jsonSchema, resolved);
355100
355120
  delete jsonSchema.allOf;
355101
355121
  } else {
355102
- jsonSchema.allOf = allOf.map((entry, i) => ensureStrictJsonSchema(entry, [...path31, "allOf", String(i)], root));
355122
+ jsonSchema.allOf = allOf.map((entry, i) => ensureStrictJsonSchema(entry, [...path32, "allOf", String(i)], root));
355103
355123
  }
355104
355124
  }
355105
355125
  if (jsonSchema.default === null) {
@@ -355108,7 +355128,7 @@ function ensureStrictJsonSchema(jsonSchema, path31, root) {
355108
355128
  const ref = jsonSchema.$ref;
355109
355129
  if (ref && hasMoreThanNKeys(jsonSchema, 1)) {
355110
355130
  if (typeof ref !== "string") {
355111
- throw new TypeError(`Received non-string $ref - ${ref}; path=${path31.join("/")}`);
355131
+ throw new TypeError(`Received non-string $ref - ${ref}; path=${path32.join("/")}`);
355112
355132
  }
355113
355133
  const resolved = resolveRef(root, ref);
355114
355134
  if (typeof resolved === "boolean") {
@@ -355119,7 +355139,7 @@ function ensureStrictJsonSchema(jsonSchema, path31, root) {
355119
355139
  }
355120
355140
  Object.assign(jsonSchema, { ...resolved, ...jsonSchema });
355121
355141
  delete jsonSchema.$ref;
355122
- return ensureStrictJsonSchema(jsonSchema, path31, root);
355142
+ return ensureStrictJsonSchema(jsonSchema, path32, root);
355123
355143
  }
355124
355144
  return jsonSchema;
355125
355145
  }
@@ -370330,7 +370350,7 @@ function getSupportedElicitationModes(capabilities) {
370330
370350
  const supportsUrlMode = hasUrlCapability;
370331
370351
  return { supportsFormMode, supportsUrlMode };
370332
370352
  }
370333
- var Client3 = class extends Protocol {
370353
+ var Client2 = class extends Protocol {
370334
370354
  /**
370335
370355
  * Initializes this client with the given name and version information.
370336
370356
  */
@@ -373535,7 +373555,7 @@ var McpRuntimeCore = class extends import_node_events.EventEmitter {
373535
373555
  }
373536
373556
  return stdioTransport;
373537
373557
  })();
373538
- const client2 = new Client3(
373558
+ const client2 = new Client2(
373539
373559
  { name: `gyshell-mcp-${name}`, version: "1.0.0" },
373540
373560
  { capabilities: {} }
373541
373561
  );
@@ -377290,6 +377310,7 @@ function createTriggerRuntime(deps) {
377290
377310
 
377291
377311
  // ../../packages/backend/src/services/observability.ts
377292
377312
  var import_node_module2 = require("node:module");
377313
+ var import_node_path27 = __toESM(require("node:path"), 1);
377293
377314
 
377294
377315
  // ../../packages/backend/src/services/sre/metricsLedger.ts
377295
377316
  var DEFAULT_LIMIT = 1e4;
@@ -382543,10 +382564,10 @@ function createObservability(deps) {
382543
382564
  const monitorStatus = new MonitorStatusService(deps.resourceMonitorService, deps.terminalService);
382544
382565
  const policyEngine = new AgtPolicyEngine({
382545
382566
  loadPolicy: async () => {
382546
- const req = (0, import_node_module2.createRequire)(import_meta4.url);
382567
+ const req = (0, import_node_module2.createRequire)(typeof __filename !== "undefined" ? __filename : import_meta4.url);
382547
382568
  const fs22 = req("node:fs");
382548
- const path31 = req("node:path");
382549
- const policyPath = path31.join(".", "policy.yaml");
382569
+ const path32 = req("node:path");
382570
+ const policyPath = path32.join(".", "policy.yaml");
382550
382571
  if (fs22.existsSync(policyPath)) {
382551
382572
  return parsePolicyYaml(fs22.readFileSync(policyPath, "utf8"));
382552
382573
  }
@@ -382586,21 +382607,21 @@ function createObservability(deps) {
382586
382607
  reviewMode: deps.reviewMode ?? "strict"
382587
382608
  });
382588
382609
  const pluginScanRoot = (process.env.GYBACKEND_DATA_DIR ?? "./.gybackend-data") + "/plugins";
382589
- const bundlePluginRoot = new URL("../../plugins/", import_meta4.url).pathname;
382610
+ const bundlePluginRoot = typeof __filename !== "undefined" ? import_node_path27.default.join(import_node_path27.default.dirname(__filename), "..", "..", "plugins") : new URL("../../plugins/", import_meta4.url).pathname;
382590
382611
  const scanRoots = [pluginScanRoot, "./plugins"];
382591
382612
  try {
382592
- const req = (0, import_node_module2.createRequire)(import_meta4.url);
382613
+ const req = (0, import_node_module2.createRequire)(typeof __filename !== "undefined" ? __filename : import_meta4.url);
382593
382614
  const fs22 = req("node:fs");
382594
382615
  if (fs22.existsSync(bundlePluginRoot)) scanRoots.push(bundlePluginRoot);
382595
382616
  } catch {
382596
382617
  }
382597
382618
  try {
382598
- const req = (0, import_node_module2.createRequire)(import_meta4.url);
382619
+ const req = (0, import_node_module2.createRequire)(typeof __filename !== "undefined" ? __filename : import_meta4.url);
382599
382620
  const fs22 = req("node:fs");
382600
- const path31 = req("node:path");
382621
+ const path32 = req("node:path");
382601
382622
  const resourcesPath = process.resourcesPath;
382602
382623
  if (resourcesPath) {
382603
- const resourcesPlugins = path31.join(resourcesPath, "plugins");
382624
+ const resourcesPlugins = path32.join(resourcesPath, "plugins");
382604
382625
  if (fs22.existsSync(resourcesPlugins)) scanRoots.push(resourcesPlugins);
382605
382626
  }
382606
382627
  } catch {
@@ -384488,9 +384509,9 @@ function numberFromEnv(name, fallback) {
384488
384509
  function resolveDataDir() {
384489
384510
  const custom3 = (import_node_process2.default.env.GYBACKEND_DATA_DIR || "").trim();
384490
384511
  if (custom3) {
384491
- return import_node_path27.default.resolve(custom3);
384512
+ return import_node_path28.default.resolve(custom3);
384492
384513
  }
384493
- return import_node_path27.default.join(import_node_process2.default.cwd(), ".gybackend-data");
384514
+ return import_node_path28.default.join(import_node_process2.default.cwd(), ".gybackend-data");
384494
384515
  }
384495
384516
  async function startGyBackend() {
384496
384517
  const dataDir = resolveDataDir();
@@ -384523,7 +384544,7 @@ async function startGyBackend() {
384523
384544
  const modelCapabilityService = new ModelCapabilityService();
384524
384545
  const imageAttachmentService = new ImageAttachmentService(dataDir);
384525
384546
  const terminalStateStore = new TerminalStateStore(
384526
- import_node_path27.default.join(dataDir, "terminal-tabs-state.json")
384547
+ import_node_path28.default.join(dataDir, "terminal-tabs-state.json")
384527
384548
  );
384528
384549
  const terminalService = new TerminalService({
384529
384550
  terminalStateStore
@@ -384674,7 +384695,7 @@ async function startGyBackend() {
384674
384695
  });
384675
384696
  console.log(`[gybackend] Observability wired: dashboard state available (hosts=${observability.metricsLedger.hosts().length})`);
384676
384697
  if (settingsService.getSettings().sessionLogging?.enabled) {
384677
- const logDir = import_node_path27.default.join(
384698
+ const logDir = import_node_path28.default.join(
384678
384699
  import_node_process2.default.env.GYSHELL_STORE_DIR || "",
384679
384700
  "session-logs"
384680
384701
  );