@probelabs/probe 0.6.0-rc260 → 0.6.0-rc262

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.
@@ -17506,7 +17506,7 @@ var require_package2 = __commonJS({
17506
17506
  module2.exports = {
17507
17507
  name: "@aws-sdk/client-bedrock-runtime",
17508
17508
  description: "AWS SDK for JavaScript Bedrock Runtime Client for Node.js, Browser and React Native",
17509
- version: "3.998.0",
17509
+ version: "3.999.0",
17510
17510
  scripts: {
17511
17511
  build: "concurrently 'yarn:build:types' 'yarn:build:es' && yarn build:cjs",
17512
17512
  "build:cjs": "node ../../scripts/compilation/inline client-bedrock-runtime",
@@ -17526,21 +17526,21 @@ var require_package2 = __commonJS({
17526
17526
  dependencies: {
17527
17527
  "@aws-crypto/sha256-browser": "5.2.0",
17528
17528
  "@aws-crypto/sha256-js": "5.2.0",
17529
- "@aws-sdk/core": "^3.973.14",
17530
- "@aws-sdk/credential-provider-node": "^3.972.13",
17531
- "@aws-sdk/eventstream-handler-node": "^3.972.8",
17532
- "@aws-sdk/middleware-eventstream": "^3.972.5",
17533
- "@aws-sdk/middleware-host-header": "^3.972.5",
17534
- "@aws-sdk/middleware-logger": "^3.972.5",
17535
- "@aws-sdk/middleware-recursion-detection": "^3.972.5",
17536
- "@aws-sdk/middleware-user-agent": "^3.972.14",
17537
- "@aws-sdk/middleware-websocket": "^3.972.9",
17538
- "@aws-sdk/region-config-resolver": "^3.972.5",
17539
- "@aws-sdk/token-providers": "3.998.0",
17540
- "@aws-sdk/types": "^3.973.3",
17541
- "@aws-sdk/util-endpoints": "^3.996.2",
17542
- "@aws-sdk/util-user-agent-browser": "^3.972.5",
17543
- "@aws-sdk/util-user-agent-node": "^3.972.13",
17529
+ "@aws-sdk/core": "^3.973.15",
17530
+ "@aws-sdk/credential-provider-node": "^3.972.14",
17531
+ "@aws-sdk/eventstream-handler-node": "^3.972.9",
17532
+ "@aws-sdk/middleware-eventstream": "^3.972.6",
17533
+ "@aws-sdk/middleware-host-header": "^3.972.6",
17534
+ "@aws-sdk/middleware-logger": "^3.972.6",
17535
+ "@aws-sdk/middleware-recursion-detection": "^3.972.6",
17536
+ "@aws-sdk/middleware-user-agent": "^3.972.15",
17537
+ "@aws-sdk/middleware-websocket": "^3.972.10",
17538
+ "@aws-sdk/region-config-resolver": "^3.972.6",
17539
+ "@aws-sdk/token-providers": "3.999.0",
17540
+ "@aws-sdk/types": "^3.973.4",
17541
+ "@aws-sdk/util-endpoints": "^3.996.3",
17542
+ "@aws-sdk/util-user-agent-browser": "^3.972.6",
17543
+ "@aws-sdk/util-user-agent-node": "^3.973.0",
17544
17544
  "@smithy/config-resolver": "^4.4.9",
17545
17545
  "@smithy/core": "^3.23.6",
17546
17546
  "@smithy/eventstream-serde-browser": "^4.2.10",
@@ -18134,7 +18134,7 @@ var require_fromHttp = __commonJS({
18134
18134
  var client_1 = (init_client(), __toCommonJS(client_exports));
18135
18135
  var node_http_handler_1 = require_dist_cjs15();
18136
18136
  var property_provider_1 = require_dist_cjs24();
18137
- var promises_1 = tslib_1.__importDefault(require("fs/promises"));
18137
+ var promises_1 = tslib_1.__importDefault(require("node:fs/promises"));
18138
18138
  var checkUrl_1 = require_checkUrl();
18139
18139
  var requestHelpers_1 = require_requestHelpers();
18140
18140
  var retry_wrapper_1 = require_retry_wrapper();
@@ -18287,7 +18287,7 @@ var init_package = __esm({
18287
18287
  "node_modules/@aws-sdk/nested-clients/package.json"() {
18288
18288
  package_default = {
18289
18289
  name: "@aws-sdk/nested-clients",
18290
- version: "3.996.2",
18290
+ version: "3.996.3",
18291
18291
  description: "Nested clients for AWS SDK packages.",
18292
18292
  main: "./dist-cjs/index.js",
18293
18293
  module: "./dist-es/index.js",
@@ -18316,16 +18316,16 @@ var init_package = __esm({
18316
18316
  dependencies: {
18317
18317
  "@aws-crypto/sha256-browser": "5.2.0",
18318
18318
  "@aws-crypto/sha256-js": "5.2.0",
18319
- "@aws-sdk/core": "^3.973.14",
18320
- "@aws-sdk/middleware-host-header": "^3.972.5",
18321
- "@aws-sdk/middleware-logger": "^3.972.5",
18322
- "@aws-sdk/middleware-recursion-detection": "^3.972.5",
18323
- "@aws-sdk/middleware-user-agent": "^3.972.14",
18324
- "@aws-sdk/region-config-resolver": "^3.972.5",
18325
- "@aws-sdk/types": "^3.973.3",
18326
- "@aws-sdk/util-endpoints": "^3.996.2",
18327
- "@aws-sdk/util-user-agent-browser": "^3.972.5",
18328
- "@aws-sdk/util-user-agent-node": "^3.972.13",
18319
+ "@aws-sdk/core": "^3.973.15",
18320
+ "@aws-sdk/middleware-host-header": "^3.972.6",
18321
+ "@aws-sdk/middleware-logger": "^3.972.6",
18322
+ "@aws-sdk/middleware-recursion-detection": "^3.972.6",
18323
+ "@aws-sdk/middleware-user-agent": "^3.972.15",
18324
+ "@aws-sdk/region-config-resolver": "^3.972.6",
18325
+ "@aws-sdk/types": "^3.973.4",
18326
+ "@aws-sdk/util-endpoints": "^3.996.3",
18327
+ "@aws-sdk/util-user-agent-browser": "^3.972.6",
18328
+ "@aws-sdk/util-user-agent-node": "^3.973.0",
18329
18329
  "@smithy/config-resolver": "^4.4.9",
18330
18330
  "@smithy/core": "^3.23.6",
18331
18331
  "@smithy/fetch-http-handler": "^5.3.11",
@@ -18437,17 +18437,51 @@ var init_package = __esm({
18437
18437
  var require_dist_cjs51 = __commonJS({
18438
18438
  "node_modules/@aws-sdk/util-user-agent-node/dist-cjs/index.js"(exports2) {
18439
18439
  "use strict";
18440
- var os4 = require("os");
18441
- var process2 = require("process");
18440
+ var node_os = require("node:os");
18441
+ var node_process = require("node:process");
18442
+ var promises = require("node:fs/promises");
18443
+ var node_path = require("node:path");
18442
18444
  var middlewareUserAgent = require_dist_cjs29();
18443
18445
  var getRuntimeUserAgentPair = () => {
18444
18446
  const runtimesToCheck = ["deno", "bun", "llrt"];
18445
18447
  for (const runtime of runtimesToCheck) {
18446
- if (process2.versions[runtime]) {
18447
- return [`md/${runtime}`, process2.versions[runtime]];
18448
+ if (node_process.versions[runtime]) {
18449
+ return [`md/${runtime}`, node_process.versions[runtime]];
18450
+ }
18451
+ }
18452
+ return ["md/nodejs", node_process.versions.node];
18453
+ };
18454
+ var getTypeScriptPackageJsonPath = (dirname6 = "") => {
18455
+ let nodeModulesPath;
18456
+ const normalizedPath = node_path.normalize(dirname6);
18457
+ const parts = normalizedPath.split(node_path.sep);
18458
+ const nodeModulesIndex = parts.indexOf("node_modules");
18459
+ if (nodeModulesIndex !== -1) {
18460
+ nodeModulesPath = parts.slice(0, nodeModulesIndex).join(node_path.sep);
18461
+ } else {
18462
+ nodeModulesPath = dirname6;
18463
+ }
18464
+ return node_path.join(nodeModulesPath, "node_modules", "typescript", "package.json");
18465
+ };
18466
+ var tscVersion;
18467
+ var getTypeScriptUserAgentPair = async () => {
18468
+ if (tscVersion === null) {
18469
+ return void 0;
18470
+ } else if (typeof tscVersion === "string") {
18471
+ return ["md/tsc", tscVersion];
18472
+ }
18473
+ try {
18474
+ const packageJson = await promises.readFile(getTypeScriptPackageJsonPath(__dirname), "utf-8");
18475
+ const { version: version2 } = JSON.parse(packageJson);
18476
+ if (typeof version2 !== "string") {
18477
+ tscVersion = null;
18478
+ return void 0;
18448
18479
  }
18480
+ tscVersion = version2;
18481
+ return ["md/tsc", tscVersion];
18482
+ } catch {
18483
+ tscVersion = null;
18449
18484
  }
18450
- return ["md/nodejs", process2.versions.node];
18451
18485
  };
18452
18486
  var crtAvailability = {
18453
18487
  isCrtAvailable: false
@@ -18464,10 +18498,14 @@ var require_dist_cjs51 = __commonJS({
18464
18498
  const sections = [
18465
18499
  ["aws-sdk-js", clientVersion],
18466
18500
  ["ua", "2.1"],
18467
- [`os/${os4.platform()}`, os4.release()],
18501
+ [`os/${node_os.platform()}`, node_os.release()],
18468
18502
  ["lang/js"],
18469
18503
  runtimeUserAgentPair
18470
18504
  ];
18505
+ const typescriptUserAgentPair = await getTypeScriptUserAgentPair();
18506
+ if (typescriptUserAgentPair) {
18507
+ sections.push(typescriptUserAgentPair);
18508
+ }
18471
18509
  const crtAvailable = isCrtAvailable();
18472
18510
  if (crtAvailable) {
18473
18511
  sections.push(crtAvailable);
@@ -18475,8 +18513,8 @@ var require_dist_cjs51 = __commonJS({
18475
18513
  if (serviceId) {
18476
18514
  sections.push([`api/${serviceId}`, clientVersion]);
18477
18515
  }
18478
- if (process2.env.AWS_EXECUTION_ENV) {
18479
- sections.push([`exec-env/${process2.env.AWS_EXECUTION_ENV}`]);
18516
+ if (node_process.env.AWS_EXECUTION_ENV) {
18517
+ sections.push([`exec-env/${node_process.env.AWS_EXECUTION_ENV}`]);
18480
18518
  }
18481
18519
  const appId = await config?.userAgentAppId?.();
18482
18520
  const resolvedUserAgent = appId ? [...sections, [`app/${appId}`]] : [...sections];
@@ -19550,7 +19588,7 @@ var require_dist_cjs56 = __commonJS({
19550
19588
  var httpAuthSchemes = (init_httpAuthSchemes2(), __toCommonJS(httpAuthSchemes_exports));
19551
19589
  var propertyProvider = require_dist_cjs24();
19552
19590
  var sharedIniFileLoader = require_dist_cjs42();
19553
- var fs10 = require("fs");
19591
+ var node_fs = require("node:fs");
19554
19592
  var fromEnvSigningName = ({ logger: logger2, signingName } = {}) => async () => {
19555
19593
  logger2?.debug?.("@aws-sdk/token-providers - fromEnvSigningName");
19556
19594
  if (!signingName) {
@@ -19596,7 +19634,7 @@ var require_dist_cjs56 = __commonJS({
19596
19634
  throw new propertyProvider.TokenProviderError(`Value not present for '${key}' in SSO Token${forRefresh ? ". Cannot refresh" : ""}. ${REFRESH_MESSAGE}`, false);
19597
19635
  }
19598
19636
  };
19599
- var { writeFile: writeFile2 } = fs10.promises;
19637
+ var { writeFile: writeFile2 } = node_fs.promises;
19600
19638
  var writeSSOTokenToFile = (id, ssoToken) => {
19601
19639
  const tokenFilepath = sharedIniFileLoader.getSSOTokenFilepath(id);
19602
19640
  const tokenString = JSON.stringify(ssoToken, null, 2);
@@ -22718,8 +22756,8 @@ var require_dist_cjs59 = __commonJS({
22718
22756
  "use strict";
22719
22757
  var sharedIniFileLoader = require_dist_cjs42();
22720
22758
  var propertyProvider = require_dist_cjs24();
22721
- var child_process = require("child_process");
22722
- var util2 = require("util");
22759
+ var node_child_process = require("node:child_process");
22760
+ var node_util = require("node:util");
22723
22761
  var client = (init_client(), __toCommonJS(client_exports));
22724
22762
  var getValidatedProcessCredentials = (profileName, data3, profiles) => {
22725
22763
  if (data3.Version !== 1) {
@@ -22755,7 +22793,7 @@ var require_dist_cjs59 = __commonJS({
22755
22793
  if (profiles[profileName]) {
22756
22794
  const credentialProcess = profile["credential_process"];
22757
22795
  if (credentialProcess !== void 0) {
22758
- const execPromise = util2.promisify(sharedIniFileLoader.externalDataInterceptor?.getTokenRecord?.().exec ?? child_process.exec);
22796
+ const execPromise = node_util.promisify(sharedIniFileLoader.externalDataInterceptor?.getTokenRecord?.().exec ?? node_child_process.exec);
22759
22797
  try {
22760
22798
  const { stdout } = await execPromise(credentialProcess);
22761
22799
  let data3;
@@ -22869,7 +22907,7 @@ var require_fromTokenFile = __commonJS({
22869
22907
  var client_1 = (init_client(), __toCommonJS(client_exports));
22870
22908
  var property_provider_1 = require_dist_cjs24();
22871
22909
  var shared_ini_file_loader_1 = require_dist_cjs42();
22872
- var fs_1 = require("fs");
22910
+ var node_fs_1 = require("node:fs");
22873
22911
  var fromWebToken_1 = require_fromWebToken();
22874
22912
  var ENV_TOKEN_FILE = "AWS_WEB_IDENTITY_TOKEN_FILE";
22875
22913
  var ENV_ROLE_ARN = "AWS_ROLE_ARN";
@@ -22886,7 +22924,7 @@ var require_fromTokenFile = __commonJS({
22886
22924
  }
22887
22925
  const credentials = await (0, fromWebToken_1.fromWebToken)({
22888
22926
  ...init,
22889
- webIdentityToken: shared_ini_file_loader_1.externalDataInterceptor?.getTokenRecord?.()[webIdentityTokenFile] ?? (0, fs_1.readFileSync)(webIdentityTokenFile, { encoding: "ascii" }),
22927
+ webIdentityToken: shared_ini_file_loader_1.externalDataInterceptor?.getTokenRecord?.()[webIdentityTokenFile] ?? (0, node_fs_1.readFileSync)(webIdentityTokenFile, { encoding: "ascii" }),
22890
22928
  roleArn,
22891
22929
  roleSessionName
22892
22930
  })(awsIdentityProperties);
@@ -29404,7 +29442,7 @@ async function getPackageBinDir() {
29404
29442
  }
29405
29443
  async function findPackageRoot() {
29406
29444
  const debug = process.env.DEBUG === "1" || process.env.VERBOSE === "1";
29407
- let currentDir = __dirname;
29445
+ let currentDir = __dirname2;
29408
29446
  const rootDir = import_path.default.parse(currentDir).root;
29409
29447
  if (debug) {
29410
29448
  console.log(`DEBUG: Starting package root search from: ${currentDir}`);
@@ -29478,7 +29516,7 @@ async function canWriteToDirectory(dirPath) {
29478
29516
  return false;
29479
29517
  }
29480
29518
  }
29481
- var import_path, import_os, import_fs_extra, import_url, __filename, __dirname;
29519
+ var import_path, import_os, import_fs_extra, import_url, __filename, __dirname2;
29482
29520
  var init_directory_resolver = __esm({
29483
29521
  "src/directory-resolver.js"() {
29484
29522
  "use strict";
@@ -29487,7 +29525,7 @@ var init_directory_resolver = __esm({
29487
29525
  import_fs_extra = __toESM(require("fs-extra"), 1);
29488
29526
  import_url = require("url");
29489
29527
  __filename = (0, import_url.fileURLToPath)("file:///");
29490
- __dirname = import_path.default.dirname(__filename);
29528
+ __dirname2 = import_path.default.dirname(__filename);
29491
29529
  }
29492
29530
  });
29493
29531
 
@@ -30110,9 +30148,9 @@ async function saveVersionInfo(version2, binDir) {
30110
30148
  async function getPackageVersion() {
30111
30149
  try {
30112
30150
  const possiblePaths = [
30113
- import_path2.default.resolve(__dirname2, "..", "package.json"),
30151
+ import_path2.default.resolve(__dirname3, "..", "package.json"),
30114
30152
  // When installed from npm: src/../package.json
30115
- import_path2.default.resolve(__dirname2, "..", "..", "package.json")
30153
+ import_path2.default.resolve(__dirname3, "..", "..", "package.json")
30116
30154
  // In development: src/../../package.json
30117
30155
  ];
30118
30156
  for (const packageJsonPath of possiblePaths) {
@@ -30249,7 +30287,7 @@ async function downloadProbeBinary(version2) {
30249
30287
  throw sanitizeError(error2);
30250
30288
  }
30251
30289
  }
30252
- var import_axios, import_fs_extra2, import_path2, import_crypto, import_util3, import_child_process, import_tar, import_os2, import_url2, exec, REPO_OWNER, REPO_NAME, BINARY_NAME, __filename2, __dirname2, downloadLocks, LOCK_TIMEOUT_MS, LOCK_POLL_INTERVAL_MS, MAX_LOCK_WAIT_MS;
30290
+ var import_axios, import_fs_extra2, import_path2, import_crypto, import_util3, import_child_process, import_tar, import_os2, import_url2, exec, REPO_OWNER, REPO_NAME, BINARY_NAME, __filename2, __dirname3, downloadLocks, LOCK_TIMEOUT_MS, LOCK_POLL_INTERVAL_MS, MAX_LOCK_WAIT_MS;
30253
30291
  var init_downloader = __esm({
30254
30292
  "src/downloader.js"() {
30255
30293
  "use strict";
@@ -30270,7 +30308,7 @@ var init_downloader = __esm({
30270
30308
  REPO_NAME = "probe";
30271
30309
  BINARY_NAME = "probe";
30272
30310
  __filename2 = (0, import_url2.fileURLToPath)("file:///");
30273
- __dirname2 = import_path2.default.dirname(__filename2);
30311
+ __dirname3 = import_path2.default.dirname(__filename2);
30274
30312
  downloadLocks = /* @__PURE__ */ new Map();
30275
30313
  LOCK_TIMEOUT_MS = 5 * 60 * 1e3;
30276
30314
  LOCK_POLL_INTERVAL_MS = 1e3;
@@ -30292,7 +30330,7 @@ async function getBinaryPath(options = {}) {
30292
30330
  }
30293
30331
  const isWindows = process.platform === "win32";
30294
30332
  const binaryName = isWindows ? "probe.exe" : "probe-binary";
30295
- const localPackageBin = import_path3.default.resolve(__dirname3, "..", "bin");
30333
+ const localPackageBin = import_path3.default.resolve(__dirname4, "..", "bin");
30296
30334
  const localBinaryPath = import_path3.default.join(localPackageBin, binaryName);
30297
30335
  if (import_fs_extra3.default.existsSync(localBinaryPath) && !forceDownload) {
30298
30336
  probeBinaryPath = localBinaryPath;
@@ -30335,7 +30373,7 @@ function escapeString(str) {
30335
30373
  return `'${str.replace(/'/g, "'\\''")}'`;
30336
30374
  }
30337
30375
  }
30338
- var import_path3, import_fs_extra3, import_url3, __filename3, __dirname3, probeBinaryPath;
30376
+ var import_path3, import_fs_extra3, import_url3, __filename3, __dirname4, probeBinaryPath;
30339
30377
  var init_utils2 = __esm({
30340
30378
  "src/utils.js"() {
30341
30379
  "use strict";
@@ -30345,7 +30383,7 @@ var init_utils2 = __esm({
30345
30383
  init_downloader();
30346
30384
  init_directory_resolver();
30347
30385
  __filename3 = (0, import_url3.fileURLToPath)("file:///");
30348
- __dirname3 = import_path3.default.dirname(__filename3);
30386
+ __dirname4 = import_path3.default.dirname(__filename3);
30349
30387
  probeBinaryPath = "";
30350
30388
  }
30351
30389
  });
@@ -50578,31 +50616,33 @@ var init_runtime = __esm({
50578
50616
  }
50579
50617
  });
50580
50618
 
50581
- // node_modules/balanced-match/dist/esm/index.js
50582
- var balanced, maybeMatch, range2;
50583
- var init_esm = __esm({
50584
- "node_modules/balanced-match/dist/esm/index.js"() {
50585
- balanced = (a5, b5, str) => {
50586
- const ma = a5 instanceof RegExp ? maybeMatch(a5, str) : a5;
50587
- const mb = b5 instanceof RegExp ? maybeMatch(b5, str) : b5;
50588
- const r5 = ma !== null && mb != null && range2(ma, mb, str);
50619
+ // node_modules/balanced-match/index.js
50620
+ var require_balanced_match = __commonJS({
50621
+ "node_modules/balanced-match/index.js"(exports2, module2) {
50622
+ "use strict";
50623
+ module2.exports = balanced;
50624
+ function balanced(a5, b5, str) {
50625
+ if (a5 instanceof RegExp) a5 = maybeMatch(a5, str);
50626
+ if (b5 instanceof RegExp) b5 = maybeMatch(b5, str);
50627
+ var r5 = range2(a5, b5, str);
50589
50628
  return r5 && {
50590
50629
  start: r5[0],
50591
50630
  end: r5[1],
50592
50631
  pre: str.slice(0, r5[0]),
50593
- body: str.slice(r5[0] + ma.length, r5[1]),
50594
- post: str.slice(r5[1] + mb.length)
50632
+ body: str.slice(r5[0] + a5.length, r5[1]),
50633
+ post: str.slice(r5[1] + b5.length)
50595
50634
  };
50596
- };
50597
- maybeMatch = (reg, str) => {
50598
- const m5 = str.match(reg);
50635
+ }
50636
+ function maybeMatch(reg, str) {
50637
+ var m5 = str.match(reg);
50599
50638
  return m5 ? m5[0] : null;
50600
- };
50601
- range2 = (a5, b5, str) => {
50602
- let begs, beg, left, right = void 0, result;
50603
- let ai = str.indexOf(a5);
50604
- let bi = str.indexOf(b5, ai + 1);
50605
- let i5 = ai;
50639
+ }
50640
+ balanced.range = range2;
50641
+ function range2(a5, b5, str) {
50642
+ var begs, beg, left, right, result;
50643
+ var ai = str.indexOf(a5);
50644
+ var bi = str.indexOf(b5, ai + 1);
50645
+ var i5 = ai;
50606
50646
  if (ai >= 0 && bi > 0) {
50607
50647
  if (a5 === b5) {
50608
50648
  return [ai, bi];
@@ -50610,16 +50650,14 @@ var init_esm = __esm({
50610
50650
  begs = [];
50611
50651
  left = str.length;
50612
50652
  while (i5 >= 0 && !result) {
50613
- if (i5 === ai) {
50653
+ if (i5 == ai) {
50614
50654
  begs.push(i5);
50615
50655
  ai = str.indexOf(a5, i5 + 1);
50616
- } else if (begs.length === 1) {
50617
- const r5 = begs.pop();
50618
- if (r5 !== void 0)
50619
- result = [r5, bi];
50656
+ } else if (begs.length == 1) {
50657
+ result = [begs.pop(), bi];
50620
50658
  } else {
50621
50659
  beg = begs.pop();
50622
- if (beg !== void 0 && beg < left) {
50660
+ if (beg < left) {
50623
50661
  left = beg;
50624
50662
  right = bi;
50625
50663
  }
@@ -50627,179 +50665,163 @@ var init_esm = __esm({
50627
50665
  }
50628
50666
  i5 = ai < bi && ai >= 0 ? ai : bi;
50629
50667
  }
50630
- if (begs.length && right !== void 0) {
50668
+ if (begs.length) {
50631
50669
  result = [left, right];
50632
50670
  }
50633
50671
  }
50634
50672
  return result;
50635
- };
50673
+ }
50636
50674
  }
50637
50675
  });
50638
50676
 
50639
- // node_modules/brace-expansion/dist/esm/index.js
50640
- function numeric(str) {
50641
- return !isNaN(str) ? parseInt(str, 10) : str.charCodeAt(0);
50642
- }
50643
- function escapeBraces(str) {
50644
- return str.replace(slashPattern, escSlash).replace(openPattern, escOpen).replace(closePattern, escClose).replace(commaPattern, escComma).replace(periodPattern, escPeriod);
50645
- }
50646
- function unescapeBraces(str) {
50647
- return str.replace(escSlashPattern, "\\").replace(escOpenPattern, "{").replace(escClosePattern, "}").replace(escCommaPattern, ",").replace(escPeriodPattern, ".");
50648
- }
50649
- function parseCommaParts(str) {
50650
- if (!str) {
50651
- return [""];
50652
- }
50653
- const parts = [];
50654
- const m5 = balanced("{", "}", str);
50655
- if (!m5) {
50656
- return str.split(",");
50657
- }
50658
- const { pre, body, post } = m5;
50659
- const p5 = pre.split(",");
50660
- p5[p5.length - 1] += "{" + body + "}";
50661
- const postParts = parseCommaParts(post);
50662
- if (post.length) {
50663
- ;
50664
- p5[p5.length - 1] += postParts.shift();
50665
- p5.push.apply(p5, postParts);
50666
- }
50667
- parts.push.apply(parts, p5);
50668
- return parts;
50669
- }
50670
- function expand(str, options = {}) {
50671
- if (!str) {
50672
- return [];
50673
- }
50674
- const { max = EXPANSION_MAX } = options;
50675
- if (str.slice(0, 2) === "{}") {
50676
- str = "\\{\\}" + str.slice(2);
50677
- }
50678
- return expand_(escapeBraces(str), max, true).map(unescapeBraces);
50679
- }
50680
- function embrace(str) {
50681
- return "{" + str + "}";
50682
- }
50683
- function isPadded(el) {
50684
- return /^-?0\d/.test(el);
50685
- }
50686
- function lte(i5, y2) {
50687
- return i5 <= y2;
50688
- }
50689
- function gte(i5, y2) {
50690
- return i5 >= y2;
50691
- }
50692
- function expand_(str, max, isTop) {
50693
- const expansions = [];
50694
- const m5 = balanced("{", "}", str);
50695
- if (!m5)
50696
- return [str];
50697
- const pre = m5.pre;
50698
- const post = m5.post.length ? expand_(m5.post, max, false) : [""];
50699
- if (/\$$/.test(m5.pre)) {
50700
- for (let k5 = 0; k5 < post.length && k5 < max; k5++) {
50701
- const expansion = pre + "{" + m5.body + "}" + post[k5];
50702
- expansions.push(expansion);
50677
+ // node_modules/brace-expansion/index.js
50678
+ var require_brace_expansion = __commonJS({
50679
+ "node_modules/brace-expansion/index.js"(exports2, module2) {
50680
+ var balanced = require_balanced_match();
50681
+ module2.exports = expandTop;
50682
+ var escSlash = "\0SLASH" + Math.random() + "\0";
50683
+ var escOpen = "\0OPEN" + Math.random() + "\0";
50684
+ var escClose = "\0CLOSE" + Math.random() + "\0";
50685
+ var escComma = "\0COMMA" + Math.random() + "\0";
50686
+ var escPeriod = "\0PERIOD" + Math.random() + "\0";
50687
+ function numeric(str) {
50688
+ return parseInt(str, 10) == str ? parseInt(str, 10) : str.charCodeAt(0);
50689
+ }
50690
+ function escapeBraces(str) {
50691
+ return str.split("\\\\").join(escSlash).split("\\{").join(escOpen).split("\\}").join(escClose).split("\\,").join(escComma).split("\\.").join(escPeriod);
50692
+ }
50693
+ function unescapeBraces(str) {
50694
+ return str.split(escSlash).join("\\").split(escOpen).join("{").split(escClose).join("}").split(escComma).join(",").split(escPeriod).join(".");
50695
+ }
50696
+ function parseCommaParts(str) {
50697
+ if (!str)
50698
+ return [""];
50699
+ var parts = [];
50700
+ var m5 = balanced("{", "}", str);
50701
+ if (!m5)
50702
+ return str.split(",");
50703
+ var pre = m5.pre;
50704
+ var body = m5.body;
50705
+ var post = m5.post;
50706
+ var p5 = pre.split(",");
50707
+ p5[p5.length - 1] += "{" + body + "}";
50708
+ var postParts = parseCommaParts(post);
50709
+ if (post.length) {
50710
+ p5[p5.length - 1] += postParts.shift();
50711
+ p5.push.apply(p5, postParts);
50712
+ }
50713
+ parts.push.apply(parts, p5);
50714
+ return parts;
50715
+ }
50716
+ function expandTop(str) {
50717
+ if (!str)
50718
+ return [];
50719
+ if (str.substr(0, 2) === "{}") {
50720
+ str = "\\{\\}" + str.substr(2);
50721
+ }
50722
+ return expand2(escapeBraces(str), true).map(unescapeBraces);
50703
50723
  }
50704
- } else {
50705
- const isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m5.body);
50706
- const isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m5.body);
50707
- const isSequence = isNumericSequence || isAlphaSequence;
50708
- const isOptions = m5.body.indexOf(",") >= 0;
50709
- if (!isSequence && !isOptions) {
50710
- if (m5.post.match(/,(?!,).*\}/)) {
50711
- str = m5.pre + "{" + m5.body + escClose + m5.post;
50712
- return expand_(str, max, true);
50713
- }
50714
- return [str];
50715
- }
50716
- let n5;
50717
- if (isSequence) {
50718
- n5 = m5.body.split(/\.\./);
50719
- } else {
50720
- n5 = parseCommaParts(m5.body);
50721
- if (n5.length === 1 && n5[0] !== void 0) {
50722
- n5 = expand_(n5[0], max, false).map(embrace);
50723
- if (n5.length === 1) {
50724
- return post.map((p5) => m5.pre + n5[0] + p5);
50725
- }
50726
- }
50727
- }
50728
- let N;
50729
- if (isSequence && n5[0] !== void 0 && n5[1] !== void 0) {
50730
- const x5 = numeric(n5[0]);
50731
- const y2 = numeric(n5[1]);
50732
- const width = Math.max(n5[0].length, n5[1].length);
50733
- let incr = n5.length === 3 && n5[2] !== void 0 ? Math.abs(numeric(n5[2])) : 1;
50734
- let test = lte;
50735
- const reverse = y2 < x5;
50736
- if (reverse) {
50737
- incr *= -1;
50738
- test = gte;
50739
- }
50740
- const pad = n5.some(isPadded);
50741
- N = [];
50742
- for (let i5 = x5; test(i5, y2); i5 += incr) {
50743
- let c5;
50744
- if (isAlphaSequence) {
50745
- c5 = String.fromCharCode(i5);
50746
- if (c5 === "\\") {
50747
- c5 = "";
50748
- }
50724
+ function embrace(str) {
50725
+ return "{" + str + "}";
50726
+ }
50727
+ function isPadded(el) {
50728
+ return /^-?0\d/.test(el);
50729
+ }
50730
+ function lte(i5, y2) {
50731
+ return i5 <= y2;
50732
+ }
50733
+ function gte(i5, y2) {
50734
+ return i5 >= y2;
50735
+ }
50736
+ function expand2(str, isTop) {
50737
+ var expansions = [];
50738
+ var m5 = balanced("{", "}", str);
50739
+ if (!m5) return [str];
50740
+ var pre = m5.pre;
50741
+ var post = m5.post.length ? expand2(m5.post, false) : [""];
50742
+ if (/\$$/.test(m5.pre)) {
50743
+ for (var k5 = 0; k5 < post.length; k5++) {
50744
+ var expansion = pre + "{" + m5.body + "}" + post[k5];
50745
+ expansions.push(expansion);
50746
+ }
50747
+ } else {
50748
+ var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m5.body);
50749
+ var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m5.body);
50750
+ var isSequence = isNumericSequence || isAlphaSequence;
50751
+ var isOptions = m5.body.indexOf(",") >= 0;
50752
+ if (!isSequence && !isOptions) {
50753
+ if (m5.post.match(/,(?!,).*\}/)) {
50754
+ str = m5.pre + "{" + m5.body + escClose + m5.post;
50755
+ return expand2(str);
50756
+ }
50757
+ return [str];
50758
+ }
50759
+ var n5;
50760
+ if (isSequence) {
50761
+ n5 = m5.body.split(/\.\./);
50749
50762
  } else {
50750
- c5 = String(i5);
50751
- if (pad) {
50752
- const need = width - c5.length;
50753
- if (need > 0) {
50754
- const z2 = new Array(need + 1).join("0");
50755
- if (i5 < 0) {
50756
- c5 = "-" + z2 + c5.slice(1);
50757
- } else {
50758
- c5 = z2 + c5;
50763
+ n5 = parseCommaParts(m5.body);
50764
+ if (n5.length === 1) {
50765
+ n5 = expand2(n5[0], false).map(embrace);
50766
+ if (n5.length === 1) {
50767
+ return post.map(function(p5) {
50768
+ return m5.pre + n5[0] + p5;
50769
+ });
50770
+ }
50771
+ }
50772
+ }
50773
+ var N;
50774
+ if (isSequence) {
50775
+ var x5 = numeric(n5[0]);
50776
+ var y2 = numeric(n5[1]);
50777
+ var width = Math.max(n5[0].length, n5[1].length);
50778
+ var incr = n5.length == 3 ? Math.abs(numeric(n5[2])) : 1;
50779
+ var test = lte;
50780
+ var reverse = y2 < x5;
50781
+ if (reverse) {
50782
+ incr *= -1;
50783
+ test = gte;
50784
+ }
50785
+ var pad = n5.some(isPadded);
50786
+ N = [];
50787
+ for (var i5 = x5; test(i5, y2); i5 += incr) {
50788
+ var c5;
50789
+ if (isAlphaSequence) {
50790
+ c5 = String.fromCharCode(i5);
50791
+ if (c5 === "\\")
50792
+ c5 = "";
50793
+ } else {
50794
+ c5 = String(i5);
50795
+ if (pad) {
50796
+ var need = width - c5.length;
50797
+ if (need > 0) {
50798
+ var z2 = new Array(need + 1).join("0");
50799
+ if (i5 < 0)
50800
+ c5 = "-" + z2 + c5.slice(1);
50801
+ else
50802
+ c5 = z2 + c5;
50803
+ }
50759
50804
  }
50760
50805
  }
50806
+ N.push(c5);
50807
+ }
50808
+ } else {
50809
+ N = [];
50810
+ for (var j5 = 0; j5 < n5.length; j5++) {
50811
+ N.push.apply(N, expand2(n5[j5], false));
50761
50812
  }
50762
50813
  }
50763
- N.push(c5);
50764
- }
50765
- } else {
50766
- N = [];
50767
- for (let j5 = 0; j5 < n5.length; j5++) {
50768
- N.push.apply(N, expand_(n5[j5], max, false));
50769
- }
50770
- }
50771
- for (let j5 = 0; j5 < N.length; j5++) {
50772
- for (let k5 = 0; k5 < post.length && expansions.length < max; k5++) {
50773
- const expansion = pre + N[j5] + post[k5];
50774
- if (!isTop || isSequence || expansion) {
50775
- expansions.push(expansion);
50814
+ for (var j5 = 0; j5 < N.length; j5++) {
50815
+ for (var k5 = 0; k5 < post.length; k5++) {
50816
+ var expansion = pre + N[j5] + post[k5];
50817
+ if (!isTop || isSequence || expansion)
50818
+ expansions.push(expansion);
50819
+ }
50776
50820
  }
50777
50821
  }
50822
+ return expansions;
50778
50823
  }
50779
50824
  }
50780
- return expansions;
50781
- }
50782
- var escSlash, escOpen, escClose, escComma, escPeriod, escSlashPattern, escOpenPattern, escClosePattern, escCommaPattern, escPeriodPattern, slashPattern, openPattern, closePattern, commaPattern, periodPattern, EXPANSION_MAX;
50783
- var init_esm2 = __esm({
50784
- "node_modules/brace-expansion/dist/esm/index.js"() {
50785
- init_esm();
50786
- escSlash = "\0SLASH" + Math.random() + "\0";
50787
- escOpen = "\0OPEN" + Math.random() + "\0";
50788
- escClose = "\0CLOSE" + Math.random() + "\0";
50789
- escComma = "\0COMMA" + Math.random() + "\0";
50790
- escPeriod = "\0PERIOD" + Math.random() + "\0";
50791
- escSlashPattern = new RegExp(escSlash, "g");
50792
- escOpenPattern = new RegExp(escOpen, "g");
50793
- escClosePattern = new RegExp(escClose, "g");
50794
- escCommaPattern = new RegExp(escComma, "g");
50795
- escPeriodPattern = new RegExp(escPeriod, "g");
50796
- slashPattern = /\\\\/g;
50797
- openPattern = /\\{/g;
50798
- closePattern = /\\}/g;
50799
- commaPattern = /\\,/g;
50800
- periodPattern = /\\./g;
50801
- EXPANSION_MAX = 1e5;
50802
- }
50803
50825
  });
50804
50826
 
50805
50827
  // node_modules/minimatch/dist/esm/assert-valid-pattern.js
@@ -51571,10 +51593,10 @@ var init_escape = __esm({
51571
51593
  });
51572
51594
 
51573
51595
  // node_modules/minimatch/dist/esm/index.js
51574
- var minimatch, starDotExtRE, starDotExtTest, starDotExtTestDot, starDotExtTestNocase, starDotExtTestNocaseDot, starDotStarRE, starDotStarTest, starDotStarTestDot, dotStarRE, dotStarTest, starRE, starTest, starTestDot, qmarksRE, qmarksTestNocase, qmarksTestNocaseDot, qmarksTestDot, qmarksTest, qmarksTestNoExt, qmarksTestNoExtDot, defaultPlatform, path5, sep3, GLOBSTAR, qmark2, star2, twoStarDot, twoStarNoDot, filter, ext, defaults, braceExpand, makeRe, match, globMagic, regExpEscape2, Minimatch;
51575
- var init_esm3 = __esm({
51596
+ var import_brace_expansion, minimatch, starDotExtRE, starDotExtTest, starDotExtTestDot, starDotExtTestNocase, starDotExtTestNocaseDot, starDotStarRE, starDotStarTest, starDotStarTestDot, dotStarRE, dotStarTest, starRE, starTest, starTestDot, qmarksRE, qmarksTestNocase, qmarksTestNocaseDot, qmarksTestDot, qmarksTest, qmarksTestNoExt, qmarksTestNoExtDot, defaultPlatform, path5, sep3, GLOBSTAR, qmark2, star2, twoStarDot, twoStarNoDot, filter, ext, defaults, braceExpand, makeRe, match, globMagic, regExpEscape2, Minimatch;
51597
+ var init_esm = __esm({
51576
51598
  "node_modules/minimatch/dist/esm/index.js"() {
51577
- init_esm2();
51599
+ import_brace_expansion = __toESM(require_brace_expansion(), 1);
51578
51600
  init_assert_valid_pattern();
51579
51601
  init_ast();
51580
51602
  init_escape();
@@ -51697,7 +51719,7 @@ var init_esm3 = __esm({
51697
51719
  if (options.nobrace || !/\{(?:(?!\{).)*\}/.test(pattern)) {
51698
51720
  return [pattern];
51699
51721
  }
51700
- return expand(pattern);
51722
+ return (0, import_brace_expansion.default)(pattern);
51701
51723
  };
51702
51724
  minimatch.braceExpand = braceExpand;
51703
51725
  makeRe = (pattern, options = {}) => new Minimatch(pattern, options).makeRe();
@@ -52373,7 +52395,7 @@ var init_esm3 = __esm({
52373
52395
 
52374
52396
  // node_modules/path-scurry/node_modules/lru-cache/dist/esm/index.js
52375
52397
  var perf, warned, PROCESS, emitWarning, AC, AS, shouldWarn, TYPE, isPosInt, getUintArray, ZeroArray, Stack, LRUCache;
52376
- var init_esm4 = __esm({
52398
+ var init_esm2 = __esm({
52377
52399
  "node_modules/path-scurry/node_modules/lru-cache/dist/esm/index.js"() {
52378
52400
  perf = typeof performance === "object" && performance && typeof performance.now === "function" ? performance : Date;
52379
52401
  warned = /* @__PURE__ */ new Set();
@@ -53747,7 +53769,7 @@ var init_esm4 = __esm({
53747
53769
 
53748
53770
  // node_modules/minipass/dist/esm/index.js
53749
53771
  var import_node_events, import_node_stream, import_node_string_decoder, proc, isStream, isReadable, isWritable, EOF, MAYBE_EMIT_END, EMITTED_END, EMITTING_END, EMITTED_ERROR, CLOSED, READ, FLUSH, FLUSHCHUNK, ENCODING, DECODER, FLOWING, PAUSED, RESUME, BUFFER, PIPES, BUFFERLENGTH, BUFFERPUSH, BUFFERSHIFT, OBJECTMODE, DESTROYED, ERROR, EMITDATA, EMITEND, EMITEND2, ASYNC, ABORT, ABORTED, SIGNAL, DATALISTENERS, DISCARDED, defer, nodefer, isEndish, isArrayBufferLike, isArrayBufferView, Pipe, PipeProxyErrors, isObjectModeOptions, isEncodingOptions, Minipass;
53750
- var init_esm5 = __esm({
53772
+ var init_esm3 = __esm({
53751
53773
  "node_modules/minipass/dist/esm/index.js"() {
53752
53774
  import_node_events = require("node:events");
53753
53775
  import_node_stream = __toESM(require("node:stream"), 1);
@@ -54634,15 +54656,15 @@ var init_esm5 = __esm({
54634
54656
 
54635
54657
  // node_modules/path-scurry/dist/esm/index.js
54636
54658
  var import_node_path, import_node_url, import_fs7, actualFS, import_promises, realpathSync2, defaultFS, fsFromOption, uncDriveRegexp, uncToDrive, eitherSep, UNKNOWN, IFIFO, IFCHR, IFDIR, IFBLK, IFREG, IFLNK, IFSOCK, IFMT, IFMT_UNKNOWN, READDIR_CALLED, LSTAT_CALLED, ENOTDIR, ENOENT, ENOREADLINK, ENOREALPATH, ENOCHILD, TYPEMASK, entToType, normalizeCache, normalize, normalizeNocaseCache, normalizeNocase, ResolveCache, ChildrenCache, setAsCwd, PathBase, PathWin32, PathPosix, PathScurryBase, PathScurryWin32, PathScurryPosix, PathScurryDarwin, Path, PathScurry;
54637
- var init_esm6 = __esm({
54659
+ var init_esm4 = __esm({
54638
54660
  "node_modules/path-scurry/dist/esm/index.js"() {
54639
- init_esm4();
54661
+ init_esm2();
54640
54662
  import_node_path = require("node:path");
54641
54663
  import_node_url = require("node:url");
54642
54664
  import_fs7 = require("fs");
54643
54665
  actualFS = __toESM(require("node:fs"), 1);
54644
54666
  import_promises = require("node:fs/promises");
54645
- init_esm5();
54667
+ init_esm3();
54646
54668
  realpathSync2 = import_fs7.realpathSync.native;
54647
54669
  defaultFS = {
54648
54670
  lstatSync: import_fs7.lstatSync,
@@ -56372,7 +56394,7 @@ var init_esm6 = __esm({
56372
56394
  var isPatternList, isGlobList, Pattern;
56373
56395
  var init_pattern = __esm({
56374
56396
  "node_modules/glob/dist/esm/pattern.js"() {
56375
- init_esm3();
56397
+ init_esm();
56376
56398
  isPatternList = (pl) => pl.length >= 1;
56377
56399
  isGlobList = (gl) => gl.length >= 1;
56378
56400
  Pattern = class _Pattern {
@@ -56543,7 +56565,7 @@ var init_pattern = __esm({
56543
56565
  var defaultPlatform2, Ignore;
56544
56566
  var init_ignore = __esm({
56545
56567
  "node_modules/glob/dist/esm/ignore.js"() {
56546
- init_esm3();
56568
+ init_esm();
56547
56569
  init_pattern();
56548
56570
  defaultPlatform2 = typeof process === "object" && process && typeof process.platform === "string" ? process.platform : "linux";
56549
56571
  Ignore = class {
@@ -56637,7 +56659,7 @@ var init_ignore = __esm({
56637
56659
  var HasWalkedCache, MatchRecord, SubWalks, Processor;
56638
56660
  var init_processor = __esm({
56639
56661
  "node_modules/glob/dist/esm/processor.js"() {
56640
- init_esm3();
56662
+ init_esm();
56641
56663
  HasWalkedCache = class _HasWalkedCache {
56642
56664
  store;
56643
56665
  constructor(store = /* @__PURE__ */ new Map()) {
@@ -56864,7 +56886,7 @@ var init_processor = __esm({
56864
56886
  var makeIgnore, GlobUtil, GlobWalker, GlobStream;
56865
56887
  var init_walker = __esm({
56866
56888
  "node_modules/glob/dist/esm/walker.js"() {
56867
- init_esm5();
56889
+ init_esm3();
56868
56890
  init_ignore();
56869
56891
  init_processor();
56870
56892
  makeIgnore = (ignore2, opts) => typeof ignore2 === "string" ? new Ignore([ignore2], opts) : Array.isArray(ignore2) ? new Ignore(ignore2, opts) : ignore2;
@@ -57199,9 +57221,9 @@ var init_walker = __esm({
57199
57221
  var import_node_url2, defaultPlatform3, Glob;
57200
57222
  var init_glob = __esm({
57201
57223
  "node_modules/glob/dist/esm/glob.js"() {
57202
- init_esm3();
57224
+ init_esm();
57203
57225
  import_node_url2 = require("node:url");
57204
- init_esm6();
57226
+ init_esm4();
57205
57227
  init_pattern();
57206
57228
  init_walker();
57207
57229
  defaultPlatform3 = typeof process === "object" && process && typeof process.platform === "string" ? process.platform : "linux";
@@ -57409,7 +57431,7 @@ var init_glob = __esm({
57409
57431
  var hasMagic;
57410
57432
  var init_has_magic = __esm({
57411
57433
  "node_modules/glob/dist/esm/has-magic.js"() {
57412
- init_esm3();
57434
+ init_esm();
57413
57435
  hasMagic = (pattern, options = {}) => {
57414
57436
  if (!Array.isArray(pattern)) {
57415
57437
  pattern = [pattern];
@@ -57443,12 +57465,12 @@ function globIterate(pattern, options = {}) {
57443
57465
  return new Glob(pattern, options).iterate();
57444
57466
  }
57445
57467
  var streamSync, stream, iterateSync, iterate, sync, glob;
57446
- var init_esm7 = __esm({
57468
+ var init_esm5 = __esm({
57447
57469
  "node_modules/glob/dist/esm/index.js"() {
57448
- init_esm3();
57470
+ init_esm();
57449
57471
  init_glob();
57450
57472
  init_has_magic();
57451
- init_esm3();
57473
+ init_esm();
57452
57474
  init_glob();
57453
57475
  init_has_magic();
57454
57476
  init_ignore();
@@ -58408,7 +58430,7 @@ var init_executePlan = __esm({
58408
58430
  init_query();
58409
58431
  init_extract();
58410
58432
  init_delegate();
58411
- init_esm7();
58433
+ init_esm5();
58412
58434
  init_bash();
58413
58435
  RAW_OUTPUT_START = "<<<RAW_OUTPUT>>>";
58414
58436
  RAW_OUTPUT_END = "<<<END_RAW_OUTPUT>>>";
@@ -59062,7 +59084,7 @@ var init_probeTool = __esm({
59062
59084
  import_fs10 = __toESM(require("fs"), 1);
59063
59085
  import_fs11 = require("fs");
59064
59086
  import_path12 = __toESM(require("path"), 1);
59065
- init_esm7();
59087
+ init_esm5();
59066
59088
  init_symlink_utils();
59067
59089
  toolCallEmitter = new import_events.EventEmitter();
59068
59090
  activeToolExecutions = /* @__PURE__ */ new Map();
@@ -59813,13 +59835,13 @@ var init_index = __esm({
59813
59835
  });
59814
59836
 
59815
59837
  // src/agent/xmlParsingUtils.js
59816
- function removeThinkingTags(xmlString) {
59838
+ function removeThinkingTags(xmlString, validTools = DEFAULT_VALID_TOOLS) {
59817
59839
  let result = xmlString;
59818
59840
  result = result.replace(/<thinking>[\s\S]*?<\/thinking>/g, "");
59819
59841
  const thinkingIndex = result.indexOf("<thinking>");
59820
59842
  if (thinkingIndex !== -1) {
59821
59843
  const afterThinking = result.substring(thinkingIndex + "<thinking>".length);
59822
- const toolPattern = buildToolTagPattern(DEFAULT_VALID_TOOLS);
59844
+ const toolPattern = buildToolTagPattern(validTools);
59823
59845
  const toolMatch = afterThinking.match(toolPattern);
59824
59846
  if (toolMatch) {
59825
59847
  const toolStart = thinkingIndex + "<thinking>".length + toolMatch.index;
@@ -59918,7 +59940,7 @@ function hasOtherToolTags(xmlString, validTools = []) {
59918
59940
  }
59919
59941
  function processXmlWithThinkingAndRecovery(xmlString, validTools = []) {
59920
59942
  const thinkingContent = extractThinkingContent(xmlString);
59921
- const cleanedXmlString = removeThinkingTags(xmlString);
59943
+ const cleanedXmlString = removeThinkingTags(xmlString, validTools.length > 0 ? validTools : void 0);
59922
59944
  const recoveryResult = checkAttemptCompleteRecovery(cleanedXmlString, validTools);
59923
59945
  if (process.env.DEBUG === "1" && thinkingContent) {
59924
59946
  console.log(`[DEBUG] AI Thinking Process:
@@ -65320,23 +65342,23 @@ var init_regexp_parser = __esm({
65320
65342
  return ASSERT_NEVER_REACH_HERE();
65321
65343
  }
65322
65344
  quantifier(isBacktracking = false) {
65323
- let range3 = void 0;
65345
+ let range2 = void 0;
65324
65346
  const begin = this.idx;
65325
65347
  switch (this.popChar()) {
65326
65348
  case "*":
65327
- range3 = {
65349
+ range2 = {
65328
65350
  atLeast: 0,
65329
65351
  atMost: Infinity
65330
65352
  };
65331
65353
  break;
65332
65354
  case "+":
65333
- range3 = {
65355
+ range2 = {
65334
65356
  atLeast: 1,
65335
65357
  atMost: Infinity
65336
65358
  };
65337
65359
  break;
65338
65360
  case "?":
65339
- range3 = {
65361
+ range2 = {
65340
65362
  atLeast: 0,
65341
65363
  atMost: 1
65342
65364
  };
@@ -65345,7 +65367,7 @@ var init_regexp_parser = __esm({
65345
65367
  const atLeast = this.integerIncludingZero();
65346
65368
  switch (this.popChar()) {
65347
65369
  case "}":
65348
- range3 = {
65370
+ range2 = {
65349
65371
  atLeast,
65350
65372
  atMost: atLeast
65351
65373
  };
@@ -65354,12 +65376,12 @@ var init_regexp_parser = __esm({
65354
65376
  let atMost;
65355
65377
  if (this.isDigit()) {
65356
65378
  atMost = this.integerIncludingZero();
65357
- range3 = {
65379
+ range2 = {
65358
65380
  atLeast,
65359
65381
  atMost
65360
65382
  };
65361
65383
  } else {
65362
- range3 = {
65384
+ range2 = {
65363
65385
  atLeast,
65364
65386
  atMost: Infinity
65365
65387
  };
@@ -65367,25 +65389,25 @@ var init_regexp_parser = __esm({
65367
65389
  this.consumeChar("}");
65368
65390
  break;
65369
65391
  }
65370
- if (isBacktracking === true && range3 === void 0) {
65392
+ if (isBacktracking === true && range2 === void 0) {
65371
65393
  return void 0;
65372
65394
  }
65373
- ASSERT_EXISTS(range3);
65395
+ ASSERT_EXISTS(range2);
65374
65396
  break;
65375
65397
  }
65376
- if (isBacktracking === true && range3 === void 0) {
65398
+ if (isBacktracking === true && range2 === void 0) {
65377
65399
  return void 0;
65378
65400
  }
65379
- if (ASSERT_EXISTS(range3)) {
65401
+ if (ASSERT_EXISTS(range2)) {
65380
65402
  if (this.peekChar(0) === "?") {
65381
65403
  this.consumeChar("?");
65382
- range3.greedy = false;
65404
+ range2.greedy = false;
65383
65405
  } else {
65384
- range3.greedy = true;
65406
+ range2.greedy = true;
65385
65407
  }
65386
- range3.type = "Quantifier";
65387
- range3.loc = this.loc(begin);
65388
- return range3;
65408
+ range2.type = "Quantifier";
65409
+ range2.loc = this.loc(begin);
65410
+ return range2;
65389
65411
  }
65390
65412
  }
65391
65413
  atom() {
@@ -66087,18 +66109,18 @@ function firstCharOptimizedIndices(ast, result, ignoreCase) {
66087
66109
  if (typeof code === "number") {
66088
66110
  addOptimizedIdxToResult(code, result, ignoreCase);
66089
66111
  } else {
66090
- const range3 = code;
66112
+ const range2 = code;
66091
66113
  if (ignoreCase === true) {
66092
- for (let rangeCode = range3.from; rangeCode <= range3.to; rangeCode++) {
66114
+ for (let rangeCode = range2.from; rangeCode <= range2.to; rangeCode++) {
66093
66115
  addOptimizedIdxToResult(rangeCode, result, ignoreCase);
66094
66116
  }
66095
66117
  } else {
66096
- for (let rangeCode = range3.from; rangeCode <= range3.to && rangeCode < minOptimizationVal; rangeCode++) {
66118
+ for (let rangeCode = range2.from; rangeCode <= range2.to && rangeCode < minOptimizationVal; rangeCode++) {
66097
66119
  addOptimizedIdxToResult(rangeCode, result, ignoreCase);
66098
66120
  }
66099
- if (range3.to >= minOptimizationVal) {
66100
- const minUnOptVal = range3.from >= minOptimizationVal ? range3.from : minOptimizationVal;
66101
- const maxUnOptVal = range3.to;
66121
+ if (range2.to >= minOptimizationVal) {
66122
+ const minUnOptVal = range2.from >= minOptimizationVal ? range2.from : minOptimizationVal;
66123
+ const maxUnOptVal = range2.to;
66102
66124
  const minOptIdx = charCodeToOptimizedIndex(minUnOptVal);
66103
66125
  const maxOptIdx = charCodeToOptimizedIndex(maxUnOptVal);
66104
66126
  for (let currOptIdx = minOptIdx; currOptIdx <= maxOptIdx; currOptIdx++) {
@@ -66159,8 +66181,8 @@ function findCode(setNode, targetCharCodes) {
66159
66181
  if (typeof codeOrRange === "number") {
66160
66182
  return includes_default(targetCharCodes, codeOrRange);
66161
66183
  } else {
66162
- const range3 = codeOrRange;
66163
- return find_default(targetCharCodes, (targetCode) => range3.from <= targetCode && targetCode <= range3.to) !== void 0;
66184
+ const range2 = codeOrRange;
66185
+ return find_default(targetCharCodes, (targetCode) => range2.from <= targetCode && targetCode <= range2.to) !== void 0;
66164
66186
  }
66165
66187
  });
66166
66188
  }
@@ -84065,8 +84087,8 @@ var require_createRange = __commonJS({
84065
84087
  var require_range = __commonJS({
84066
84088
  "node_modules/lodash/range.js"(exports2, module2) {
84067
84089
  var createRange = require_createRange();
84068
- var range3 = createRange();
84069
- module2.exports = range3;
84090
+ var range2 = createRange();
84091
+ module2.exports = range2;
84070
84092
  }
84071
84093
  });
84072
84094
 
@@ -98919,7 +98941,7 @@ function parseEnabledServers(config) {
98919
98941
  }
98920
98942
  return servers;
98921
98943
  }
98922
- var import_fs12, import_path13, import_os3, import_url4, __filename4, __dirname4, DEFAULT_TIMEOUT, MAX_TIMEOUT, DEFAULT_CONFIG;
98944
+ var import_fs12, import_path13, import_os3, import_url4, __filename4, __dirname5, DEFAULT_TIMEOUT, MAX_TIMEOUT, DEFAULT_CONFIG;
98923
98945
  var init_config = __esm({
98924
98946
  "src/agent/mcp/config.js"() {
98925
98947
  "use strict";
@@ -98928,7 +98950,7 @@ var init_config = __esm({
98928
98950
  import_os3 = require("os");
98929
98951
  import_url4 = require("url");
98930
98952
  __filename4 = (0, import_url4.fileURLToPath)("file:///");
98931
- __dirname4 = (0, import_path13.dirname)(__filename4);
98953
+ __dirname5 = (0, import_path13.dirname)(__filename4);
98932
98954
  DEFAULT_TIMEOUT = 3e4;
98933
98955
  MAX_TIMEOUT = (() => {
98934
98956
  if (process.env.MCP_MAX_TIMEOUT) {
@@ -98942,7 +98964,7 @@ var init_config = __esm({
98942
98964
  // Example probe server configuration
98943
98965
  "probe-local": {
98944
98966
  command: "node",
98945
- args: [(0, import_path13.join)(__dirname4, "../../../examples/chat/mcpServer.js")],
98967
+ args: [(0, import_path13.join)(__dirname5, "../../../examples/chat/mcpServer.js")],
98946
98968
  transport: "stdio",
98947
98969
  enabled: false
98948
98970
  },
@@ -104526,7 +104548,7 @@ var require_compose_scalar = __commonJS({
104526
104548
  var resolveBlockScalar = require_resolve_block_scalar();
104527
104549
  var resolveFlowScalar = require_resolve_flow_scalar();
104528
104550
  function composeScalar(ctx, token, tagToken, onError) {
104529
- const { value, type, comment, range: range3 } = token.type === "block-scalar" ? resolveBlockScalar.resolveBlockScalar(ctx, token, onError) : resolveFlowScalar.resolveFlowScalar(token, ctx.options.strict, onError);
104551
+ const { value, type, comment, range: range2 } = token.type === "block-scalar" ? resolveBlockScalar.resolveBlockScalar(ctx, token, onError) : resolveFlowScalar.resolveFlowScalar(token, ctx.options.strict, onError);
104530
104552
  const tagName = tagToken ? ctx.directives.tagName(tagToken.source, (msg) => onError(tagToken, "TAG_RESOLVE_FAILED", msg)) : null;
104531
104553
  let tag2;
104532
104554
  if (ctx.options.stringKeys && ctx.atKey) {
@@ -104546,7 +104568,7 @@ var require_compose_scalar = __commonJS({
104546
104568
  onError(tagToken ?? token, "TAG_RESOLVE_FAILED", msg);
104547
104569
  scalar = new Scalar.Scalar(value);
104548
104570
  }
104549
- scalar.range = range3;
104571
+ scalar.range = range2;
104550
104572
  scalar.source = value;
104551
104573
  if (type)
104552
104574
  scalar.type = type;