@x-otto/cli 0.0.1-alpha.8 → 0.0.1-alpha.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (28) hide show
  1. package/dist/bundled-extensions/plugin-otto-wire-protocols/plugin-dist/meta.json +1 -1
  2. package/dist/bundled-extensions/plugin-otto-wire-protocols/plugin-dist/plugin.cjs +996 -1306
  3. package/dist/bundled-extensions/plugin-skill-inductor/plugin-dist/meta.json +1 -1
  4. package/dist/bundled-extensions/plugin-skill-inductor/plugin-dist/plugin.cjs +7 -7
  5. package/dist/{command-dispatcher-CR7RCzUl.js → command-dispatcher-Dnh3vtf4.js} +3 -3
  6. package/dist/{command-dispatcher-CR7RCzUl.js.map → command-dispatcher-Dnh3vtf4.js.map} +1 -1
  7. package/dist/{discover-with-bundled-CznLjkkw.js → discover-with-bundled-wSuXDvNc.js} +2 -2
  8. package/dist/{discover-with-bundled-CznLjkkw.js.map → discover-with-bundled-wSuXDvNc.js.map} +1 -1
  9. package/dist/extension-C3AP3KxC.js +2 -0
  10. package/dist/{extension-BKXIr86F.js → extension-DAex6RFK.js} +2 -2
  11. package/dist/{extension-BKXIr86F.js.map → extension-DAex6RFK.js.map} +1 -1
  12. package/dist/{extension-plugin-DH-4D0tt.js → extension-plugin-B10fpJA7.js} +4 -4
  13. package/dist/{extension-plugin-DH-4D0tt.js.map → extension-plugin-B10fpJA7.js.map} +1 -1
  14. package/dist/extension-plugin-Dt5_McoL.js +2 -0
  15. package/dist/{feishu-setup-D6vnuNLw.js → feishu-setup-DIcd3PMK.js} +2 -2
  16. package/dist/{feishu-setup-D6vnuNLw.js.map → feishu-setup-DIcd3PMK.js.map} +1 -1
  17. package/dist/index.d.ts.map +1 -1
  18. package/dist/index.js +11 -11
  19. package/dist/index.js.map +1 -1
  20. package/dist/model-auth-C3gJ1cpD.js +2 -0
  21. package/dist/{model-auth-ylinoVLo.js → model-auth-DvoaqZ1G.js} +2 -2
  22. package/dist/{model-auth-ylinoVLo.js.map → model-auth-DvoaqZ1G.js.map} +1 -1
  23. package/dist/{parse-cli-2Cs-ZcSC.js → parse-cli-CO__I2GZ.js} +2 -2
  24. package/dist/{parse-cli-2Cs-ZcSC.js.map → parse-cli-CO__I2GZ.js.map} +1 -1
  25. package/package.json +3 -3
  26. package/dist/extension-CnON6Xum.js +0 -2
  27. package/dist/extension-plugin-B6WF8HzF.js +0 -2
  28. package/dist/model-auth-7WCx1j-B.js +0 -2
@@ -11346,7 +11346,7 @@ var require_util = __commonJS({
11346
11346
  let val = obj[key];
11347
11347
  if (val !== void 0) {
11348
11348
  if (!Object.hasOwn(obj, key)) {
11349
- const headersValue = typeof headers[i2 + 1] === "string" ? headers[i2 + 1] : Array.isArray(headers[i2 + 1]) ? headers[i2 + 1].map((x6) => x6.toString("latin1")) : headers[i2 + 1].toString("latin1");
11349
+ const headersValue = typeof headers[i2 + 1] === "string" ? headers[i2 + 1] : Array.isArray(headers[i2 + 1]) ? headers[i2 + 1].map((x5) => x5.toString("latin1")) : headers[i2 + 1].toString("latin1");
11350
11350
  if (key === "__proto__") {
11351
11351
  Object.defineProperty(obj, key, {
11352
11352
  value: headersValue,
@@ -11365,7 +11365,7 @@ var require_util = __commonJS({
11365
11365
  val.push(headers[i2 + 1].toString("latin1"));
11366
11366
  }
11367
11367
  } else {
11368
- const headersValue = typeof headers[i2 + 1] === "string" ? headers[i2 + 1] : Array.isArray(headers[i2 + 1]) ? headers[i2 + 1].map((x6) => x6.toString("latin1")) : headers[i2 + 1].toString("latin1");
11368
+ const headersValue = typeof headers[i2 + 1] === "string" ? headers[i2 + 1] : Array.isArray(headers[i2 + 1]) ? headers[i2 + 1].map((x5) => x5.toString("latin1")) : headers[i2 + 1].toString("latin1");
11369
11369
  obj[key] = headersValue;
11370
11370
  }
11371
11371
  }
@@ -11392,13 +11392,13 @@ var require_util = __commonJS({
11392
11392
  const ret = new Array(headersLength);
11393
11393
  let key;
11394
11394
  let val;
11395
- for (let n4 = 0; n4 < headersLength; n4 += 2) {
11396
- key = headers[n4];
11397
- val = headers[n4 + 1];
11395
+ for (let n3 = 0; n3 < headersLength; n3 += 2) {
11396
+ key = headers[n3];
11397
+ val = headers[n3 + 1];
11398
11398
  typeof key !== "string" && (key = key.toString());
11399
11399
  typeof val !== "string" && (val = val.toString("latin1"));
11400
- ret[n4] = key;
11401
- ret[n4 + 1] = val;
11400
+ ret[n3] = key;
11401
+ ret[n3 + 1] = val;
11402
11402
  }
11403
11403
  return ret;
11404
11404
  }
@@ -11419,7 +11419,7 @@ var require_util = __commonJS({
11419
11419
  if (!Array.isArray(headers)) {
11420
11420
  throw new TypeError("expected headers to be an array");
11421
11421
  }
11422
- return headers.map((x6) => Buffer.from(x6));
11422
+ return headers.map((x5) => Buffer.from(x5));
11423
11423
  }
11424
11424
  function isBuffer(buffer) {
11425
11425
  return buffer instanceof Uint8Array || Buffer.isBuffer(buffer);
@@ -12986,7 +12986,7 @@ var require_connect = __commonJS({
12986
12986
  };
12987
12987
  }
12988
12988
  function maybeNormalizeConnectError(err, socket, opts) {
12989
- if (err instanceof AggregateError && (err.code === "ETIMEDOUT" || err.errors.some((e6) => e6 != null && e6.code === "ETIMEDOUT"))) {
12989
+ if (err instanceof AggregateError && (err.code === "ETIMEDOUT" || err.errors.some((e4) => e4 != null && e4.code === "ETIMEDOUT"))) {
12990
12990
  let message = "Connect Timeout Error";
12991
12991
  if (Array.isArray(socket.autoSelectFamilyAttemptedAddresses)) {
12992
12992
  message += ` (attempted addresses: ${socket.autoSelectFamilyAttemptedAddresses.join(", ")},`;
@@ -13370,7 +13370,7 @@ var require_constants2 = __commonJS({
13370
13370
  exports2.METHODS.POST
13371
13371
  ];
13372
13372
  exports2.METHOD_MAP = (0, utils_1.enumToMap)(exports2.METHODS);
13373
- exports2.H_METHOD_MAP = Object.fromEntries(Object.entries(exports2.METHODS).filter(([k6]) => k6.startsWith("H")));
13373
+ exports2.H_METHOD_MAP = Object.fromEntries(Object.entries(exports2.METHODS).filter(([k5]) => k5.startsWith("H")));
13374
13374
  exports2.STATUSES_HTTP = [
13375
13375
  exports2.STATUSES.CONTINUE,
13376
13376
  exports2.STATUSES.SWITCHING_PROTOCOLS,
@@ -14142,21 +14142,21 @@ var require_data_url = __commonJS({
14142
14142
  function percentDecode(input) {
14143
14143
  const length = input.length;
14144
14144
  const output = new Uint8Array(length);
14145
- let j6 = 0;
14145
+ let j5 = 0;
14146
14146
  let i2 = 0;
14147
14147
  while (i2 < length) {
14148
14148
  const byte = input[i2];
14149
14149
  if (byte !== 37) {
14150
- output[j6++] = byte;
14150
+ output[j5++] = byte;
14151
14151
  } else if (byte === 37 && !(isHexCharByte(input[i2 + 1]) && isHexCharByte(input[i2 + 2]))) {
14152
- output[j6++] = 37;
14152
+ output[j5++] = 37;
14153
14153
  } else {
14154
- output[j6++] = hexByteToNumber(input[i2 + 1]) << 4 | hexByteToNumber(input[i2 + 2]);
14154
+ output[j5++] = hexByteToNumber(input[i2 + 1]) << 4 | hexByteToNumber(input[i2 + 2]);
14155
14155
  i2 += 2;
14156
14156
  }
14157
14157
  ++i2;
14158
14158
  }
14159
- return length === j6 ? output : output.subarray(0, j6);
14159
+ return length === j5 ? output : output.subarray(0, j5);
14160
14160
  }
14161
14161
  function parseMIMEType(input) {
14162
14162
  input = removeHTTPWhitespace(input, true, true);
@@ -14385,8 +14385,8 @@ var require_webidl = __commonJS({
14385
14385
  message: `"${context.value}" is an invalid ${context.type}.`
14386
14386
  });
14387
14387
  };
14388
- webidl.brandCheck = function(V3, I5) {
14389
- if (!FunctionPrototypeSymbolHasInstance(I5, V3)) {
14388
+ webidl.brandCheck = function(V3, I4) {
14389
+ if (!FunctionPrototypeSymbolHasInstance(I4, V3)) {
14390
14390
  const err = new TypeError("Illegal invocation");
14391
14391
  err.code = "ERR_INVALID_THIS";
14392
14392
  throw err;
@@ -14416,8 +14416,8 @@ var require_webidl = __commonJS({
14416
14416
  message: "Illegal constructor"
14417
14417
  });
14418
14418
  };
14419
- webidl.util.MakeTypeAssertion = function(I5) {
14420
- return (O5) => FunctionPrototypeSymbolHasInstance(I5, O5);
14419
+ webidl.util.MakeTypeAssertion = function(I4) {
14420
+ return (O4) => FunctionPrototypeSymbolHasInstance(I4, O4);
14421
14421
  };
14422
14422
  webidl.util.Type = function(V3) {
14423
14423
  switch (typeof V3) {
@@ -14452,8 +14452,8 @@ var require_webidl = __commonJS({
14452
14452
  NULL,
14453
14453
  OBJECT
14454
14454
  };
14455
- webidl.util.TypeValueToString = function(o4) {
14456
- switch (webidl.util.Type(o4)) {
14455
+ webidl.util.TypeValueToString = function(o3) {
14456
+ switch (webidl.util.Type(o3)) {
14457
14457
  case UNDEFINED:
14458
14458
  return "Undefined";
14459
14459
  case BOOLEAN:
@@ -14490,51 +14490,51 @@ var require_webidl = __commonJS({
14490
14490
  lowerBound = -Math.pow(2, bitLength - 1);
14491
14491
  upperBound = Math.pow(2, bitLength - 1) - 1;
14492
14492
  }
14493
- let x6 = Number(V3);
14494
- if (x6 === 0) {
14495
- x6 = 0;
14493
+ let x5 = Number(V3);
14494
+ if (x5 === 0) {
14495
+ x5 = 0;
14496
14496
  }
14497
14497
  if (webidl.util.HasFlag(flags, webidl.attributes.EnforceRange)) {
14498
- if (Number.isNaN(x6) || x6 === Number.POSITIVE_INFINITY || x6 === Number.NEGATIVE_INFINITY) {
14498
+ if (Number.isNaN(x5) || x5 === Number.POSITIVE_INFINITY || x5 === Number.NEGATIVE_INFINITY) {
14499
14499
  throw webidl.errors.exception({
14500
14500
  header: "Integer conversion",
14501
14501
  message: `Could not convert ${webidl.util.Stringify(V3)} to an integer.`
14502
14502
  });
14503
14503
  }
14504
- x6 = webidl.util.IntegerPart(x6);
14505
- if (x6 < lowerBound || x6 > upperBound) {
14504
+ x5 = webidl.util.IntegerPart(x5);
14505
+ if (x5 < lowerBound || x5 > upperBound) {
14506
14506
  throw webidl.errors.exception({
14507
14507
  header: "Integer conversion",
14508
- message: `Value must be between ${lowerBound}-${upperBound}, got ${x6}.`
14508
+ message: `Value must be between ${lowerBound}-${upperBound}, got ${x5}.`
14509
14509
  });
14510
14510
  }
14511
- return x6;
14511
+ return x5;
14512
14512
  }
14513
- if (!Number.isNaN(x6) && webidl.util.HasFlag(flags, webidl.attributes.Clamp)) {
14514
- x6 = Math.min(Math.max(x6, lowerBound), upperBound);
14515
- if (Math.floor(x6) % 2 === 0) {
14516
- x6 = Math.floor(x6);
14513
+ if (!Number.isNaN(x5) && webidl.util.HasFlag(flags, webidl.attributes.Clamp)) {
14514
+ x5 = Math.min(Math.max(x5, lowerBound), upperBound);
14515
+ if (Math.floor(x5) % 2 === 0) {
14516
+ x5 = Math.floor(x5);
14517
14517
  } else {
14518
- x6 = Math.ceil(x6);
14518
+ x5 = Math.ceil(x5);
14519
14519
  }
14520
- return x6;
14520
+ return x5;
14521
14521
  }
14522
- if (Number.isNaN(x6) || x6 === 0 && Object.is(0, x6) || x6 === Number.POSITIVE_INFINITY || x6 === Number.NEGATIVE_INFINITY) {
14522
+ if (Number.isNaN(x5) || x5 === 0 && Object.is(0, x5) || x5 === Number.POSITIVE_INFINITY || x5 === Number.NEGATIVE_INFINITY) {
14523
14523
  return 0;
14524
14524
  }
14525
- x6 = webidl.util.IntegerPart(x6);
14526
- x6 = x6 % Math.pow(2, bitLength);
14527
- if (signedness === "signed" && x6 >= Math.pow(2, bitLength - 1)) {
14528
- return x6 - Math.pow(2, bitLength);
14525
+ x5 = webidl.util.IntegerPart(x5);
14526
+ x5 = x5 % Math.pow(2, bitLength);
14527
+ if (signedness === "signed" && x5 >= Math.pow(2, bitLength - 1)) {
14528
+ return x5 - Math.pow(2, bitLength);
14529
14529
  }
14530
- return x6;
14530
+ return x5;
14531
14531
  };
14532
- webidl.util.IntegerPart = function(n4) {
14533
- const r4 = Math.floor(Math.abs(n4));
14534
- if (n4 < 0) {
14535
- return -1 * r4;
14532
+ webidl.util.IntegerPart = function(n3) {
14533
+ const r3 = Math.floor(Math.abs(n3));
14534
+ if (n3 < 0) {
14535
+ return -1 * r3;
14536
14536
  }
14537
- return r4;
14537
+ return r3;
14538
14538
  };
14539
14539
  webidl.util.Stringify = function(V3) {
14540
14540
  const type = webidl.util.Type(V3);
@@ -14594,30 +14594,30 @@ var require_webidl = __commonJS({
14594
14594
  };
14595
14595
  };
14596
14596
  webidl.recordConverter = function(keyConverter, valueConverter) {
14597
- return (O5, prefix, argument) => {
14598
- if (webidl.util.Type(O5) !== OBJECT) {
14597
+ return (O4, prefix, argument) => {
14598
+ if (webidl.util.Type(O4) !== OBJECT) {
14599
14599
  throw webidl.errors.exception({
14600
14600
  header: prefix,
14601
- message: `${argument} ("${webidl.util.TypeValueToString(O5)}") is not an Object.`
14601
+ message: `${argument} ("${webidl.util.TypeValueToString(O4)}") is not an Object.`
14602
14602
  });
14603
14603
  }
14604
14604
  const result = {};
14605
- if (!types.isProxy(O5)) {
14606
- const keys2 = [...Object.getOwnPropertyNames(O5), ...Object.getOwnPropertySymbols(O5)];
14605
+ if (!types.isProxy(O4)) {
14606
+ const keys2 = [...Object.getOwnPropertyNames(O4), ...Object.getOwnPropertySymbols(O4)];
14607
14607
  for (const key of keys2) {
14608
14608
  const keyName = webidl.util.Stringify(key);
14609
14609
  const typedKey = keyConverter(key, prefix, `Key ${keyName} in ${argument}`);
14610
- const typedValue = valueConverter(O5[key], prefix, `${argument}[${keyName}]`);
14610
+ const typedValue = valueConverter(O4[key], prefix, `${argument}[${keyName}]`);
14611
14611
  result[typedKey] = typedValue;
14612
14612
  }
14613
14613
  return result;
14614
14614
  }
14615
- const keys = Reflect.ownKeys(O5);
14615
+ const keys = Reflect.ownKeys(O4);
14616
14616
  for (const key of keys) {
14617
- const desc = Reflect.getOwnPropertyDescriptor(O5, key);
14617
+ const desc = Reflect.getOwnPropertyDescriptor(O4, key);
14618
14618
  if (desc?.enumerable) {
14619
14619
  const typedKey = keyConverter(key, prefix, argument);
14620
- const typedValue = valueConverter(O5[key], prefix, argument);
14620
+ const typedValue = valueConverter(O4[key], prefix, argument);
14621
14621
  result[typedKey] = typedValue;
14622
14622
  }
14623
14623
  }
@@ -14636,7 +14636,7 @@ var require_webidl = __commonJS({
14636
14636
  };
14637
14637
  };
14638
14638
  webidl.dictionaryConverter = function(converters) {
14639
- converters.sort((a4, b6) => (a4.key > b6.key) - (a4.key < b6.key));
14639
+ converters.sort((a3, b5) => (a3.key > b5.key) - (a3.key < b5.key));
14640
14640
  return (dictionary, prefix, argument) => {
14641
14641
  const dict = {};
14642
14642
  if (dictionary != null && webidl.util.Type(dictionary) !== OBJECT) {
@@ -14735,15 +14735,15 @@ var require_webidl = __commonJS({
14735
14735
  message: `${argument} is a symbol, which cannot be converted to a ByteString.`
14736
14736
  });
14737
14737
  }
14738
- const x6 = String(V3);
14739
- for (let index = 0; index < x6.length; index++) {
14740
- if (x6.charCodeAt(index) > 255) {
14738
+ const x5 = String(V3);
14739
+ for (let index = 0; index < x5.length; index++) {
14740
+ if (x5.charCodeAt(index) > 255) {
14741
14741
  throw new TypeError(
14742
- `Cannot convert argument to a ByteString because the character at index ${index} has a value of ${x6.charCodeAt(index)} which is greater than 255.`
14742
+ `Cannot convert argument to a ByteString because the character at index ${index} has a value of ${x5.charCodeAt(index)} which is greater than 255.`
14743
14743
  );
14744
14744
  }
14745
14745
  }
14746
- return x6;
14746
+ return x5;
14747
14747
  };
14748
14748
  webidl.converters.USVString = function(value) {
14749
14749
  if (typeof value === "string") {
@@ -14752,27 +14752,27 @@ var require_webidl = __commonJS({
14752
14752
  return `${value}`.toWellFormed();
14753
14753
  };
14754
14754
  webidl.converters.boolean = function(V3) {
14755
- const x6 = Boolean(V3);
14756
- return x6;
14755
+ const x5 = Boolean(V3);
14756
+ return x5;
14757
14757
  };
14758
14758
  webidl.converters.any = function(V3) {
14759
14759
  return V3;
14760
14760
  };
14761
14761
  webidl.converters["long long"] = function(V3, prefix, argument) {
14762
- const x6 = webidl.util.ConvertToInt(V3, 64, "signed", 0, prefix, argument);
14763
- return x6;
14762
+ const x5 = webidl.util.ConvertToInt(V3, 64, "signed", 0, prefix, argument);
14763
+ return x5;
14764
14764
  };
14765
14765
  webidl.converters["unsigned long long"] = function(V3, prefix, argument) {
14766
- const x6 = webidl.util.ConvertToInt(V3, 64, "unsigned", 0, prefix, argument);
14767
- return x6;
14766
+ const x5 = webidl.util.ConvertToInt(V3, 64, "unsigned", 0, prefix, argument);
14767
+ return x5;
14768
14768
  };
14769
14769
  webidl.converters["unsigned long"] = function(V3, prefix, argument) {
14770
- const x6 = webidl.util.ConvertToInt(V3, 32, "unsigned", 0, prefix, argument);
14771
- return x6;
14770
+ const x5 = webidl.util.ConvertToInt(V3, 32, "unsigned", 0, prefix, argument);
14771
+ return x5;
14772
14772
  };
14773
14773
  webidl.converters["unsigned short"] = function(V3, prefix, argument, flags) {
14774
- const x6 = webidl.util.ConvertToInt(V3, 16, "unsigned", flags, prefix, argument);
14775
- return x6;
14774
+ const x5 = webidl.util.ConvertToInt(V3, 16, "unsigned", flags, prefix, argument);
14775
+ return x5;
14776
14776
  };
14777
14777
  webidl.converters.ArrayBuffer = function(V3, prefix, argument, flags) {
14778
14778
  if (webidl.util.Type(V3) !== OBJECT || !types.isArrayBuffer(V3)) {
@@ -14806,12 +14806,12 @@ var require_webidl = __commonJS({
14806
14806
  }
14807
14807
  return V3;
14808
14808
  };
14809
- webidl.converters.TypedArray = function(V3, T5, prefix, argument, flags) {
14810
- if (webidl.util.Type(V3) !== OBJECT || !types.isTypedArray(V3) || V3.constructor.name !== T5.name) {
14809
+ webidl.converters.TypedArray = function(V3, T4, prefix, argument, flags) {
14810
+ if (webidl.util.Type(V3) !== OBJECT || !types.isTypedArray(V3) || V3.constructor.name !== T4.name) {
14811
14811
  throw webidl.errors.conversionFailed({
14812
14812
  prefix,
14813
14813
  argument: `${argument} ("${webidl.util.Stringify(V3)}")`,
14814
- types: [T5.name]
14814
+ types: [T4.name]
14815
14815
  });
14816
14816
  }
14817
14817
  if (!webidl.util.HasFlag(flags, webidl.attributes.AllowShared) && types.isSharedArrayBuffer(V3.buffer)) {
@@ -15263,11 +15263,11 @@ var require_util2 = __commonJS({
15263
15263
  }
15264
15264
  function tryUpgradeRequestToAPotentiallyTrustworthyURL(request) {
15265
15265
  }
15266
- function sameOrigin(A5, B3) {
15267
- if (A5.origin === B3.origin && A5.origin === "null") {
15266
+ function sameOrigin(A4, B3) {
15267
+ if (A4.origin === B3.origin && A4.origin === "null") {
15268
15268
  return true;
15269
15269
  }
15270
- if (A5.protocol === B3.protocol && A5.hostname === B3.hostname && A5.port === B3.port) {
15270
+ if (A4.protocol === B3.protocol && A4.hostname === B3.hostname && A4.port === B3.port) {
15271
15271
  return true;
15272
15272
  }
15273
15273
  return false;
@@ -15414,8 +15414,8 @@ var require_util2 = __commonJS({
15414
15414
  try {
15415
15415
  const reader = body.stream.getReader();
15416
15416
  readAllBytes(reader, successSteps, errorSteps);
15417
- } catch (e6) {
15418
- errorSteps(e6);
15417
+ } catch (e4) {
15418
+ errorSteps(e4);
15419
15419
  }
15420
15420
  }
15421
15421
  function readableStreamClose(controller) {
@@ -15445,8 +15445,8 @@ var require_util2 = __commonJS({
15445
15445
  bytes.push(chunk);
15446
15446
  byteLength += chunk.length;
15447
15447
  } while (true);
15448
- } catch (e6) {
15449
- failureSteps(e6);
15448
+ } catch (e4) {
15449
+ failureSteps(e4);
15450
15450
  }
15451
15451
  }
15452
15452
  function urlIsLocal(url2) {
@@ -15886,17 +15886,17 @@ var require_formdata = __commonJS({
15886
15886
  }
15887
15887
  }
15888
15888
  [nodeUtil.inspect.custom](depth, options) {
15889
- const state = this.#state.reduce((a4, b6) => {
15890
- if (a4[b6.name]) {
15891
- if (Array.isArray(a4[b6.name])) {
15892
- a4[b6.name].push(b6.value);
15889
+ const state = this.#state.reduce((a3, b5) => {
15890
+ if (a3[b5.name]) {
15891
+ if (Array.isArray(a3[b5.name])) {
15892
+ a3[b5.name].push(b5.value);
15893
15893
  } else {
15894
- a4[b6.name] = [a4[b6.name], b6.value];
15894
+ a3[b5.name] = [a3[b5.name], b5.value];
15895
15895
  }
15896
15896
  } else {
15897
- a4[b6.name] = b6.value;
15897
+ a3[b5.name] = b5.value;
15898
15898
  }
15899
- return a4;
15899
+ return a3;
15900
15900
  }, { __proto__: null });
15901
15901
  options.depth ??= depth;
15902
15902
  options.colors ??= true;
@@ -16551,8 +16551,8 @@ Content-Type: ${value.type || "application/octet-stream"}\r
16551
16551
  function consumeBody(object2, convertBytesToJSValue, instance, getInternalState) {
16552
16552
  try {
16553
16553
  webidl.brandCheck(object2, instance);
16554
- } catch (e6) {
16555
- return Promise.reject(e6);
16554
+ } catch (e4) {
16555
+ return Promise.reject(e4);
16556
16556
  }
16557
16557
  object2 = getInternalState(object2);
16558
16558
  if (bodyUnusable(object2)) {
@@ -16563,8 +16563,8 @@ Content-Type: ${value.type || "application/octet-stream"}\r
16563
16563
  const successSteps = (data) => {
16564
16564
  try {
16565
16565
  promise2.resolve(convertBytesToJSValue(data));
16566
- } catch (e6) {
16567
- errorSteps(e6);
16566
+ } catch (e4) {
16567
+ errorSteps(e4);
16568
16568
  }
16569
16569
  };
16570
16570
  if (object2.body == null) {
@@ -17550,9 +17550,9 @@ upgrade: ${upgrade}\r
17550
17550
  header += "connection: close\r\n";
17551
17551
  }
17552
17552
  if (Array.isArray(headers)) {
17553
- for (let n4 = 0; n4 < headers.length; n4 += 2) {
17554
- const key = headers[n4 + 0];
17555
- const val = headers[n4 + 1];
17553
+ for (let n3 = 0; n3 < headers.length; n3 += 2) {
17554
+ const key = headers[n3 + 0];
17555
+ const val = headers[n3 + 1];
17556
17556
  if (Array.isArray(val)) {
17557
17557
  for (let i2 = 0; i2 < val.length; i2++) {
17558
17558
  header += `${key}: ${val[i2]}\r
@@ -18410,9 +18410,9 @@ var require_client_h2 = __commonJS({
18410
18410
  }
18411
18411
  function buildRequestHeaders(reqHeaders) {
18412
18412
  const headers = {};
18413
- for (let n4 = 0; n4 < reqHeaders.length; n4 += 2) {
18414
- const key = reqHeaders[n4 + 0];
18415
- const val = reqHeaders[n4 + 1];
18413
+ for (let n3 = 0; n3 < reqHeaders.length; n3 += 2) {
18414
+ const key = reqHeaders[n3 + 0];
18415
+ const val = reqHeaders[n3 + 1];
18416
18416
  const current = headers[key];
18417
18417
  if (key === "cookie") {
18418
18418
  if (current != null) {
@@ -19984,14 +19984,14 @@ var require_balanced_pool = __commonJS({
19984
19984
  var kWeight = /* @__PURE__ */ Symbol("kWeight");
19985
19985
  var kMaxWeightPerServer = /* @__PURE__ */ Symbol("kMaxWeightPerServer");
19986
19986
  var kErrorPenalty = /* @__PURE__ */ Symbol("kErrorPenalty");
19987
- function getGreatestCommonDivisor(a4, b6) {
19988
- if (a4 === 0) return b6;
19989
- while (b6 !== 0) {
19990
- const t4 = b6;
19991
- b6 = a4 % b6;
19992
- a4 = t4;
19987
+ function getGreatestCommonDivisor(a3, b5) {
19988
+ if (a3 === 0) return b5;
19989
+ while (b5 !== 0) {
19990
+ const t3 = b5;
19991
+ b5 = a3 % b5;
19992
+ a3 = t3;
19993
19993
  }
19994
- return a4;
19994
+ return a3;
19995
19995
  }
19996
19996
  function defaultFactory(origin, opts) {
19997
19997
  return new Pool(origin, opts);
@@ -22334,8 +22334,8 @@ var require_readable = __commonJS({
22334
22334
  } else if (state.bufferIndex) {
22335
22335
  const start = state.bufferIndex;
22336
22336
  const end = state.buffer.length;
22337
- for (let n4 = start; n4 < end; n4++) {
22338
- consumePush(consume2, state.buffer[n4]);
22337
+ for (let n3 = start; n3 < end; n3++) {
22338
+ consumePush(consume2, state.buffer[n3]);
22339
22339
  }
22340
22340
  } else {
22341
22341
  for (const chunk of state.buffer) {
@@ -23580,8 +23580,8 @@ var require_mock_utils = __commonJS({
23580
23580
  const value = data[key];
23581
23581
  const name = Buffer.from(`${key}`);
23582
23582
  if (Array.isArray(value)) {
23583
- for (let j6 = 0; j6 < value.length; ++j6) {
23584
- result.push(name, Buffer.from(`${value[j6]}`));
23583
+ for (let j5 = 0; j5 < value.length; ++j5) {
23584
+ result.push(name, Buffer.from(`${value[j5]}`));
23585
23585
  }
23586
23586
  } else {
23587
23587
  result.push(name, Buffer.from(`${value}`));
@@ -26196,11 +26196,11 @@ var require_cache = __commonJS({
26196
26196
  } else if (typeof opts.headers === "object") {
26197
26197
  headers = {};
26198
26198
  if (hasSafeIterator(opts.headers)) {
26199
- for (const x6 of opts.headers) {
26200
- if (!Array.isArray(x6)) {
26199
+ for (const x5 of opts.headers) {
26200
+ if (!Array.isArray(x5)) {
26201
26201
  throw new Error("opts.headers is not a valid header map");
26202
26202
  }
26203
- const [key, val] = x6;
26203
+ const [key, val] = x5;
26204
26204
  if (typeof key !== "string" || typeof val !== "string") {
26205
26205
  throw new Error("opts.headers is not a valid header map");
26206
26206
  }
@@ -26303,8 +26303,8 @@ var require_cache = __commonJS({
26303
26303
  const headers = [value.substring(1)];
26304
26304
  let foundEndingQuote = value[value.length - 1] === '"';
26305
26305
  if (!foundEndingQuote) {
26306
- for (let j6 = i2 + 1; j6 < directives.length; j6++) {
26307
- const nextPart = directives[j6];
26306
+ for (let j5 = i2 + 1; j5 < directives.length; j5++) {
26307
+ const nextPart = directives[j5];
26308
26308
  const nextPartLength = nextPart.length;
26309
26309
  headers.push(nextPart.trim());
26310
26310
  if (nextPartLength !== 0 && nextPart[nextPartLength - 1] === '"') {
@@ -26319,8 +26319,8 @@ var require_cache = __commonJS({
26319
26319
  lastHeader = lastHeader.substring(0, lastHeader.length - 1);
26320
26320
  headers[headers.length - 1] = lastHeader;
26321
26321
  }
26322
- for (let j6 = 0; j6 < headers.length; j6++) {
26323
- headers[j6] = headers[j6].trim();
26322
+ for (let j5 = 0; j5 < headers.length; j5++) {
26323
+ headers[j5] = headers[j5].trim();
26324
26324
  }
26325
26325
  if (key in output) {
26326
26326
  output[key] = output[key].concat(headers);
@@ -28958,7 +28958,7 @@ var require_sqlite_cache_store = __commonJS({
28958
28958
  if (lhs.length !== rhs.length) {
28959
28959
  return false;
28960
28960
  }
28961
- return lhs.every((x6, i2) => x6 === rhs[i2]);
28961
+ return lhs.every((x5, i2) => x5 === rhs[i2]);
28962
28962
  }
28963
28963
  return lhs === rhs;
28964
28964
  }
@@ -28984,10 +28984,10 @@ var require_headers = __commonJS({
28984
28984
  }
28985
28985
  function headerValueNormalize(potentialValue) {
28986
28986
  let i2 = 0;
28987
- let j6 = potentialValue.length;
28988
- while (j6 > i2 && isHTTPWhiteSpaceCharCode(potentialValue.charCodeAt(j6 - 1))) --j6;
28989
- while (j6 > i2 && isHTTPWhiteSpaceCharCode(potentialValue.charCodeAt(i2))) ++i2;
28990
- return i2 === 0 && j6 === potentialValue.length ? potentialValue : potentialValue.substring(i2, j6);
28987
+ let j5 = potentialValue.length;
28988
+ while (j5 > i2 && isHTTPWhiteSpaceCharCode(potentialValue.charCodeAt(j5 - 1))) --j5;
28989
+ while (j5 > i2 && isHTTPWhiteSpaceCharCode(potentialValue.charCodeAt(i2))) ++i2;
28990
+ return i2 === 0 && j5 === potentialValue.length ? potentialValue : potentialValue.substring(i2, j5);
28991
28991
  }
28992
28992
  function fill(headers, object2) {
28993
28993
  if (Array.isArray(object2)) {
@@ -29051,8 +29051,8 @@ var require_headers = __commonJS({
29051
29051
  for (let i2 = 0; i2 < names.length; ++i2) {
29052
29052
  const { 0: name, 1: value } = names[i2];
29053
29053
  if (name === "set-cookie") {
29054
- for (let j6 = 0; j6 < cookies.length; ++j6) {
29055
- headers.push([name, cookies[j6]]);
29054
+ for (let j5 = 0; j5 < cookies.length; ++j5) {
29055
+ headers.push([name, cookies[j5]]);
29056
29056
  }
29057
29057
  } else {
29058
29058
  headers.push([name, value]);
@@ -29060,8 +29060,8 @@ var require_headers = __commonJS({
29060
29060
  }
29061
29061
  return headersList.sortedMap = headers;
29062
29062
  }
29063
- function compareHeaderName(a4, b6) {
29064
- return a4[0] < b6[0] ? -1 : 1;
29063
+ function compareHeaderName(a3, b5) {
29064
+ return a3[0] < b5[0] ? -1 : 1;
29065
29065
  }
29066
29066
  var HeadersList = class _HeadersList {
29067
29067
  /** @type {[string, string][]|null} */
@@ -29194,26 +29194,26 @@ var require_headers = __commonJS({
29194
29194
  const firstValue = iterator.next().value;
29195
29195
  array2[0] = [firstValue[0], firstValue[1].value];
29196
29196
  assert2(firstValue[1].value !== null);
29197
- for (let i2 = 1, j6 = 0, right = 0, left = 0, pivot = 0, x6, value; i2 < size; ++i2) {
29197
+ for (let i2 = 1, j5 = 0, right = 0, left = 0, pivot = 0, x5, value; i2 < size; ++i2) {
29198
29198
  value = iterator.next().value;
29199
- x6 = array2[i2] = [value[0], value[1].value];
29200
- assert2(x6[1] !== null);
29199
+ x5 = array2[i2] = [value[0], value[1].value];
29200
+ assert2(x5[1] !== null);
29201
29201
  left = 0;
29202
29202
  right = i2;
29203
29203
  while (left < right) {
29204
29204
  pivot = left + (right - left >> 1);
29205
- if (array2[pivot][0] <= x6[0]) {
29205
+ if (array2[pivot][0] <= x5[0]) {
29206
29206
  left = pivot + 1;
29207
29207
  } else {
29208
29208
  right = pivot;
29209
29209
  }
29210
29210
  }
29211
29211
  if (i2 !== pivot) {
29212
- j6 = i2;
29213
- while (j6 > left) {
29214
- array2[j6] = array2[--j6];
29212
+ j5 = i2;
29213
+ while (j5 > left) {
29214
+ array2[j5] = array2[--j5];
29215
29215
  }
29216
- array2[left] = x6;
29216
+ array2[left] = x5;
29217
29217
  }
29218
29218
  }
29219
29219
  if (!iterator.next().done) {
@@ -29351,17 +29351,17 @@ var require_headers = __commonJS({
29351
29351
  options.depth ??= depth;
29352
29352
  return `Headers ${util.formatWithOptions(options, this.#headersList.entries)}`;
29353
29353
  }
29354
- static getHeadersGuard(o4) {
29355
- return o4.#guard;
29354
+ static getHeadersGuard(o3) {
29355
+ return o3.#guard;
29356
29356
  }
29357
- static setHeadersGuard(o4, guard) {
29358
- o4.#guard = guard;
29357
+ static setHeadersGuard(o3, guard) {
29358
+ o3.#guard = guard;
29359
29359
  }
29360
29360
  /**
29361
29361
  * @param {Headers} o
29362
29362
  */
29363
- static getHeadersList(o4) {
29364
- return o4.#headersList;
29363
+ static getHeadersList(o3) {
29364
+ return o3.#headersList;
29365
29365
  }
29366
29366
  /**
29367
29367
  * @param {Headers} target
@@ -30899,8 +30899,8 @@ var require_fetch = __commonJS({
30899
30899
  let requestObject;
30900
30900
  try {
30901
30901
  requestObject = new Request(input, init);
30902
- } catch (e6) {
30903
- p.reject(e6);
30902
+ } catch (e4) {
30903
+ p.reject(e4);
30904
30904
  return p.promise;
30905
30905
  }
30906
30906
  const request = getRequestState(requestObject);
@@ -31636,14 +31636,14 @@ var require_fetch = __commonJS({
31636
31636
  fetchParams.processRequestEndOfBody();
31637
31637
  }
31638
31638
  };
31639
- const processBodyError = (e6) => {
31639
+ const processBodyError = (e4) => {
31640
31640
  if (isCancelled(fetchParams)) {
31641
31641
  return;
31642
31642
  }
31643
- if (e6.name === "AbortError") {
31643
+ if (e4.name === "AbortError") {
31644
31644
  fetchParams.controller.abort();
31645
31645
  } else {
31646
- fetchParams.controller.terminate(e6);
31646
+ fetchParams.controller.terminate(e4);
31647
31647
  }
31648
31648
  };
31649
31649
  requestBody = (async function* () {
@@ -31920,8 +31920,8 @@ var require_util3 = __commonJS({
31920
31920
  var assert2 = require("node:assert");
31921
31921
  var { URLSerializer } = require_data_url();
31922
31922
  var { isValidHeaderName } = require_util2();
31923
- function urlEquals(A5, B3, excludeFragment = false) {
31924
- const serializedA = URLSerializer(A5, excludeFragment);
31923
+ function urlEquals(A4, B3, excludeFragment = false) {
31924
+ const serializedA = URLSerializer(A4, excludeFragment);
31925
31925
  const serializedB = URLSerializer(B3, excludeFragment);
31926
31926
  return serializedA === serializedB;
31927
31927
  }
@@ -32015,8 +32015,8 @@ var require_cache3 = __commonJS({
32015
32015
  if (typeof request === "string") {
32016
32016
  continue;
32017
32017
  }
32018
- const r4 = getRequestState(request);
32019
- if (!urlIsHttpHttpsScheme(r4.url) || r4.method !== "GET") {
32018
+ const r3 = getRequestState(request);
32019
+ if (!urlIsHttpHttpsScheme(r3.url) || r3.method !== "GET") {
32020
32020
  throw webidl.errors.exception({
32021
32021
  header: prefix,
32022
32022
  message: "Expected http/s scheme when method is not GET."
@@ -32025,19 +32025,19 @@ var require_cache3 = __commonJS({
32025
32025
  }
32026
32026
  const fetchControllers = [];
32027
32027
  for (const request of requests) {
32028
- const r4 = getRequestState(new Request(request));
32029
- if (!urlIsHttpHttpsScheme(r4.url)) {
32028
+ const r3 = getRequestState(new Request(request));
32029
+ if (!urlIsHttpHttpsScheme(r3.url)) {
32030
32030
  throw webidl.errors.exception({
32031
32031
  header: prefix,
32032
32032
  message: "Expected http/s scheme."
32033
32033
  });
32034
32034
  }
32035
- r4.initiator = "fetch";
32036
- r4.destination = "subresource";
32037
- requestList.push(r4);
32035
+ r3.initiator = "fetch";
32036
+ r3.destination = "subresource";
32037
+ requestList.push(r3);
32038
32038
  const responsePromise = Promise.withResolvers();
32039
32039
  fetchControllers.push(fetching({
32040
- request: r4,
32040
+ request: r3,
32041
32041
  processResponse(response) {
32042
32042
  if (response.type === "error" || response.status === 206 || response.status < 200 || response.status > 299) {
32043
32043
  responsePromise.reject(webidl.errors.exception({
@@ -32090,8 +32090,8 @@ var require_cache3 = __commonJS({
32090
32090
  let errorData = null;
32091
32091
  try {
32092
32092
  this.#batchCacheOperations(operations);
32093
- } catch (e6) {
32094
- errorData = e6;
32093
+ } catch (e4) {
32094
+ errorData = e4;
32095
32095
  }
32096
32096
  queueMicrotask(() => {
32097
32097
  if (errorData === null) {
@@ -32171,8 +32171,8 @@ var require_cache3 = __commonJS({
32171
32171
  let errorData = null;
32172
32172
  try {
32173
32173
  this.#batchCacheOperations(operations);
32174
- } catch (e6) {
32175
- errorData = e6;
32174
+ } catch (e4) {
32175
+ errorData = e4;
32176
32176
  }
32177
32177
  queueMicrotask(() => {
32178
32178
  if (errorData === null) {
@@ -32189,20 +32189,20 @@ var require_cache3 = __commonJS({
32189
32189
  webidl.argumentLengthCheck(arguments, 1, prefix);
32190
32190
  request = webidl.converters.RequestInfo(request);
32191
32191
  options = webidl.converters.CacheQueryOptions(options, prefix, "options");
32192
- let r4 = null;
32192
+ let r3 = null;
32193
32193
  if (webidl.is.Request(request)) {
32194
- r4 = getRequestState(request);
32195
- if (r4.method !== "GET" && !options.ignoreMethod) {
32194
+ r3 = getRequestState(request);
32195
+ if (r3.method !== "GET" && !options.ignoreMethod) {
32196
32196
  return false;
32197
32197
  }
32198
32198
  } else {
32199
32199
  assert2(typeof request === "string");
32200
- r4 = getRequestState(new Request(request));
32200
+ r3 = getRequestState(new Request(request));
32201
32201
  }
32202
32202
  const operations = [];
32203
32203
  const operation = {
32204
32204
  type: "delete",
32205
- request: r4,
32205
+ request: r3,
32206
32206
  options
32207
32207
  };
32208
32208
  operations.push(operation);
@@ -32211,8 +32211,8 @@ var require_cache3 = __commonJS({
32211
32211
  let requestResponses;
32212
32212
  try {
32213
32213
  requestResponses = this.#batchCacheOperations(operations);
32214
- } catch (e6) {
32215
- errorData = e6;
32214
+ } catch (e4) {
32215
+ errorData = e4;
32216
32216
  }
32217
32217
  queueMicrotask(() => {
32218
32218
  if (errorData === null) {
@@ -32234,15 +32234,15 @@ var require_cache3 = __commonJS({
32234
32234
  const prefix = "Cache.keys";
32235
32235
  if (request !== void 0) request = webidl.converters.RequestInfo(request);
32236
32236
  options = webidl.converters.CacheQueryOptions(options, prefix, "options");
32237
- let r4 = null;
32237
+ let r3 = null;
32238
32238
  if (request !== void 0) {
32239
32239
  if (webidl.is.Request(request)) {
32240
- r4 = getRequestState(request);
32241
- if (r4.method !== "GET" && !options.ignoreMethod) {
32240
+ r3 = getRequestState(request);
32241
+ if (r3.method !== "GET" && !options.ignoreMethod) {
32242
32242
  return [];
32243
32243
  }
32244
32244
  } else if (typeof request === "string") {
32245
- r4 = getRequestState(new Request(request));
32245
+ r3 = getRequestState(new Request(request));
32246
32246
  }
32247
32247
  }
32248
32248
  const promise2 = Promise.withResolvers();
@@ -32252,7 +32252,7 @@ var require_cache3 = __commonJS({
32252
32252
  requests.push(requestResponse[0]);
32253
32253
  }
32254
32254
  } else {
32255
- const requestResponses = this.#queryCache(r4, options);
32255
+ const requestResponses = this.#queryCache(r3, options);
32256
32256
  for (const requestResponse of requestResponses) {
32257
32257
  requests.push(requestResponse[0]);
32258
32258
  }
@@ -32317,14 +32317,14 @@ var require_cache3 = __commonJS({
32317
32317
  message: "put operation should have an associated response"
32318
32318
  });
32319
32319
  }
32320
- const r4 = operation.request;
32321
- if (!urlIsHttpHttpsScheme(r4.url)) {
32320
+ const r3 = operation.request;
32321
+ if (!urlIsHttpHttpsScheme(r3.url)) {
32322
32322
  throw webidl.errors.exception({
32323
32323
  header: "Cache.#batchCacheOperations",
32324
32324
  message: "expected http or https scheme"
32325
32325
  });
32326
32326
  }
32327
- if (r4.method !== "GET") {
32327
+ if (r3.method !== "GET") {
32328
32328
  throw webidl.errors.exception({
32329
32329
  header: "Cache.#batchCacheOperations",
32330
32330
  message: "not get method"
@@ -32348,10 +32348,10 @@ var require_cache3 = __commonJS({
32348
32348
  resultList.push([operation.request, operation.response]);
32349
32349
  }
32350
32350
  return resultList;
32351
- } catch (e6) {
32351
+ } catch (e4) {
32352
32352
  this.#relevantRequestResponseList.length = 0;
32353
32353
  this.#relevantRequestResponseList = backupCache;
32354
- throw e6;
32354
+ throw e4;
32355
32355
  }
32356
32356
  }
32357
32357
  /**
@@ -32407,15 +32407,15 @@ var require_cache3 = __commonJS({
32407
32407
  return true;
32408
32408
  }
32409
32409
  #internalMatchAll(request, options, maxResponses = Infinity) {
32410
- let r4 = null;
32410
+ let r3 = null;
32411
32411
  if (request !== void 0) {
32412
32412
  if (webidl.is.Request(request)) {
32413
- r4 = getRequestState(request);
32414
- if (r4.method !== "GET" && !options.ignoreMethod) {
32413
+ r3 = getRequestState(request);
32414
+ if (r3.method !== "GET" && !options.ignoreMethod) {
32415
32415
  return [];
32416
32416
  }
32417
32417
  } else if (typeof request === "string") {
32418
- r4 = getRequestState(new Request(request));
32418
+ r3 = getRequestState(new Request(request));
32419
32419
  }
32420
32420
  }
32421
32421
  const responses = [];
@@ -32424,7 +32424,7 @@ var require_cache3 = __commonJS({
32424
32424
  responses.push(requestResponse[1]);
32425
32425
  }
32426
32426
  } else {
32427
- const requestResponses = this.#queryCache(r4, options);
32427
+ const requestResponses = this.#queryCache(r3, options);
32428
32428
  for (const requestResponse of requestResponses) {
32429
32429
  responses.push(requestResponse[1]);
32430
32430
  }
@@ -33401,8 +33401,8 @@ var require_util5 = __commonJS({
33401
33401
  function isClosed(readyState) {
33402
33402
  return readyState === states.CLOSED;
33403
33403
  }
33404
- function fireEvent(e6, target, eventFactory = (type, init) => new Event(type, init), eventInitDict = {}) {
33405
- const event = eventFactory(e6, eventInitDict);
33404
+ function fireEvent(e4, target, eventFactory = (type, init) => new Event(type, init), eventInitDict = {}) {
33405
+ const event = eventFactory(e4, eventInitDict);
33406
33406
  target.dispatchEvent(event);
33407
33407
  }
33408
33408
  function websocketMessageReceived(handler, type, data) {
@@ -33494,8 +33494,8 @@ var require_util5 = __commonJS({
33494
33494
  let urlRecord;
33495
33495
  try {
33496
33496
  urlRecord = new URL(url2, baseURL);
33497
- } catch (e6) {
33498
- throw new DOMException(e6, "SyntaxError");
33497
+ } catch (e4) {
33498
+ throw new DOMException(e4, "SyntaxError");
33499
33499
  }
33500
33500
  if (urlRecord.protocol === "http:") {
33501
33501
  urlRecord.protocol = "ws:";
@@ -34123,31 +34123,31 @@ var require_receiver = __commonJS({
34123
34123
  * @param {number} n
34124
34124
  * @returns {Buffer}
34125
34125
  */
34126
- consume(n4) {
34127
- if (n4 > this.#byteOffset) {
34126
+ consume(n3) {
34127
+ if (n3 > this.#byteOffset) {
34128
34128
  throw new Error("Called consume() before buffers satiated.");
34129
- } else if (n4 === 0) {
34129
+ } else if (n3 === 0) {
34130
34130
  return emptyBuffer;
34131
34131
  }
34132
- this.#byteOffset -= n4;
34132
+ this.#byteOffset -= n3;
34133
34133
  const first = this.#buffers[0];
34134
- if (first.length > n4) {
34135
- this.#buffers[0] = first.subarray(n4, first.length);
34136
- return first.subarray(0, n4);
34137
- } else if (first.length === n4) {
34134
+ if (first.length > n3) {
34135
+ this.#buffers[0] = first.subarray(n3, first.length);
34136
+ return first.subarray(0, n3);
34137
+ } else if (first.length === n3) {
34138
34138
  return this.#buffers.shift();
34139
34139
  } else {
34140
34140
  let offset = 0;
34141
- const buffer = Buffer.allocUnsafeSlow(n4);
34142
- while (offset !== n4) {
34141
+ const buffer = Buffer.allocUnsafeSlow(n3);
34142
+ while (offset !== n3) {
34143
34143
  const next = this.#buffers[0];
34144
34144
  const length = next.length;
34145
- if (length + offset === n4) {
34145
+ if (length + offset === n3) {
34146
34146
  buffer.set(this.#buffers.shift(), offset);
34147
34147
  break;
34148
- } else if (length + offset > n4) {
34149
- buffer.set(next.subarray(0, n4 - offset), offset);
34150
- this.#buffers[0] = next.subarray(n4 - offset);
34148
+ } else if (length + offset > n3) {
34149
+ buffer.set(next.subarray(0, n3 - offset), offset);
34150
+ this.#buffers[0] = next.subarray(n3 - offset);
34151
34151
  break;
34152
34152
  } else {
34153
34153
  buffer.set(this.#buffers.shift(), offset);
@@ -35062,8 +35062,8 @@ var require_websocketstream = __commonJS({
35062
35062
  let string4;
35063
35063
  try {
35064
35064
  string4 = webidl.converters.DOMString(chunk);
35065
- } catch (e6) {
35066
- promise2.reject(e6);
35065
+ } catch (e4) {
35066
+ promise2.reject(e4);
35067
35067
  return promise2.promise;
35068
35068
  }
35069
35069
  data = new TextEncoder().encode(string4);
@@ -35671,8 +35671,8 @@ var require_eventsource = __commonJS({
35671
35671
  try {
35672
35672
  urlRecord = new URL(url2, settings.settingsObject.baseUrl);
35673
35673
  this.#state.origin = urlRecord.origin;
35674
- } catch (e6) {
35675
- throw new DOMException(e6, "SyntaxError");
35674
+ } catch (e4) {
35675
+ throw new DOMException(e4, "SyntaxError");
35676
35676
  }
35677
35677
  this.#url = urlRecord.href;
35678
35678
  let corsAttributeState = ANONYMOUS;
@@ -36165,7 +36165,7 @@ var require_re = __commonJS({
36165
36165
  var safeRe = exports2.safeRe = [];
36166
36166
  var src = exports2.src = [];
36167
36167
  var safeSrc = exports2.safeSrc = [];
36168
- var t4 = exports2.t = {};
36168
+ var t3 = exports2.t = {};
36169
36169
  var R3 = 0;
36170
36170
  var LETTERDASHNUMBER = "[a-zA-Z0-9-]";
36171
36171
  var safeRegexReplacements = [
@@ -36183,7 +36183,7 @@ var require_re = __commonJS({
36183
36183
  const safe = makeSafeRegex(value);
36184
36184
  const index = R3++;
36185
36185
  debug(name, index, value);
36186
- t4[name] = index;
36186
+ t3[name] = index;
36187
36187
  src[index] = value;
36188
36188
  safeSrc[index] = safe;
36189
36189
  re2[index] = new RegExp(value, isGlobal ? "g" : void 0);
@@ -36192,46 +36192,46 @@ var require_re = __commonJS({
36192
36192
  createToken("NUMERICIDENTIFIER", "0|[1-9]\\d*");
36193
36193
  createToken("NUMERICIDENTIFIERLOOSE", "\\d+");
36194
36194
  createToken("NONNUMERICIDENTIFIER", `\\d*[a-zA-Z-]${LETTERDASHNUMBER}*`);
36195
- createToken("MAINVERSION", `(${src[t4.NUMERICIDENTIFIER]})\\.(${src[t4.NUMERICIDENTIFIER]})\\.(${src[t4.NUMERICIDENTIFIER]})`);
36196
- createToken("MAINVERSIONLOOSE", `(${src[t4.NUMERICIDENTIFIERLOOSE]})\\.(${src[t4.NUMERICIDENTIFIERLOOSE]})\\.(${src[t4.NUMERICIDENTIFIERLOOSE]})`);
36197
- createToken("PRERELEASEIDENTIFIER", `(?:${src[t4.NONNUMERICIDENTIFIER]}|${src[t4.NUMERICIDENTIFIER]})`);
36198
- createToken("PRERELEASEIDENTIFIERLOOSE", `(?:${src[t4.NONNUMERICIDENTIFIER]}|${src[t4.NUMERICIDENTIFIERLOOSE]})`);
36199
- createToken("PRERELEASE", `(?:-(${src[t4.PRERELEASEIDENTIFIER]}(?:\\.${src[t4.PRERELEASEIDENTIFIER]})*))`);
36200
- createToken("PRERELEASELOOSE", `(?:-?(${src[t4.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${src[t4.PRERELEASEIDENTIFIERLOOSE]})*))`);
36195
+ createToken("MAINVERSION", `(${src[t3.NUMERICIDENTIFIER]})\\.(${src[t3.NUMERICIDENTIFIER]})\\.(${src[t3.NUMERICIDENTIFIER]})`);
36196
+ createToken("MAINVERSIONLOOSE", `(${src[t3.NUMERICIDENTIFIERLOOSE]})\\.(${src[t3.NUMERICIDENTIFIERLOOSE]})\\.(${src[t3.NUMERICIDENTIFIERLOOSE]})`);
36197
+ createToken("PRERELEASEIDENTIFIER", `(?:${src[t3.NONNUMERICIDENTIFIER]}|${src[t3.NUMERICIDENTIFIER]})`);
36198
+ createToken("PRERELEASEIDENTIFIERLOOSE", `(?:${src[t3.NONNUMERICIDENTIFIER]}|${src[t3.NUMERICIDENTIFIERLOOSE]})`);
36199
+ createToken("PRERELEASE", `(?:-(${src[t3.PRERELEASEIDENTIFIER]}(?:\\.${src[t3.PRERELEASEIDENTIFIER]})*))`);
36200
+ createToken("PRERELEASELOOSE", `(?:-?(${src[t3.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${src[t3.PRERELEASEIDENTIFIERLOOSE]})*))`);
36201
36201
  createToken("BUILDIDENTIFIER", `${LETTERDASHNUMBER}+`);
36202
- createToken("BUILD", `(?:\\+(${src[t4.BUILDIDENTIFIER]}(?:\\.${src[t4.BUILDIDENTIFIER]})*))`);
36203
- createToken("FULLPLAIN", `v?${src[t4.MAINVERSION]}${src[t4.PRERELEASE]}?${src[t4.BUILD]}?`);
36204
- createToken("FULL", `^${src[t4.FULLPLAIN]}$`);
36205
- createToken("LOOSEPLAIN", `[v=\\s]*${src[t4.MAINVERSIONLOOSE]}${src[t4.PRERELEASELOOSE]}?${src[t4.BUILD]}?`);
36206
- createToken("LOOSE", `^${src[t4.LOOSEPLAIN]}$`);
36202
+ createToken("BUILD", `(?:\\+(${src[t3.BUILDIDENTIFIER]}(?:\\.${src[t3.BUILDIDENTIFIER]})*))`);
36203
+ createToken("FULLPLAIN", `v?${src[t3.MAINVERSION]}${src[t3.PRERELEASE]}?${src[t3.BUILD]}?`);
36204
+ createToken("FULL", `^${src[t3.FULLPLAIN]}$`);
36205
+ createToken("LOOSEPLAIN", `[v=\\s]*${src[t3.MAINVERSIONLOOSE]}${src[t3.PRERELEASELOOSE]}?${src[t3.BUILD]}?`);
36206
+ createToken("LOOSE", `^${src[t3.LOOSEPLAIN]}$`);
36207
36207
  createToken("GTLT", "((?:<|>)?=?)");
36208
- createToken("XRANGEIDENTIFIERLOOSE", `${src[t4.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);
36209
- createToken("XRANGEIDENTIFIER", `${src[t4.NUMERICIDENTIFIER]}|x|X|\\*`);
36210
- createToken("XRANGEPLAIN", `[v=\\s]*(${src[t4.XRANGEIDENTIFIER]})(?:\\.(${src[t4.XRANGEIDENTIFIER]})(?:\\.(${src[t4.XRANGEIDENTIFIER]})(?:${src[t4.PRERELEASE]})?${src[t4.BUILD]}?)?)?`);
36211
- createToken("XRANGEPLAINLOOSE", `[v=\\s]*(${src[t4.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t4.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t4.XRANGEIDENTIFIERLOOSE]})(?:${src[t4.PRERELEASELOOSE]})?${src[t4.BUILD]}?)?)?`);
36212
- createToken("XRANGE", `^${src[t4.GTLT]}\\s*${src[t4.XRANGEPLAIN]}$`);
36213
- createToken("XRANGELOOSE", `^${src[t4.GTLT]}\\s*${src[t4.XRANGEPLAINLOOSE]}$`);
36208
+ createToken("XRANGEIDENTIFIERLOOSE", `${src[t3.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);
36209
+ createToken("XRANGEIDENTIFIER", `${src[t3.NUMERICIDENTIFIER]}|x|X|\\*`);
36210
+ createToken("XRANGEPLAIN", `[v=\\s]*(${src[t3.XRANGEIDENTIFIER]})(?:\\.(${src[t3.XRANGEIDENTIFIER]})(?:\\.(${src[t3.XRANGEIDENTIFIER]})(?:${src[t3.PRERELEASE]})?${src[t3.BUILD]}?)?)?`);
36211
+ createToken("XRANGEPLAINLOOSE", `[v=\\s]*(${src[t3.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t3.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t3.XRANGEIDENTIFIERLOOSE]})(?:${src[t3.PRERELEASELOOSE]})?${src[t3.BUILD]}?)?)?`);
36212
+ createToken("XRANGE", `^${src[t3.GTLT]}\\s*${src[t3.XRANGEPLAIN]}$`);
36213
+ createToken("XRANGELOOSE", `^${src[t3.GTLT]}\\s*${src[t3.XRANGEPLAINLOOSE]}$`);
36214
36214
  createToken("COERCEPLAIN", `${"(^|[^\\d])(\\d{1,"}${MAX_SAFE_COMPONENT_LENGTH}})(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?`);
36215
- createToken("COERCE", `${src[t4.COERCEPLAIN]}(?:$|[^\\d])`);
36216
- createToken("COERCEFULL", src[t4.COERCEPLAIN] + `(?:${src[t4.PRERELEASE]})?(?:${src[t4.BUILD]})?(?:$|[^\\d])`);
36217
- createToken("COERCERTL", src[t4.COERCE], true);
36218
- createToken("COERCERTLFULL", src[t4.COERCEFULL], true);
36215
+ createToken("COERCE", `${src[t3.COERCEPLAIN]}(?:$|[^\\d])`);
36216
+ createToken("COERCEFULL", src[t3.COERCEPLAIN] + `(?:${src[t3.PRERELEASE]})?(?:${src[t3.BUILD]})?(?:$|[^\\d])`);
36217
+ createToken("COERCERTL", src[t3.COERCE], true);
36218
+ createToken("COERCERTLFULL", src[t3.COERCEFULL], true);
36219
36219
  createToken("LONETILDE", "(?:~>?)");
36220
- createToken("TILDETRIM", `(\\s*)${src[t4.LONETILDE]}\\s+`, true);
36220
+ createToken("TILDETRIM", `(\\s*)${src[t3.LONETILDE]}\\s+`, true);
36221
36221
  exports2.tildeTrimReplace = "$1~";
36222
- createToken("TILDE", `^${src[t4.LONETILDE]}${src[t4.XRANGEPLAIN]}$`);
36223
- createToken("TILDELOOSE", `^${src[t4.LONETILDE]}${src[t4.XRANGEPLAINLOOSE]}$`);
36222
+ createToken("TILDE", `^${src[t3.LONETILDE]}${src[t3.XRANGEPLAIN]}$`);
36223
+ createToken("TILDELOOSE", `^${src[t3.LONETILDE]}${src[t3.XRANGEPLAINLOOSE]}$`);
36224
36224
  createToken("LONECARET", "(?:\\^)");
36225
- createToken("CARETTRIM", `(\\s*)${src[t4.LONECARET]}\\s+`, true);
36225
+ createToken("CARETTRIM", `(\\s*)${src[t3.LONECARET]}\\s+`, true);
36226
36226
  exports2.caretTrimReplace = "$1^";
36227
- createToken("CARET", `^${src[t4.LONECARET]}${src[t4.XRANGEPLAIN]}$`);
36228
- createToken("CARETLOOSE", `^${src[t4.LONECARET]}${src[t4.XRANGEPLAINLOOSE]}$`);
36229
- createToken("COMPARATORLOOSE", `^${src[t4.GTLT]}\\s*(${src[t4.LOOSEPLAIN]})$|^$`);
36230
- createToken("COMPARATOR", `^${src[t4.GTLT]}\\s*(${src[t4.FULLPLAIN]})$|^$`);
36231
- createToken("COMPARATORTRIM", `(\\s*)${src[t4.GTLT]}\\s*(${src[t4.LOOSEPLAIN]}|${src[t4.XRANGEPLAIN]})`, true);
36227
+ createToken("CARET", `^${src[t3.LONECARET]}${src[t3.XRANGEPLAIN]}$`);
36228
+ createToken("CARETLOOSE", `^${src[t3.LONECARET]}${src[t3.XRANGEPLAINLOOSE]}$`);
36229
+ createToken("COMPARATORLOOSE", `^${src[t3.GTLT]}\\s*(${src[t3.LOOSEPLAIN]})$|^$`);
36230
+ createToken("COMPARATOR", `^${src[t3.GTLT]}\\s*(${src[t3.FULLPLAIN]})$|^$`);
36231
+ createToken("COMPARATORTRIM", `(\\s*)${src[t3.GTLT]}\\s*(${src[t3.LOOSEPLAIN]}|${src[t3.XRANGEPLAIN]})`, true);
36232
36232
  exports2.comparatorTrimReplace = "$1$2$3";
36233
- createToken("HYPHENRANGE", `^\\s*(${src[t4.XRANGEPLAIN]})\\s+-\\s+(${src[t4.XRANGEPLAIN]})\\s*$`);
36234
- createToken("HYPHENRANGELOOSE", `^\\s*(${src[t4.XRANGEPLAINLOOSE]})\\s+-\\s+(${src[t4.XRANGEPLAINLOOSE]})\\s*$`);
36233
+ createToken("HYPHENRANGE", `^\\s*(${src[t3.XRANGEPLAIN]})\\s+-\\s+(${src[t3.XRANGEPLAIN]})\\s*$`);
36234
+ createToken("HYPHENRANGELOOSE", `^\\s*(${src[t3.XRANGEPLAINLOOSE]})\\s+-\\s+(${src[t3.XRANGEPLAINLOOSE]})\\s*$`);
36235
36235
  createToken("STAR", "(<|>)?=?\\s*\\*");
36236
36236
  createToken("GTE0", "^\\s*>=\\s*0\\.0\\.0\\s*$");
36237
36237
  createToken("GTE0PRE", "^\\s*>=\\s*0\\.0\\.0-0\\s*$");
@@ -36262,19 +36262,19 @@ var require_identifiers = __commonJS({
36262
36262
  "../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/internal/identifiers.js"(exports2, module2) {
36263
36263
  "use strict";
36264
36264
  var numeric = /^[0-9]+$/;
36265
- var compareIdentifiers = (a4, b6) => {
36266
- if (typeof a4 === "number" && typeof b6 === "number") {
36267
- return a4 === b6 ? 0 : a4 < b6 ? -1 : 1;
36265
+ var compareIdentifiers = (a3, b5) => {
36266
+ if (typeof a3 === "number" && typeof b5 === "number") {
36267
+ return a3 === b5 ? 0 : a3 < b5 ? -1 : 1;
36268
36268
  }
36269
- const anum = numeric.test(a4);
36270
- const bnum = numeric.test(b6);
36269
+ const anum = numeric.test(a3);
36270
+ const bnum = numeric.test(b5);
36271
36271
  if (anum && bnum) {
36272
- a4 = +a4;
36273
- b6 = +b6;
36272
+ a3 = +a3;
36273
+ b5 = +b5;
36274
36274
  }
36275
- return a4 === b6 ? 0 : anum && !bnum ? -1 : bnum && !anum ? 1 : a4 < b6 ? -1 : 1;
36275
+ return a3 === b5 ? 0 : anum && !bnum ? -1 : bnum && !anum ? 1 : a3 < b5 ? -1 : 1;
36276
36276
  };
36277
- var rcompareIdentifiers = (a4, b6) => compareIdentifiers(b6, a4);
36277
+ var rcompareIdentifiers = (a3, b5) => compareIdentifiers(b5, a3);
36278
36278
  module2.exports = {
36279
36279
  compareIdentifiers,
36280
36280
  rcompareIdentifiers
@@ -36288,7 +36288,7 @@ var require_semver = __commonJS({
36288
36288
  "use strict";
36289
36289
  var debug = require_debug();
36290
36290
  var { MAX_LENGTH, MAX_SAFE_INTEGER } = require_constants6();
36291
- var { safeRe: re2, t: t4 } = require_re();
36291
+ var { safeRe: re2, t: t3 } = require_re();
36292
36292
  var parseOptions = require_parse_options();
36293
36293
  var { compareIdentifiers } = require_identifiers();
36294
36294
  var SemVer = class _SemVer {
@@ -36312,7 +36312,7 @@ var require_semver = __commonJS({
36312
36312
  this.options = options;
36313
36313
  this.loose = !!options.loose;
36314
36314
  this.includePrerelease = !!options.includePrerelease;
36315
- const m = version2.trim().match(options.loose ? re2[t4.LOOSE] : re2[t4.FULL]);
36315
+ const m = version2.trim().match(options.loose ? re2[t3.LOOSE] : re2[t3.FULL]);
36316
36316
  if (!m) {
36317
36317
  throw new TypeError(`Invalid Version: ${version2}`);
36318
36318
  }
@@ -36405,19 +36405,19 @@ var require_semver = __commonJS({
36405
36405
  }
36406
36406
  let i2 = 0;
36407
36407
  do {
36408
- const a4 = this.prerelease[i2];
36409
- const b6 = other.prerelease[i2];
36410
- debug("prerelease compare", i2, a4, b6);
36411
- if (a4 === void 0 && b6 === void 0) {
36408
+ const a3 = this.prerelease[i2];
36409
+ const b5 = other.prerelease[i2];
36410
+ debug("prerelease compare", i2, a3, b5);
36411
+ if (a3 === void 0 && b5 === void 0) {
36412
36412
  return 0;
36413
- } else if (b6 === void 0) {
36413
+ } else if (b5 === void 0) {
36414
36414
  return 1;
36415
- } else if (a4 === void 0) {
36415
+ } else if (a3 === void 0) {
36416
36416
  return -1;
36417
- } else if (a4 === b6) {
36417
+ } else if (a3 === b5) {
36418
36418
  continue;
36419
36419
  } else {
36420
- return compareIdentifiers(a4, b6);
36420
+ return compareIdentifiers(a3, b5);
36421
36421
  }
36422
36422
  } while (++i2);
36423
36423
  }
@@ -36427,19 +36427,19 @@ var require_semver = __commonJS({
36427
36427
  }
36428
36428
  let i2 = 0;
36429
36429
  do {
36430
- const a4 = this.build[i2];
36431
- const b6 = other.build[i2];
36432
- debug("build compare", i2, a4, b6);
36433
- if (a4 === void 0 && b6 === void 0) {
36430
+ const a3 = this.build[i2];
36431
+ const b5 = other.build[i2];
36432
+ debug("build compare", i2, a3, b5);
36433
+ if (a3 === void 0 && b5 === void 0) {
36434
36434
  return 0;
36435
- } else if (b6 === void 0) {
36435
+ } else if (b5 === void 0) {
36436
36436
  return 1;
36437
- } else if (a4 === void 0) {
36437
+ } else if (a3 === void 0) {
36438
36438
  return -1;
36439
- } else if (a4 === b6) {
36439
+ } else if (a3 === b5) {
36440
36440
  continue;
36441
36441
  } else {
36442
- return compareIdentifiers(a4, b6);
36442
+ return compareIdentifiers(a3, b5);
36443
36443
  }
36444
36444
  } while (++i2);
36445
36445
  }
@@ -36451,7 +36451,7 @@ var require_semver = __commonJS({
36451
36451
  throw new Error("invalid increment argument: identifier is empty");
36452
36452
  }
36453
36453
  if (identifier) {
36454
- const match = `-${identifier}`.match(this.options.loose ? re2[t4.PRERELEASELOOSE] : re2[t4.PRERELEASE]);
36454
+ const match = `-${identifier}`.match(this.options.loose ? re2[t3.PRERELEASELOOSE] : re2[t3.PRERELEASE]);
36455
36455
  if (!match || match[1] !== identifier) {
36456
36456
  throw new Error(`invalid identifier: ${identifier}`);
36457
36457
  }
@@ -36602,8 +36602,8 @@ var require_clean = __commonJS({
36602
36602
  "use strict";
36603
36603
  var parse3 = require_parse2();
36604
36604
  var clean = (version2, options) => {
36605
- const s4 = parse3(version2.trim().replace(/^[=v]+/, ""), options);
36606
- return s4 ? s4.version : null;
36605
+ const s3 = parse3(version2.trim().replace(/^[=v]+/, ""), options);
36606
+ return s3 ? s3.version : null;
36607
36607
  };
36608
36608
  module2.exports = clean;
36609
36609
  }
@@ -36682,7 +36682,7 @@ var require_major = __commonJS({
36682
36682
  "../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/major.js"(exports2, module2) {
36683
36683
  "use strict";
36684
36684
  var SemVer = require_semver();
36685
- var major = (a4, loose) => new SemVer(a4, loose).major;
36685
+ var major = (a3, loose) => new SemVer(a3, loose).major;
36686
36686
  module2.exports = major;
36687
36687
  }
36688
36688
  });
@@ -36692,7 +36692,7 @@ var require_minor = __commonJS({
36692
36692
  "../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/minor.js"(exports2, module2) {
36693
36693
  "use strict";
36694
36694
  var SemVer = require_semver();
36695
- var minor = (a4, loose) => new SemVer(a4, loose).minor;
36695
+ var minor = (a3, loose) => new SemVer(a3, loose).minor;
36696
36696
  module2.exports = minor;
36697
36697
  }
36698
36698
  });
@@ -36702,7 +36702,7 @@ var require_patch = __commonJS({
36702
36702
  "../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/patch.js"(exports2, module2) {
36703
36703
  "use strict";
36704
36704
  var SemVer = require_semver();
36705
- var patch = (a4, loose) => new SemVer(a4, loose).patch;
36705
+ var patch = (a3, loose) => new SemVer(a3, loose).patch;
36706
36706
  module2.exports = patch;
36707
36707
  }
36708
36708
  });
@@ -36725,7 +36725,7 @@ var require_compare = __commonJS({
36725
36725
  "../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/compare.js"(exports2, module2) {
36726
36726
  "use strict";
36727
36727
  var SemVer = require_semver();
36728
- var compare = (a4, b6, loose) => new SemVer(a4, loose).compare(new SemVer(b6, loose));
36728
+ var compare = (a3, b5, loose) => new SemVer(a3, loose).compare(new SemVer(b5, loose));
36729
36729
  module2.exports = compare;
36730
36730
  }
36731
36731
  });
@@ -36735,7 +36735,7 @@ var require_rcompare = __commonJS({
36735
36735
  "../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/rcompare.js"(exports2, module2) {
36736
36736
  "use strict";
36737
36737
  var compare = require_compare();
36738
- var rcompare = (a4, b6, loose) => compare(b6, a4, loose);
36738
+ var rcompare = (a3, b5, loose) => compare(b5, a3, loose);
36739
36739
  module2.exports = rcompare;
36740
36740
  }
36741
36741
  });
@@ -36745,7 +36745,7 @@ var require_compare_loose = __commonJS({
36745
36745
  "../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/compare-loose.js"(exports2, module2) {
36746
36746
  "use strict";
36747
36747
  var compare = require_compare();
36748
- var compareLoose = (a4, b6) => compare(a4, b6, true);
36748
+ var compareLoose = (a3, b5) => compare(a3, b5, true);
36749
36749
  module2.exports = compareLoose;
36750
36750
  }
36751
36751
  });
@@ -36755,9 +36755,9 @@ var require_compare_build = __commonJS({
36755
36755
  "../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/compare-build.js"(exports2, module2) {
36756
36756
  "use strict";
36757
36757
  var SemVer = require_semver();
36758
- var compareBuild = (a4, b6, loose) => {
36759
- const versionA = new SemVer(a4, loose);
36760
- const versionB = new SemVer(b6, loose);
36758
+ var compareBuild = (a3, b5, loose) => {
36759
+ const versionA = new SemVer(a3, loose);
36760
+ const versionB = new SemVer(b5, loose);
36761
36761
  return versionA.compare(versionB) || versionA.compareBuild(versionB);
36762
36762
  };
36763
36763
  module2.exports = compareBuild;
@@ -36769,7 +36769,7 @@ var require_sort = __commonJS({
36769
36769
  "../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/sort.js"(exports2, module2) {
36770
36770
  "use strict";
36771
36771
  var compareBuild = require_compare_build();
36772
- var sort = (list, loose) => list.sort((a4, b6) => compareBuild(a4, b6, loose));
36772
+ var sort = (list, loose) => list.sort((a3, b5) => compareBuild(a3, b5, loose));
36773
36773
  module2.exports = sort;
36774
36774
  }
36775
36775
  });
@@ -36779,7 +36779,7 @@ var require_rsort = __commonJS({
36779
36779
  "../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/rsort.js"(exports2, module2) {
36780
36780
  "use strict";
36781
36781
  var compareBuild = require_compare_build();
36782
- var rsort = (list, loose) => list.sort((a4, b6) => compareBuild(b6, a4, loose));
36782
+ var rsort = (list, loose) => list.sort((a3, b5) => compareBuild(b5, a3, loose));
36783
36783
  module2.exports = rsort;
36784
36784
  }
36785
36785
  });
@@ -36789,8 +36789,8 @@ var require_gt = __commonJS({
36789
36789
  "../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/gt.js"(exports2, module2) {
36790
36790
  "use strict";
36791
36791
  var compare = require_compare();
36792
- var gt3 = (a4, b6, loose) => compare(a4, b6, loose) > 0;
36793
- module2.exports = gt3;
36792
+ var gt2 = (a3, b5, loose) => compare(a3, b5, loose) > 0;
36793
+ module2.exports = gt2;
36794
36794
  }
36795
36795
  });
36796
36796
 
@@ -36799,7 +36799,7 @@ var require_lt = __commonJS({
36799
36799
  "../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/lt.js"(exports2, module2) {
36800
36800
  "use strict";
36801
36801
  var compare = require_compare();
36802
- var lt2 = (a4, b6, loose) => compare(a4, b6, loose) < 0;
36802
+ var lt2 = (a3, b5, loose) => compare(a3, b5, loose) < 0;
36803
36803
  module2.exports = lt2;
36804
36804
  }
36805
36805
  });
@@ -36809,7 +36809,7 @@ var require_eq = __commonJS({
36809
36809
  "../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/eq.js"(exports2, module2) {
36810
36810
  "use strict";
36811
36811
  var compare = require_compare();
36812
- var eq = (a4, b6, loose) => compare(a4, b6, loose) === 0;
36812
+ var eq = (a3, b5, loose) => compare(a3, b5, loose) === 0;
36813
36813
  module2.exports = eq;
36814
36814
  }
36815
36815
  });
@@ -36819,7 +36819,7 @@ var require_neq = __commonJS({
36819
36819
  "../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/neq.js"(exports2, module2) {
36820
36820
  "use strict";
36821
36821
  var compare = require_compare();
36822
- var neq = (a4, b6, loose) => compare(a4, b6, loose) !== 0;
36822
+ var neq = (a3, b5, loose) => compare(a3, b5, loose) !== 0;
36823
36823
  module2.exports = neq;
36824
36824
  }
36825
36825
  });
@@ -36829,7 +36829,7 @@ var require_gte = __commonJS({
36829
36829
  "../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/gte.js"(exports2, module2) {
36830
36830
  "use strict";
36831
36831
  var compare = require_compare();
36832
- var gte = (a4, b6, loose) => compare(a4, b6, loose) >= 0;
36832
+ var gte = (a3, b5, loose) => compare(a3, b5, loose) >= 0;
36833
36833
  module2.exports = gte;
36834
36834
  }
36835
36835
  });
@@ -36839,7 +36839,7 @@ var require_lte = __commonJS({
36839
36839
  "../../node_modules/.pnpm/semver@7.7.4/node_modules/semver/functions/lte.js"(exports2, module2) {
36840
36840
  "use strict";
36841
36841
  var compare = require_compare();
36842
- var lte = (a4, b6, loose) => compare(a4, b6, loose) <= 0;
36842
+ var lte = (a3, b5, loose) => compare(a3, b5, loose) <= 0;
36843
36843
  module2.exports = lte;
36844
36844
  }
36845
36845
  });
@@ -36850,42 +36850,42 @@ var require_cmp = __commonJS({
36850
36850
  "use strict";
36851
36851
  var eq = require_eq();
36852
36852
  var neq = require_neq();
36853
- var gt3 = require_gt();
36853
+ var gt2 = require_gt();
36854
36854
  var gte = require_gte();
36855
36855
  var lt2 = require_lt();
36856
36856
  var lte = require_lte();
36857
- var cmp = (a4, op, b6, loose) => {
36857
+ var cmp = (a3, op, b5, loose) => {
36858
36858
  switch (op) {
36859
36859
  case "===":
36860
- if (typeof a4 === "object") {
36861
- a4 = a4.version;
36860
+ if (typeof a3 === "object") {
36861
+ a3 = a3.version;
36862
36862
  }
36863
- if (typeof b6 === "object") {
36864
- b6 = b6.version;
36863
+ if (typeof b5 === "object") {
36864
+ b5 = b5.version;
36865
36865
  }
36866
- return a4 === b6;
36866
+ return a3 === b5;
36867
36867
  case "!==":
36868
- if (typeof a4 === "object") {
36869
- a4 = a4.version;
36868
+ if (typeof a3 === "object") {
36869
+ a3 = a3.version;
36870
36870
  }
36871
- if (typeof b6 === "object") {
36872
- b6 = b6.version;
36871
+ if (typeof b5 === "object") {
36872
+ b5 = b5.version;
36873
36873
  }
36874
- return a4 !== b6;
36874
+ return a3 !== b5;
36875
36875
  case "":
36876
36876
  case "=":
36877
36877
  case "==":
36878
- return eq(a4, b6, loose);
36878
+ return eq(a3, b5, loose);
36879
36879
  case "!=":
36880
- return neq(a4, b6, loose);
36880
+ return neq(a3, b5, loose);
36881
36881
  case ">":
36882
- return gt3(a4, b6, loose);
36882
+ return gt2(a3, b5, loose);
36883
36883
  case ">=":
36884
- return gte(a4, b6, loose);
36884
+ return gte(a3, b5, loose);
36885
36885
  case "<":
36886
- return lt2(a4, b6, loose);
36886
+ return lt2(a3, b5, loose);
36887
36887
  case "<=":
36888
- return lte(a4, b6, loose);
36888
+ return lte(a3, b5, loose);
36889
36889
  default:
36890
36890
  throw new TypeError(`Invalid operator: ${op}`);
36891
36891
  }
@@ -36900,7 +36900,7 @@ var require_coerce = __commonJS({
36900
36900
  "use strict";
36901
36901
  var SemVer = require_semver();
36902
36902
  var parse3 = require_parse2();
36903
- var { safeRe: re2, t: t4 } = require_re();
36903
+ var { safeRe: re2, t: t3 } = require_re();
36904
36904
  var coerce = (version2, options) => {
36905
36905
  if (version2 instanceof SemVer) {
36906
36906
  return version2;
@@ -36914,9 +36914,9 @@ var require_coerce = __commonJS({
36914
36914
  options = options || {};
36915
36915
  let match = null;
36916
36916
  if (!options.rtl) {
36917
- match = version2.match(options.includePrerelease ? re2[t4.COERCEFULL] : re2[t4.COERCE]);
36917
+ match = version2.match(options.includePrerelease ? re2[t3.COERCEFULL] : re2[t3.COERCE]);
36918
36918
  } else {
36919
- const coerceRtlRegex = options.includePrerelease ? re2[t4.COERCERTLFULL] : re2[t4.COERCERTL];
36919
+ const coerceRtlRegex = options.includePrerelease ? re2[t3.COERCERTLFULL] : re2[t3.COERCERTL];
36920
36920
  let next;
36921
36921
  while ((next = coerceRtlRegex.exec(version2)) && (!match || match.index + match[0].length !== version2.length)) {
36922
36922
  if (!match || next.index + next[0].length !== match.index + match[0].length) {
@@ -37003,7 +37003,7 @@ var require_range = __commonJS({
37003
37003
  this.loose = !!options.loose;
37004
37004
  this.includePrerelease = !!options.includePrerelease;
37005
37005
  this.raw = range.trim().replace(SPACE_CHARACTERS, " ");
37006
- this.set = this.raw.split("||").map((r4) => this.parseRange(r4.trim())).filter((c2) => c2.length);
37006
+ this.set = this.raw.split("||").map((r3) => this.parseRange(r3.trim())).filter((c2) => c2.length);
37007
37007
  if (!this.set.length) {
37008
37008
  throw new TypeError(`Invalid SemVer Range: ${this.raw}`);
37009
37009
  }
@@ -37031,11 +37031,11 @@ var require_range = __commonJS({
37031
37031
  this.formatted += "||";
37032
37032
  }
37033
37033
  const comps = this.set[i2];
37034
- for (let k6 = 0; k6 < comps.length; k6++) {
37035
- if (k6 > 0) {
37034
+ for (let k5 = 0; k5 < comps.length; k5++) {
37035
+ if (k5 > 0) {
37036
37036
  this.formatted += " ";
37037
37037
  }
37038
- this.formatted += comps[k6].toString().trim();
37038
+ this.formatted += comps[k5].toString().trim();
37039
37039
  }
37040
37040
  }
37041
37041
  }
@@ -37055,20 +37055,20 @@ var require_range = __commonJS({
37055
37055
  return cached2;
37056
37056
  }
37057
37057
  const loose = this.options.loose;
37058
- const hr = loose ? re2[t4.HYPHENRANGELOOSE] : re2[t4.HYPHENRANGE];
37058
+ const hr = loose ? re2[t3.HYPHENRANGELOOSE] : re2[t3.HYPHENRANGE];
37059
37059
  range = range.replace(hr, hyphenReplace(this.options.includePrerelease));
37060
37060
  debug("hyphen replace", range);
37061
- range = range.replace(re2[t4.COMPARATORTRIM], comparatorTrimReplace);
37061
+ range = range.replace(re2[t3.COMPARATORTRIM], comparatorTrimReplace);
37062
37062
  debug("comparator trim", range);
37063
- range = range.replace(re2[t4.TILDETRIM], tildeTrimReplace);
37063
+ range = range.replace(re2[t3.TILDETRIM], tildeTrimReplace);
37064
37064
  debug("tilde trim", range);
37065
- range = range.replace(re2[t4.CARETTRIM], caretTrimReplace);
37065
+ range = range.replace(re2[t3.CARETTRIM], caretTrimReplace);
37066
37066
  debug("caret trim", range);
37067
37067
  let rangeList = range.split(" ").map((comp) => parseComparator(comp, this.options)).join(" ").split(/\s+/).map((comp) => replaceGTE0(comp, this.options));
37068
37068
  if (loose) {
37069
37069
  rangeList = rangeList.filter((comp) => {
37070
37070
  debug("loose invalid filter", comp, this.options);
37071
- return !!comp.match(re2[t4.COMPARATORLOOSE]);
37071
+ return !!comp.match(re2[t3.COMPARATORLOOSE]);
37072
37072
  });
37073
37073
  }
37074
37074
  debug("range list", rangeList);
@@ -37130,7 +37130,7 @@ var require_range = __commonJS({
37130
37130
  var SemVer = require_semver();
37131
37131
  var {
37132
37132
  safeRe: re2,
37133
- t: t4,
37133
+ t: t3,
37134
37134
  comparatorTrimReplace,
37135
37135
  tildeTrimReplace,
37136
37136
  caretTrimReplace
@@ -37151,7 +37151,7 @@ var require_range = __commonJS({
37151
37151
  return result;
37152
37152
  };
37153
37153
  var parseComparator = (comp, options) => {
37154
- comp = comp.replace(re2[t4.BUILD], "");
37154
+ comp = comp.replace(re2[t3.BUILD], "");
37155
37155
  debug("comp", comp, options);
37156
37156
  comp = replaceCarets(comp, options);
37157
37157
  debug("caret", comp);
@@ -37168,8 +37168,8 @@ var require_range = __commonJS({
37168
37168
  return comp.trim().split(/\s+/).map((c2) => replaceTilde(c2, options)).join(" ");
37169
37169
  };
37170
37170
  var replaceTilde = (comp, options) => {
37171
- const r4 = options.loose ? re2[t4.TILDELOOSE] : re2[t4.TILDE];
37172
- return comp.replace(r4, (_2, M4, m, p, pr) => {
37171
+ const r3 = options.loose ? re2[t3.TILDELOOSE] : re2[t3.TILDE];
37172
+ return comp.replace(r3, (_2, M4, m, p, pr) => {
37173
37173
  debug("tilde", comp, _2, M4, m, p, pr);
37174
37174
  let ret;
37175
37175
  if (isX(M4)) {
@@ -37193,20 +37193,20 @@ var require_range = __commonJS({
37193
37193
  };
37194
37194
  var replaceCaret = (comp, options) => {
37195
37195
  debug("caret", comp, options);
37196
- const r4 = options.loose ? re2[t4.CARETLOOSE] : re2[t4.CARET];
37197
- const z7 = options.includePrerelease ? "-0" : "";
37198
- return comp.replace(r4, (_2, M4, m, p, pr) => {
37196
+ const r3 = options.loose ? re2[t3.CARETLOOSE] : re2[t3.CARET];
37197
+ const z6 = options.includePrerelease ? "-0" : "";
37198
+ return comp.replace(r3, (_2, M4, m, p, pr) => {
37199
37199
  debug("caret", comp, _2, M4, m, p, pr);
37200
37200
  let ret;
37201
37201
  if (isX(M4)) {
37202
37202
  ret = "";
37203
37203
  } else if (isX(m)) {
37204
- ret = `>=${M4}.0.0${z7} <${+M4 + 1}.0.0-0`;
37204
+ ret = `>=${M4}.0.0${z6} <${+M4 + 1}.0.0-0`;
37205
37205
  } else if (isX(p)) {
37206
37206
  if (M4 === "0") {
37207
- ret = `>=${M4}.${m}.0${z7} <${M4}.${+m + 1}.0-0`;
37207
+ ret = `>=${M4}.${m}.0${z6} <${M4}.${+m + 1}.0-0`;
37208
37208
  } else {
37209
- ret = `>=${M4}.${m}.0${z7} <${+M4 + 1}.0.0-0`;
37209
+ ret = `>=${M4}.${m}.0${z6} <${+M4 + 1}.0.0-0`;
37210
37210
  }
37211
37211
  } else if (pr) {
37212
37212
  debug("replaceCaret pr", pr);
@@ -37223,9 +37223,9 @@ var require_range = __commonJS({
37223
37223
  debug("no pr");
37224
37224
  if (M4 === "0") {
37225
37225
  if (m === "0") {
37226
- ret = `>=${M4}.${m}.${p}${z7} <${M4}.${m}.${+p + 1}-0`;
37226
+ ret = `>=${M4}.${m}.${p}${z6} <${M4}.${m}.${+p + 1}-0`;
37227
37227
  } else {
37228
- ret = `>=${M4}.${m}.${p}${z7} <${M4}.${+m + 1}.0-0`;
37228
+ ret = `>=${M4}.${m}.${p}${z6} <${M4}.${+m + 1}.0-0`;
37229
37229
  }
37230
37230
  } else {
37231
37231
  ret = `>=${M4}.${m}.${p} <${+M4 + 1}.0.0-0`;
@@ -37241,8 +37241,8 @@ var require_range = __commonJS({
37241
37241
  };
37242
37242
  var replaceXRange = (comp, options) => {
37243
37243
  comp = comp.trim();
37244
- const r4 = options.loose ? re2[t4.XRANGELOOSE] : re2[t4.XRANGE];
37245
- return comp.replace(r4, (ret, gtlt, M4, m, p, pr) => {
37244
+ const r3 = options.loose ? re2[t3.XRANGELOOSE] : re2[t3.XRANGE];
37245
+ return comp.replace(r3, (ret, gtlt, M4, m, p, pr) => {
37246
37246
  debug("xRange", comp, ret, gtlt, M4, m, p, pr);
37247
37247
  const xM = isX(M4);
37248
37248
  const xm = xM || isX(m);
@@ -37296,11 +37296,11 @@ var require_range = __commonJS({
37296
37296
  };
37297
37297
  var replaceStars = (comp, options) => {
37298
37298
  debug("replaceStars", comp, options);
37299
- return comp.trim().replace(re2[t4.STAR], "");
37299
+ return comp.trim().replace(re2[t3.STAR], "");
37300
37300
  };
37301
37301
  var replaceGTE0 = (comp, options) => {
37302
37302
  debug("replaceGTE0", comp, options);
37303
- return comp.trim().replace(re2[options.includePrerelease ? t4.GTE0PRE : t4.GTE0], "");
37303
+ return comp.trim().replace(re2[options.includePrerelease ? t3.GTE0PRE : t3.GTE0], "");
37304
37304
  };
37305
37305
  var hyphenReplace = (incPr) => ($0, from, fM, fm, fp, fpr, fb, to, tM, tm, tp, tpr) => {
37306
37306
  if (isX(fM)) {
@@ -37386,8 +37386,8 @@ var require_comparator = __commonJS({
37386
37386
  debug("comp", this);
37387
37387
  }
37388
37388
  parse(comp) {
37389
- const r4 = this.options.loose ? re2[t4.COMPARATORLOOSE] : re2[t4.COMPARATOR];
37390
- const m = comp.match(r4);
37389
+ const r3 = this.options.loose ? re2[t3.COMPARATORLOOSE] : re2[t3.COMPARATOR];
37390
+ const m = comp.match(r3);
37391
37391
  if (!m) {
37392
37392
  throw new TypeError(`Invalid comparator: ${comp}`);
37393
37393
  }
@@ -37460,7 +37460,7 @@ var require_comparator = __commonJS({
37460
37460
  };
37461
37461
  module2.exports = Comparator;
37462
37462
  var parseOptions = require_parse_options();
37463
- var { safeRe: re2, t: t4 } = require_re();
37463
+ var { safeRe: re2, t: t3 } = require_re();
37464
37464
  var cmp = require_cmp();
37465
37465
  var debug = require_debug();
37466
37466
  var SemVer = require_semver();
@@ -37559,7 +37559,7 @@ var require_min_version = __commonJS({
37559
37559
  "use strict";
37560
37560
  var SemVer = require_semver();
37561
37561
  var Range = require_range();
37562
- var gt3 = require_gt();
37562
+ var gt2 = require_gt();
37563
37563
  var minVersion = (range, loose) => {
37564
37564
  range = new Range(range, loose);
37565
37565
  let minver = new SemVer("0.0.0");
@@ -37587,7 +37587,7 @@ var require_min_version = __commonJS({
37587
37587
  /* fallthrough */
37588
37588
  case "":
37589
37589
  case ">=":
37590
- if (!setMin || gt3(compver, setMin)) {
37590
+ if (!setMin || gt2(compver, setMin)) {
37591
37591
  setMin = compver;
37592
37592
  }
37593
37593
  break;
@@ -37599,7 +37599,7 @@ var require_min_version = __commonJS({
37599
37599
  throw new Error(`Unexpected operation: ${comparator.operator}`);
37600
37600
  }
37601
37601
  });
37602
- if (setMin && (!minver || gt3(minver, setMin))) {
37602
+ if (setMin && (!minver || gt2(minver, setMin))) {
37603
37603
  minver = setMin;
37604
37604
  }
37605
37605
  }
@@ -37637,7 +37637,7 @@ var require_outside = __commonJS({
37637
37637
  var { ANY } = Comparator;
37638
37638
  var Range = require_range();
37639
37639
  var satisfies = require_satisfies();
37640
- var gt3 = require_gt();
37640
+ var gt2 = require_gt();
37641
37641
  var lt2 = require_lt();
37642
37642
  var lte = require_lte();
37643
37643
  var gte = require_gte();
@@ -37647,7 +37647,7 @@ var require_outside = __commonJS({
37647
37647
  let gtfn, ltefn, ltfn, comp, ecomp;
37648
37648
  switch (hilo) {
37649
37649
  case ">":
37650
- gtfn = gt3;
37650
+ gtfn = gt2;
37651
37651
  ltefn = lte;
37652
37652
  ltfn = lt2;
37653
37653
  comp = ">";
@@ -37656,7 +37656,7 @@ var require_outside = __commonJS({
37656
37656
  case "<":
37657
37657
  gtfn = lt2;
37658
37658
  ltefn = gte;
37659
- ltfn = gt3;
37659
+ ltfn = gt2;
37660
37660
  comp = "<";
37661
37661
  ecomp = "<=";
37662
37662
  break;
@@ -37741,7 +37741,7 @@ var require_simplify = __commonJS({
37741
37741
  const set2 = [];
37742
37742
  let first = null;
37743
37743
  let prev = null;
37744
- const v2 = versions.sort((a4, b6) => compare(a4, b6, options));
37744
+ const v2 = versions.sort((a3, b5) => compare(a3, b5, options));
37745
37745
  for (const version2 of v2) {
37746
37746
  const included = satisfies(version2, range, options);
37747
37747
  if (included) {
@@ -37834,10 +37834,10 @@ var require_subset = __commonJS({
37834
37834
  }
37835
37835
  }
37836
37836
  const eqSet = /* @__PURE__ */ new Set();
37837
- let gt3, lt2;
37837
+ let gt2, lt2;
37838
37838
  for (const c2 of sub) {
37839
37839
  if (c2.operator === ">" || c2.operator === ">=") {
37840
- gt3 = higherGT(gt3, c2, options);
37840
+ gt2 = higherGT(gt2, c2, options);
37841
37841
  } else if (c2.operator === "<" || c2.operator === "<=") {
37842
37842
  lt2 = lowerLT(lt2, c2, options);
37843
37843
  } else {
@@ -37848,16 +37848,16 @@ var require_subset = __commonJS({
37848
37848
  return null;
37849
37849
  }
37850
37850
  let gtltComp;
37851
- if (gt3 && lt2) {
37852
- gtltComp = compare(gt3.semver, lt2.semver, options);
37851
+ if (gt2 && lt2) {
37852
+ gtltComp = compare(gt2.semver, lt2.semver, options);
37853
37853
  if (gtltComp > 0) {
37854
37854
  return null;
37855
- } else if (gtltComp === 0 && (gt3.operator !== ">=" || lt2.operator !== "<=")) {
37855
+ } else if (gtltComp === 0 && (gt2.operator !== ">=" || lt2.operator !== "<=")) {
37856
37856
  return null;
37857
37857
  }
37858
37858
  }
37859
37859
  for (const eq of eqSet) {
37860
- if (gt3 && !satisfies(eq, String(gt3), options)) {
37860
+ if (gt2 && !satisfies(eq, String(gt2), options)) {
37861
37861
  return null;
37862
37862
  }
37863
37863
  if (lt2 && !satisfies(eq, String(lt2), options)) {
@@ -37873,25 +37873,25 @@ var require_subset = __commonJS({
37873
37873
  let higher, lower;
37874
37874
  let hasDomLT, hasDomGT;
37875
37875
  let needDomLTPre = lt2 && !options.includePrerelease && lt2.semver.prerelease.length ? lt2.semver : false;
37876
- let needDomGTPre = gt3 && !options.includePrerelease && gt3.semver.prerelease.length ? gt3.semver : false;
37876
+ let needDomGTPre = gt2 && !options.includePrerelease && gt2.semver.prerelease.length ? gt2.semver : false;
37877
37877
  if (needDomLTPre && needDomLTPre.prerelease.length === 1 && lt2.operator === "<" && needDomLTPre.prerelease[0] === 0) {
37878
37878
  needDomLTPre = false;
37879
37879
  }
37880
37880
  for (const c2 of dom) {
37881
37881
  hasDomGT = hasDomGT || c2.operator === ">" || c2.operator === ">=";
37882
37882
  hasDomLT = hasDomLT || c2.operator === "<" || c2.operator === "<=";
37883
- if (gt3) {
37883
+ if (gt2) {
37884
37884
  if (needDomGTPre) {
37885
37885
  if (c2.semver.prerelease && c2.semver.prerelease.length && c2.semver.major === needDomGTPre.major && c2.semver.minor === needDomGTPre.minor && c2.semver.patch === needDomGTPre.patch) {
37886
37886
  needDomGTPre = false;
37887
37887
  }
37888
37888
  }
37889
37889
  if (c2.operator === ">" || c2.operator === ">=") {
37890
- higher = higherGT(gt3, c2, options);
37891
- if (higher === c2 && higher !== gt3) {
37890
+ higher = higherGT(gt2, c2, options);
37891
+ if (higher === c2 && higher !== gt2) {
37892
37892
  return false;
37893
37893
  }
37894
- } else if (gt3.operator === ">=" && !satisfies(gt3.semver, String(c2), options)) {
37894
+ } else if (gt2.operator === ">=" && !satisfies(gt2.semver, String(c2), options)) {
37895
37895
  return false;
37896
37896
  }
37897
37897
  }
@@ -37910,14 +37910,14 @@ var require_subset = __commonJS({
37910
37910
  return false;
37911
37911
  }
37912
37912
  }
37913
- if (!c2.operator && (lt2 || gt3) && gtltComp !== 0) {
37913
+ if (!c2.operator && (lt2 || gt2) && gtltComp !== 0) {
37914
37914
  return false;
37915
37915
  }
37916
37916
  }
37917
- if (gt3 && hasDomLT && !lt2 && gtltComp !== 0) {
37917
+ if (gt2 && hasDomLT && !lt2 && gtltComp !== 0) {
37918
37918
  return false;
37919
37919
  }
37920
- if (lt2 && hasDomGT && !gt3 && gtltComp !== 0) {
37920
+ if (lt2 && hasDomGT && !gt2 && gtltComp !== 0) {
37921
37921
  return false;
37922
37922
  }
37923
37923
  if (needDomGTPre || needDomLTPre) {
@@ -37925,19 +37925,19 @@ var require_subset = __commonJS({
37925
37925
  }
37926
37926
  return true;
37927
37927
  };
37928
- var higherGT = (a4, b6, options) => {
37929
- if (!a4) {
37930
- return b6;
37928
+ var higherGT = (a3, b5, options) => {
37929
+ if (!a3) {
37930
+ return b5;
37931
37931
  }
37932
- const comp = compare(a4.semver, b6.semver, options);
37933
- return comp > 0 ? a4 : comp < 0 ? b6 : b6.operator === ">" && a4.operator === ">=" ? b6 : a4;
37932
+ const comp = compare(a3.semver, b5.semver, options);
37933
+ return comp > 0 ? a3 : comp < 0 ? b5 : b5.operator === ">" && a3.operator === ">=" ? b5 : a3;
37934
37934
  };
37935
- var lowerLT = (a4, b6, options) => {
37936
- if (!a4) {
37937
- return b6;
37935
+ var lowerLT = (a3, b5, options) => {
37936
+ if (!a3) {
37937
+ return b5;
37938
37938
  }
37939
- const comp = compare(a4.semver, b6.semver, options);
37940
- return comp < 0 ? a4 : comp > 0 ? b6 : b6.operator === "<" && a4.operator === "<=" ? b6 : a4;
37939
+ const comp = compare(a3.semver, b5.semver, options);
37940
+ return comp < 0 ? a3 : comp > 0 ? b5 : b5.operator === "<" && a3.operator === "<=" ? b5 : a3;
37941
37941
  };
37942
37942
  module2.exports = subset;
37943
37943
  }
@@ -37966,7 +37966,7 @@ var require_semver2 = __commonJS({
37966
37966
  var compareBuild = require_compare_build();
37967
37967
  var sort = require_sort();
37968
37968
  var rsort = require_rsort();
37969
- var gt3 = require_gt();
37969
+ var gt2 = require_gt();
37970
37970
  var lt2 = require_lt();
37971
37971
  var eq = require_eq();
37972
37972
  var neq = require_neq();
@@ -38004,7 +38004,7 @@ var require_semver2 = __commonJS({
38004
38004
  compareBuild,
38005
38005
  sort,
38006
38006
  rsort,
38007
- gt: gt3,
38007
+ gt: gt2,
38008
38008
  lt: lt2,
38009
38009
  eq,
38010
38010
  neq,
@@ -38589,9 +38589,9 @@ function $constructor(name, initializer3, params) {
38589
38589
  const proto = _2.prototype;
38590
38590
  const keys = Object.keys(proto);
38591
38591
  for (let i2 = 0; i2 < keys.length; i2++) {
38592
- const k6 = keys[i2];
38593
- if (!(k6 in inst)) {
38594
- inst[k6] = proto[k6].bind(inst);
38592
+ const k5 = keys[i2];
38593
+ if (!(k5 in inst)) {
38594
+ inst[k5] = proto[k5].bind(inst);
38595
38595
  }
38596
38596
  }
38597
38597
  }
@@ -38720,7 +38720,7 @@ function assert(_2) {
38720
38720
  }
38721
38721
  function getEnumValues(entries) {
38722
38722
  const numericValues = Object.values(entries).filter((v2) => typeof v2 === "number");
38723
- const values = Object.entries(entries).filter(([k6, _2]) => numericValues.indexOf(+k6) === -1).map(([_2, v2]) => v2);
38723
+ const values = Object.entries(entries).filter(([k5, _2]) => numericValues.indexOf(+k5) === -1).map(([_2, v2]) => v2);
38724
38724
  return values;
38725
38725
  }
38726
38726
  function joinValues(array2, separator = "|") {
@@ -38859,10 +38859,10 @@ var allowsEval = cached(() => {
38859
38859
  return false;
38860
38860
  }
38861
38861
  });
38862
- function isPlainObject(o4) {
38863
- if (isObject(o4) === false)
38862
+ function isPlainObject(o3) {
38863
+ if (isObject(o3) === false)
38864
38864
  return false;
38865
- const ctor = o4.constructor;
38865
+ const ctor = o3.constructor;
38866
38866
  if (ctor === void 0)
38867
38867
  return true;
38868
38868
  if (typeof ctor !== "function")
@@ -38875,12 +38875,12 @@ function isPlainObject(o4) {
38875
38875
  }
38876
38876
  return true;
38877
38877
  }
38878
- function shallowClone(o4) {
38879
- if (isPlainObject(o4))
38880
- return { ...o4 };
38881
- if (Array.isArray(o4))
38882
- return [...o4];
38883
- return o4;
38878
+ function shallowClone(o3) {
38879
+ if (isPlainObject(o3))
38880
+ return { ...o3 };
38881
+ if (Array.isArray(o3))
38882
+ return [...o3];
38883
+ return o3;
38884
38884
  }
38885
38885
  function numKeys(data) {
38886
38886
  let keyCount = 0;
@@ -38892,8 +38892,8 @@ function numKeys(data) {
38892
38892
  return keyCount;
38893
38893
  }
38894
38894
  var getParsedType = (data) => {
38895
- const t4 = typeof data;
38896
- switch (t4) {
38895
+ const t3 = typeof data;
38896
+ switch (t3) {
38897
38897
  case "undefined":
38898
38898
  return "undefined";
38899
38899
  case "string":
@@ -38932,7 +38932,7 @@ var getParsedType = (data) => {
38932
38932
  }
38933
38933
  return "object";
38934
38934
  default:
38935
- throw new Error(`Unknown data type: ${t4}`);
38935
+ throw new Error(`Unknown data type: ${t3}`);
38936
38936
  }
38937
38937
  };
38938
38938
  var propertyKeyTypes = /* @__PURE__ */ new Set(["string", "number", "symbol"]);
@@ -39003,8 +39003,8 @@ function stringifyPrimitive(value) {
39003
39003
  return `${value}`;
39004
39004
  }
39005
39005
  function optionalKeys(shape) {
39006
- return Object.keys(shape).filter((k6) => {
39007
- return shape[k6]._zod.optin === "optional" && shape[k6]._zod.optout === "optional";
39006
+ return Object.keys(shape).filter((k5) => {
39007
+ return shape[k5]._zod.optin === "optional" && shape[k5]._zod.optout === "optional";
39008
39008
  });
39009
39009
  }
39010
39010
  var NUMBER_FORMAT_RANGES = {
@@ -39104,20 +39104,20 @@ function safeExtend(schema, shape) {
39104
39104
  });
39105
39105
  return clone(schema, def);
39106
39106
  }
39107
- function merge(a4, b6) {
39108
- const def = mergeDefs(a4._zod.def, {
39107
+ function merge(a3, b5) {
39108
+ const def = mergeDefs(a3._zod.def, {
39109
39109
  get shape() {
39110
- const _shape = { ...a4._zod.def.shape, ...b6._zod.def.shape };
39110
+ const _shape = { ...a3._zod.def.shape, ...b5._zod.def.shape };
39111
39111
  assignProp(this, "shape", _shape);
39112
39112
  return _shape;
39113
39113
  },
39114
39114
  get catchall() {
39115
- return b6._zod.def.catchall;
39115
+ return b5._zod.def.catchall;
39116
39116
  },
39117
39117
  checks: []
39118
39118
  // delete existing checks
39119
39119
  });
39120
- return clone(a4, def);
39120
+ return clone(a3, def);
39121
39121
  }
39122
39122
  function partial(Class2, schema, mask) {
39123
39123
  const currDef = schema._zod.def;
@@ -39188,11 +39188,11 @@ function required(Class2, schema, mask) {
39188
39188
  });
39189
39189
  return clone(schema, def);
39190
39190
  }
39191
- function aborted(x6, startIndex = 0) {
39192
- if (x6.aborted === true)
39191
+ function aborted(x5, startIndex = 0) {
39192
+ if (x5.aborted === true)
39193
39193
  return true;
39194
- for (let i2 = startIndex; i2 < x6.issues.length; i2++) {
39195
- if (x6.issues[i2]?.continue !== true) {
39194
+ for (let i2 = startIndex; i2 < x5.issues.length; i2++) {
39195
+ if (x5.issues[i2]?.continue !== true) {
39196
39196
  return true;
39197
39197
  }
39198
39198
  }
@@ -39239,8 +39239,8 @@ function getLengthableOrigin(input) {
39239
39239
  return "unknown";
39240
39240
  }
39241
39241
  function parsedType(data) {
39242
- const t4 = typeof data;
39243
- switch (t4) {
39242
+ const t3 = typeof data;
39243
+ switch (t3) {
39244
39244
  case "number": {
39245
39245
  return Number.isNaN(data) ? "nan" : "number";
39246
39246
  }
@@ -39257,7 +39257,7 @@ function parsedType(data) {
39257
39257
  }
39258
39258
  }
39259
39259
  }
39260
- return t4;
39260
+ return t3;
39261
39261
  }
39262
39262
  function issue(...args) {
39263
39263
  const [iss, input, inst] = args;
@@ -39272,8 +39272,8 @@ function issue(...args) {
39272
39272
  return { ...iss };
39273
39273
  }
39274
39274
  function cleanEnum(obj) {
39275
- return Object.entries(obj).filter(([k6, _2]) => {
39276
- return Number.isNaN(Number.parseInt(k6, 10));
39275
+ return Object.entries(obj).filter(([k5, _2]) => {
39276
+ return Number.isNaN(Number.parseInt(k5, 10));
39277
39277
  }).map((el) => el[1]);
39278
39278
  }
39279
39279
  function base64ToUint8Array(base643) {
@@ -39311,7 +39311,7 @@ function hexToUint8Array(hex3) {
39311
39311
  return bytes;
39312
39312
  }
39313
39313
  function uint8ArrayToHex(bytes) {
39314
- return Array.from(bytes).map((b6) => b6.toString(16).padStart(2, "0")).join("");
39314
+ return Array.from(bytes).map((b5) => b5.toString(16).padStart(2, "0")).join("");
39315
39315
  }
39316
39316
  var Class = class {
39317
39317
  constructor(..._args) {
@@ -39445,7 +39445,7 @@ function toDotPath(_path) {
39445
39445
  }
39446
39446
  function prettifyError(error48) {
39447
39447
  const lines = [];
39448
- const issues = [...error48.issues].sort((a4, b6) => (a4.path ?? []).length - (b6.path ?? []).length);
39448
+ const issues = [...error48.issues].sort((a3, b5) => (a3.path ?? []).length - (b5.path ?? []).length);
39449
39449
  for (const issue2 of issues) {
39450
39450
  lines.push(`\u2716 ${issue2.message}`);
39451
39451
  if (issue2.path?.length)
@@ -39462,9 +39462,9 @@ var _parse = (_Err) => (schema, value, _ctx, _params) => {
39462
39462
  throw new $ZodAsyncError();
39463
39463
  }
39464
39464
  if (result.issues.length) {
39465
- const e6 = new (_params?.Err ?? _Err)(result.issues.map((iss) => finalizeIssue(iss, ctx, config())));
39466
- captureStackTrace(e6, _params?.callee);
39467
- throw e6;
39465
+ const e4 = new (_params?.Err ?? _Err)(result.issues.map((iss) => finalizeIssue(iss, ctx, config())));
39466
+ captureStackTrace(e4, _params?.callee);
39467
+ throw e4;
39468
39468
  }
39469
39469
  return result.value;
39470
39470
  };
@@ -39475,9 +39475,9 @@ var _parseAsync = (_Err) => async (schema, value, _ctx, params) => {
39475
39475
  if (result instanceof Promise)
39476
39476
  result = await result;
39477
39477
  if (result.issues.length) {
39478
- const e6 = new (params?.Err ?? _Err)(result.issues.map((iss) => finalizeIssue(iss, ctx, config())));
39479
- captureStackTrace(e6, params?.callee);
39480
- throw e6;
39478
+ const e4 = new (params?.Err ?? _Err)(result.issues.map((iss) => finalizeIssue(iss, ctx, config())));
39479
+ captureStackTrace(e4, params?.callee);
39480
+ throw e4;
39481
39481
  }
39482
39482
  return result.value;
39483
39483
  };
@@ -40267,9 +40267,9 @@ var Doc = class {
40267
40267
  return;
40268
40268
  }
40269
40269
  const content = arg;
40270
- const lines = content.split("\n").filter((x6) => x6);
40271
- const minIndent = Math.min(...lines.map((x6) => x6.length - x6.trimStart().length));
40272
- const dedented = lines.map((x6) => x6.slice(minIndent)).map((x6) => " ".repeat(this.indent * 2) + x6);
40270
+ const lines = content.split("\n").filter((x5) => x5);
40271
+ const minIndent = Math.min(...lines.map((x5) => x5.length - x5.trimStart().length));
40272
+ const dedented = lines.map((x5) => x5.slice(minIndent)).map((x5) => " ".repeat(this.indent * 2) + x5);
40273
40273
  for (const line of dedented) {
40274
40274
  this.content.push(line);
40275
40275
  }
@@ -40278,7 +40278,7 @@ var Doc = class {
40278
40278
  const F3 = Function;
40279
40279
  const args = this?.args;
40280
40280
  const content = this?.content ?? [``];
40281
- const lines = [...content.map((x6) => ` ${x6}`)];
40281
+ const lines = [...content.map((x5) => ` ${x5}`)];
40282
40282
  return new F3(...args, lines.join("\n"));
40283
40283
  }
40284
40284
  };
@@ -40390,10 +40390,10 @@ var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
40390
40390
  defineLazy(inst, "~standard", () => ({
40391
40391
  validate: (value) => {
40392
40392
  try {
40393
- const r4 = safeParse(inst, value);
40394
- return r4.success ? { value: r4.data } : { issues: r4.error?.issues };
40393
+ const r3 = safeParse(inst, value);
40394
+ return r3.success ? { value: r3.data } : { issues: r3.error?.issues };
40395
40395
  } catch (_2) {
40396
- return safeParseAsync(inst, value).then((r4) => r4.success ? { value: r4.data } : { issues: r4.error?.issues });
40396
+ return safeParseAsync(inst, value).then((r3) => r3.success ? { value: r3.data } : { issues: r3.error?.issues });
40397
40397
  }
40398
40398
  },
40399
40399
  vendor: "zod",
@@ -40949,9 +40949,9 @@ function handlePropertyResult(result, final, key, input, isOptionalOut) {
40949
40949
  }
40950
40950
  function normalizeDef(def) {
40951
40951
  const keys = Object.keys(def.shape);
40952
- for (const k6 of keys) {
40953
- if (!def.shape?.[k6]?._zod?.traits?.has("$ZodType")) {
40954
- throw new Error(`Invalid element at key "${k6}": expected a Zod schema`);
40952
+ for (const k5 of keys) {
40953
+ if (!def.shape?.[k5]?._zod?.traits?.has("$ZodType")) {
40954
+ throw new Error(`Invalid element at key "${k5}": expected a Zod schema`);
40955
40955
  }
40956
40956
  }
40957
40957
  const okeys = optionalKeys(def.shape);
@@ -40967,20 +40967,20 @@ function handleCatchall(proms, input, payload, ctx, def, inst) {
40967
40967
  const unrecognized = [];
40968
40968
  const keySet = def.keySet;
40969
40969
  const _catchall = def.catchall._zod;
40970
- const t4 = _catchall.def.type;
40970
+ const t3 = _catchall.def.type;
40971
40971
  const isOptionalOut = _catchall.optout === "optional";
40972
40972
  for (const key in input) {
40973
40973
  if (keySet.has(key))
40974
40974
  continue;
40975
- if (t4 === "never") {
40975
+ if (t3 === "never") {
40976
40976
  unrecognized.push(key);
40977
40977
  continue;
40978
40978
  }
40979
- const r4 = _catchall.run({ value: input[key], issues: [] }, ctx);
40980
- if (r4 instanceof Promise) {
40981
- proms.push(r4.then((r5) => handlePropertyResult(r5, payload, key, input, isOptionalOut)));
40979
+ const r3 = _catchall.run({ value: input[key], issues: [] }, ctx);
40980
+ if (r3 instanceof Promise) {
40981
+ proms.push(r3.then((r4) => handlePropertyResult(r4, payload, key, input, isOptionalOut)));
40982
40982
  } else {
40983
- handlePropertyResult(r4, payload, key, input, isOptionalOut);
40983
+ handlePropertyResult(r3, payload, key, input, isOptionalOut);
40984
40984
  }
40985
40985
  }
40986
40986
  if (unrecognized.length) {
@@ -41047,11 +41047,11 @@ var $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => {
41047
41047
  for (const key of value.keys) {
41048
41048
  const el = shape[key];
41049
41049
  const isOptionalOut = el._zod.optout === "optional";
41050
- const r4 = el._zod.run({ value: input[key], issues: [] }, ctx);
41051
- if (r4 instanceof Promise) {
41052
- proms.push(r4.then((r5) => handlePropertyResult(r5, payload, key, input, isOptionalOut)));
41050
+ const r3 = el._zod.run({ value: input[key], issues: [] }, ctx);
41051
+ if (r3 instanceof Promise) {
41052
+ proms.push(r3.then((r4) => handlePropertyResult(r4, payload, key, input, isOptionalOut)));
41053
41053
  } else {
41054
- handlePropertyResult(r4, payload, key, input, isOptionalOut);
41054
+ handlePropertyResult(r3, payload, key, input, isOptionalOut);
41055
41055
  }
41056
41056
  }
41057
41057
  if (!catchall) {
@@ -41068,8 +41068,8 @@ var $ZodObjectJIT = /* @__PURE__ */ $constructor("$ZodObjectJIT", (inst, def) =>
41068
41068
  const doc = new Doc(["shape", "payload", "ctx"]);
41069
41069
  const normalized = _normalized.value;
41070
41070
  const parseStr = (key) => {
41071
- const k6 = esc(key);
41072
- return `shape[${k6}]._zod.run({ value: input[${k6}], issues: [] }, ctx)`;
41071
+ const k5 = esc(key);
41072
+ return `shape[${k5}]._zod.run({ value: input[${k5}], issues: [] }, ctx)`;
41073
41073
  };
41074
41074
  doc.write(`const input = payload.value;`);
41075
41075
  const ids = /* @__PURE__ */ Object.create(null);
@@ -41080,27 +41080,27 @@ var $ZodObjectJIT = /* @__PURE__ */ $constructor("$ZodObjectJIT", (inst, def) =>
41080
41080
  doc.write(`const newResult = {};`);
41081
41081
  for (const key of normalized.keys) {
41082
41082
  const id = ids[key];
41083
- const k6 = esc(key);
41083
+ const k5 = esc(key);
41084
41084
  const schema = shape[key];
41085
41085
  const isOptionalOut = schema?._zod?.optout === "optional";
41086
41086
  doc.write(`const ${id} = ${parseStr(key)};`);
41087
41087
  if (isOptionalOut) {
41088
41088
  doc.write(`
41089
41089
  if (${id}.issues.length) {
41090
- if (${k6} in input) {
41090
+ if (${k5} in input) {
41091
41091
  payload.issues = payload.issues.concat(${id}.issues.map(iss => ({
41092
41092
  ...iss,
41093
- path: iss.path ? [${k6}, ...iss.path] : [${k6}]
41093
+ path: iss.path ? [${k5}, ...iss.path] : [${k5}]
41094
41094
  })));
41095
41095
  }
41096
41096
  }
41097
41097
 
41098
41098
  if (${id}.value === undefined) {
41099
- if (${k6} in input) {
41100
- newResult[${k6}] = undefined;
41099
+ if (${k5} in input) {
41100
+ newResult[${k5}] = undefined;
41101
41101
  }
41102
41102
  } else {
41103
- newResult[${k6}] = ${id}.value;
41103
+ newResult[${k5}] = ${id}.value;
41104
41104
  }
41105
41105
 
41106
41106
  `);
@@ -41109,16 +41109,16 @@ var $ZodObjectJIT = /* @__PURE__ */ $constructor("$ZodObjectJIT", (inst, def) =>
41109
41109
  if (${id}.issues.length) {
41110
41110
  payload.issues = payload.issues.concat(${id}.issues.map(iss => ({
41111
41111
  ...iss,
41112
- path: iss.path ? [${k6}, ...iss.path] : [${k6}]
41112
+ path: iss.path ? [${k5}, ...iss.path] : [${k5}]
41113
41113
  })));
41114
41114
  }
41115
41115
 
41116
41116
  if (${id}.value === undefined) {
41117
- if (${k6} in input) {
41118
- newResult[${k6}] = undefined;
41117
+ if (${k5} in input) {
41118
+ newResult[${k5}] = undefined;
41119
41119
  }
41120
41120
  } else {
41121
- newResult[${k6}] = ${id}.value;
41121
+ newResult[${k5}] = ${id}.value;
41122
41122
  }
41123
41123
 
41124
41124
  `);
@@ -41166,7 +41166,7 @@ function handleUnionResults(results, final, inst, ctx) {
41166
41166
  return final;
41167
41167
  }
41168
41168
  }
41169
- const nonaborted = results.filter((r4) => !aborted(r4));
41169
+ const nonaborted = results.filter((r3) => !aborted(r3));
41170
41170
  if (nonaborted.length === 1) {
41171
41171
  final.value = nonaborted[0].value;
41172
41172
  return nonaborted[0];
@@ -41181,17 +41181,17 @@ function handleUnionResults(results, final, inst, ctx) {
41181
41181
  }
41182
41182
  var $ZodUnion = /* @__PURE__ */ $constructor("$ZodUnion", (inst, def) => {
41183
41183
  $ZodType.init(inst, def);
41184
- defineLazy(inst._zod, "optin", () => def.options.some((o4) => o4._zod.optin === "optional") ? "optional" : void 0);
41185
- defineLazy(inst._zod, "optout", () => def.options.some((o4) => o4._zod.optout === "optional") ? "optional" : void 0);
41184
+ defineLazy(inst._zod, "optin", () => def.options.some((o3) => o3._zod.optin === "optional") ? "optional" : void 0);
41185
+ defineLazy(inst._zod, "optout", () => def.options.some((o3) => o3._zod.optout === "optional") ? "optional" : void 0);
41186
41186
  defineLazy(inst._zod, "values", () => {
41187
- if (def.options.every((o4) => o4._zod.values)) {
41187
+ if (def.options.every((o3) => o3._zod.values)) {
41188
41188
  return new Set(def.options.flatMap((option) => Array.from(option._zod.values)));
41189
41189
  }
41190
41190
  return void 0;
41191
41191
  });
41192
41192
  defineLazy(inst._zod, "pattern", () => {
41193
- if (def.options.every((o4) => o4._zod.pattern)) {
41194
- const patterns = def.options.map((o4) => o4._zod.pattern);
41193
+ if (def.options.every((o3) => o3._zod.pattern)) {
41194
+ const patterns = def.options.map((o3) => o3._zod.pattern);
41195
41195
  return new RegExp(`^(${patterns.map((p) => cleanRegex(p.source)).join("|")})$`);
41196
41196
  }
41197
41197
  return void 0;
@@ -41226,7 +41226,7 @@ var $ZodUnion = /* @__PURE__ */ $constructor("$ZodUnion", (inst, def) => {
41226
41226
  };
41227
41227
  });
41228
41228
  function handleExclusiveUnionResults(results, final, inst, ctx) {
41229
- const successes = results.filter((r4) => r4.issues.length === 0);
41229
+ const successes = results.filter((r3) => r3.issues.length === 0);
41230
41230
  if (successes.length === 1) {
41231
41231
  final.value = successes[0].value;
41232
41232
  return final;
@@ -41289,11 +41289,11 @@ var $ZodDiscriminatedUnion = /* @__PURE__ */ $constructor("$ZodDiscriminatedUnio
41289
41289
  const pv = option._zod.propValues;
41290
41290
  if (!pv || Object.keys(pv).length === 0)
41291
41291
  throw new Error(`Invalid discriminated union option at index "${def.options.indexOf(option)}"`);
41292
- for (const [k6, v2] of Object.entries(pv)) {
41293
- if (!propValues[k6])
41294
- propValues[k6] = /* @__PURE__ */ new Set();
41292
+ for (const [k5, v2] of Object.entries(pv)) {
41293
+ if (!propValues[k5])
41294
+ propValues[k5] = /* @__PURE__ */ new Set();
41295
41295
  for (const val of v2) {
41296
- propValues[k6].add(val);
41296
+ propValues[k5].add(val);
41297
41297
  }
41298
41298
  }
41299
41299
  }
@@ -41302,15 +41302,15 @@ var $ZodDiscriminatedUnion = /* @__PURE__ */ $constructor("$ZodDiscriminatedUnio
41302
41302
  const disc = cached(() => {
41303
41303
  const opts = def.options;
41304
41304
  const map2 = /* @__PURE__ */ new Map();
41305
- for (const o4 of opts) {
41306
- const values = o4._zod.propValues?.[def.discriminator];
41305
+ for (const o3 of opts) {
41306
+ const values = o3._zod.propValues?.[def.discriminator];
41307
41307
  if (!values || values.size === 0)
41308
- throw new Error(`Invalid discriminated union option at index "${def.options.indexOf(o4)}"`);
41308
+ throw new Error(`Invalid discriminated union option at index "${def.options.indexOf(o3)}"`);
41309
41309
  for (const v2 of values) {
41310
41310
  if (map2.has(v2)) {
41311
41311
  throw new Error(`Duplicate discriminator value "${String(v2)}"`);
41312
41312
  }
41313
- map2.set(v2, o4);
41313
+ map2.set(v2, o3);
41314
41314
  }
41315
41315
  }
41316
41316
  return map2;
@@ -41360,19 +41360,19 @@ var $ZodIntersection = /* @__PURE__ */ $constructor("$ZodIntersection", (inst, d
41360
41360
  return handleIntersectionResults(payload, left, right);
41361
41361
  };
41362
41362
  });
41363
- function mergeValues(a4, b6) {
41364
- if (a4 === b6) {
41365
- return { valid: true, data: a4 };
41363
+ function mergeValues(a3, b5) {
41364
+ if (a3 === b5) {
41365
+ return { valid: true, data: a3 };
41366
41366
  }
41367
- if (a4 instanceof Date && b6 instanceof Date && +a4 === +b6) {
41368
- return { valid: true, data: a4 };
41367
+ if (a3 instanceof Date && b5 instanceof Date && +a3 === +b5) {
41368
+ return { valid: true, data: a3 };
41369
41369
  }
41370
- if (isPlainObject(a4) && isPlainObject(b6)) {
41371
- const bKeys = Object.keys(b6);
41372
- const sharedKeys = Object.keys(a4).filter((key) => bKeys.indexOf(key) !== -1);
41373
- const newObj = { ...a4, ...b6 };
41370
+ if (isPlainObject(a3) && isPlainObject(b5)) {
41371
+ const bKeys = Object.keys(b5);
41372
+ const sharedKeys = Object.keys(a3).filter((key) => bKeys.indexOf(key) !== -1);
41373
+ const newObj = { ...a3, ...b5 };
41374
41374
  for (const key of sharedKeys) {
41375
- const sharedValue = mergeValues(a4[key], b6[key]);
41375
+ const sharedValue = mergeValues(a3[key], b5[key]);
41376
41376
  if (!sharedValue.valid) {
41377
41377
  return {
41378
41378
  valid: false,
@@ -41383,14 +41383,14 @@ function mergeValues(a4, b6) {
41383
41383
  }
41384
41384
  return { valid: true, data: newObj };
41385
41385
  }
41386
- if (Array.isArray(a4) && Array.isArray(b6)) {
41387
- if (a4.length !== b6.length) {
41386
+ if (Array.isArray(a3) && Array.isArray(b5)) {
41387
+ if (a3.length !== b5.length) {
41388
41388
  return { valid: false, mergeErrorPath: [] };
41389
41389
  }
41390
41390
  const newArray = [];
41391
- for (let index = 0; index < a4.length; index++) {
41392
- const itemA = a4[index];
41393
- const itemB = b6[index];
41391
+ for (let index = 0; index < a3.length; index++) {
41392
+ const itemA = a3[index];
41393
+ const itemB = b5[index];
41394
41394
  const sharedValue = mergeValues(itemA, itemB);
41395
41395
  if (!sharedValue.valid) {
41396
41396
  return {
@@ -41410,10 +41410,10 @@ function handleIntersectionResults(result, left, right) {
41410
41410
  for (const iss of left.issues) {
41411
41411
  if (iss.code === "unrecognized_keys") {
41412
41412
  unrecIssue ?? (unrecIssue = iss);
41413
- for (const k6 of iss.keys) {
41414
- if (!unrecKeys.has(k6))
41415
- unrecKeys.set(k6, {});
41416
- unrecKeys.get(k6).l = true;
41413
+ for (const k5 of iss.keys) {
41414
+ if (!unrecKeys.has(k5))
41415
+ unrecKeys.set(k5, {});
41416
+ unrecKeys.get(k5).l = true;
41417
41417
  }
41418
41418
  } else {
41419
41419
  result.issues.push(iss);
@@ -41421,16 +41421,16 @@ function handleIntersectionResults(result, left, right) {
41421
41421
  }
41422
41422
  for (const iss of right.issues) {
41423
41423
  if (iss.code === "unrecognized_keys") {
41424
- for (const k6 of iss.keys) {
41425
- if (!unrecKeys.has(k6))
41426
- unrecKeys.set(k6, {});
41427
- unrecKeys.get(k6).r = true;
41424
+ for (const k5 of iss.keys) {
41425
+ if (!unrecKeys.has(k5))
41426
+ unrecKeys.set(k5, {});
41427
+ unrecKeys.get(k5).r = true;
41428
41428
  }
41429
41429
  } else {
41430
41430
  result.issues.push(iss);
41431
41431
  }
41432
41432
  }
41433
- const bothKeys = [...unrecKeys].filter(([, f]) => f.l && f.r).map(([k6]) => k6);
41433
+ const bothKeys = [...unrecKeys].filter(([, f]) => f.l && f.r).map(([k5]) => k5);
41434
41434
  if (bothKeys.length && unrecIssue) {
41435
41435
  result.issues.push({ ...unrecIssue, keys: bothKeys });
41436
41436
  }
@@ -41724,7 +41724,7 @@ var $ZodEnum = /* @__PURE__ */ $constructor("$ZodEnum", (inst, def) => {
41724
41724
  const values = getEnumValues(def.entries);
41725
41725
  const valuesSet = new Set(values);
41726
41726
  inst._zod.values = valuesSet;
41727
- inst._zod.pattern = new RegExp(`^(${values.filter((k6) => propertyKeyTypes.has(typeof k6)).map((o4) => typeof o4 === "string" ? escapeRegex(o4) : o4.toString()).join("|")})$`);
41727
+ inst._zod.pattern = new RegExp(`^(${values.filter((k5) => propertyKeyTypes.has(typeof k5)).map((o3) => typeof o3 === "string" ? escapeRegex(o3) : o3.toString()).join("|")})$`);
41728
41728
  inst._zod.parse = (payload, _ctx) => {
41729
41729
  const input = payload.value;
41730
41730
  if (valuesSet.has(input)) {
@@ -41746,7 +41746,7 @@ var $ZodLiteral = /* @__PURE__ */ $constructor("$ZodLiteral", (inst, def) => {
41746
41746
  }
41747
41747
  const values = new Set(def.values);
41748
41748
  inst._zod.values = values;
41749
- inst._zod.pattern = new RegExp(`^(${def.values.map((o4) => typeof o4 === "string" ? escapeRegex(o4) : o4 ? escapeRegex(o4.toString()) : String(o4)).join("|")})$`);
41749
+ inst._zod.pattern = new RegExp(`^(${def.values.map((o3) => typeof o3 === "string" ? escapeRegex(o3) : o3 ? escapeRegex(o3.toString()) : String(o3)).join("|")})$`);
41750
41750
  inst._zod.parse = (payload, _ctx) => {
41751
41751
  const input = payload.value;
41752
41752
  if (values.has(input)) {
@@ -41818,7 +41818,7 @@ var $ZodOptional = /* @__PURE__ */ $constructor("$ZodOptional", (inst, def) => {
41818
41818
  if (def.innerType._zod.optin === "optional") {
41819
41819
  const result = def.innerType._zod.run(payload, ctx);
41820
41820
  if (result instanceof Promise)
41821
- return result.then((r4) => handleOptionalResult(r4, payload.value));
41821
+ return result.then((r3) => handleOptionalResult(r3, payload.value));
41822
41822
  return handleOptionalResult(result, payload.value);
41823
41823
  }
41824
41824
  if (payload.value === void 0) {
@@ -41895,7 +41895,7 @@ var $ZodNonOptional = /* @__PURE__ */ $constructor("$ZodNonOptional", (inst, def
41895
41895
  $ZodType.init(inst, def);
41896
41896
  defineLazy(inst._zod, "values", () => {
41897
41897
  const v2 = def.innerType._zod.values;
41898
- return v2 ? new Set([...v2].filter((x6) => x6 !== void 0)) : void 0;
41898
+ return v2 ? new Set([...v2].filter((x5) => x5 !== void 0)) : void 0;
41899
41899
  });
41900
41900
  inst._zod.parse = (payload, ctx) => {
41901
41901
  const result = def.innerType._zod.run(payload, ctx);
@@ -42235,11 +42235,11 @@ var $ZodCustom = /* @__PURE__ */ $constructor("$ZodCustom", (inst, def) => {
42235
42235
  };
42236
42236
  inst._zod.check = (payload) => {
42237
42237
  const input = payload.value;
42238
- const r4 = def.fn(input);
42239
- if (r4 instanceof Promise) {
42240
- return r4.then((r5) => handleRefineResult(r5, payload, input, inst));
42238
+ const r3 = def.fn(input);
42239
+ if (r3 instanceof Promise) {
42240
+ return r3.then((r4) => handleRefineResult(r4, payload, input, inst));
42241
42241
  }
42242
- handleRefineResult(r4, payload, input, inst);
42242
+ handleRefineResult(r3, payload, input, inst);
42243
42243
  return;
42244
42244
  };
42245
42245
  });
@@ -44079,17 +44079,17 @@ var error16 = () => {
44079
44079
  number: { unit: "", shortLabel: "\u05E7\u05D8\u05DF", longLabel: "\u05D2\u05D3\u05D5\u05DC" }
44080
44080
  // no unit
44081
44081
  };
44082
- const typeEntry = (t4) => t4 ? TypeNames[t4] : void 0;
44083
- const typeLabel = (t4) => {
44084
- const e6 = typeEntry(t4);
44085
- if (e6)
44086
- return e6.label;
44087
- return t4 ?? TypeNames.unknown.label;
44088
- };
44089
- const withDefinite = (t4) => `\u05D4${typeLabel(t4)}`;
44090
- const verbFor = (t4) => {
44091
- const e6 = typeEntry(t4);
44092
- const gender = e6?.gender ?? "m";
44082
+ const typeEntry = (t3) => t3 ? TypeNames[t3] : void 0;
44083
+ const typeLabel = (t3) => {
44084
+ const e4 = typeEntry(t3);
44085
+ if (e4)
44086
+ return e4.label;
44087
+ return t3 ?? TypeNames.unknown.label;
44088
+ };
44089
+ const withDefinite = (t3) => `\u05D4${typeLabel(t3)}`;
44090
+ const verbFor = (t3) => {
44091
+ const e4 = typeEntry(t3);
44092
+ const gender = e4?.gender ?? "m";
44093
44093
  return gender === "f" ? "\u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05D9\u05D5\u05EA" : "\u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA";
44094
44094
  };
44095
44095
  const getSizing = (origin) => {
@@ -49572,7 +49572,7 @@ var objectProcessor = (schema, ctx, _json, params) => {
49572
49572
  var unionProcessor = (schema, ctx, json2, params) => {
49573
49573
  const def = schema._zod.def;
49574
49574
  const isExclusive = def.inclusive === false;
49575
- const options = def.options.map((x6, i2) => process2(x6, ctx, {
49575
+ const options = def.options.map((x5, i2) => process2(x5, ctx, {
49576
49576
  ...params,
49577
49577
  path: [...params.path, isExclusive ? "oneOf" : "anyOf", i2]
49578
49578
  }));
@@ -49584,18 +49584,18 @@ var unionProcessor = (schema, ctx, json2, params) => {
49584
49584
  };
49585
49585
  var intersectionProcessor = (schema, ctx, json2, params) => {
49586
49586
  const def = schema._zod.def;
49587
- const a4 = process2(def.left, ctx, {
49587
+ const a3 = process2(def.left, ctx, {
49588
49588
  ...params,
49589
49589
  path: [...params.path, "allOf", 0]
49590
49590
  });
49591
- const b6 = process2(def.right, ctx, {
49591
+ const b5 = process2(def.right, ctx, {
49592
49592
  ...params,
49593
49593
  path: [...params.path, "allOf", 1]
49594
49594
  });
49595
49595
  const isSimpleIntersection = (val) => "allOf" in val && Object.keys(val).length === 1;
49596
49596
  const allOf = [
49597
- ...isSimpleIntersection(a4) ? a4.allOf : [a4],
49598
- ...isSimpleIntersection(b6) ? b6.allOf : [b6]
49597
+ ...isSimpleIntersection(a3) ? a3.allOf : [a3],
49598
+ ...isSimpleIntersection(b5) ? b5.allOf : [b5]
49599
49599
  ];
49600
49600
  json2.allOf = allOf;
49601
49601
  };
@@ -49605,7 +49605,7 @@ var tupleProcessor = (schema, ctx, _json, params) => {
49605
49605
  json2.type = "array";
49606
49606
  const prefixPath = ctx.target === "draft-2020-12" ? "prefixItems" : "items";
49607
49607
  const restPath = ctx.target === "draft-2020-12" ? "items" : ctx.target === "openapi-3.0" ? "items" : "additionalItems";
49608
- const prefixItems = def.items.map((x6, i2) => process2(x6, ctx, {
49608
+ const prefixItems = def.items.map((x5, i2) => process2(x5, ctx, {
49609
49609
  ...params,
49610
49610
  path: [...params.path, prefixPath, i2]
49611
49611
  }));
@@ -50843,11 +50843,11 @@ function record(keyType, valueType, params) {
50843
50843
  });
50844
50844
  }
50845
50845
  function partialRecord(keyType, valueType, params) {
50846
- const k6 = clone(keyType);
50847
- k6._zod.values = void 0;
50846
+ const k5 = clone(keyType);
50847
+ k5._zod.values = void 0;
50848
50848
  return new ZodRecord({
50849
50849
  type: "record",
50850
- keyType: k6,
50850
+ keyType: k5,
50851
50851
  valueType,
50852
50852
  ...util_exports.normalizeParams(params)
50853
50853
  });
@@ -51483,8 +51483,8 @@ function convertBaseSchema(schema, ctx) {
51483
51483
  }
51484
51484
  const type = schema.type;
51485
51485
  if (Array.isArray(type)) {
51486
- const typeSchemas = type.map((t4) => {
51487
- const typeSchema = { ...schema, type: t4 };
51486
+ const typeSchemas = type.map((t3) => {
51487
+ const typeSchema = { ...schema, type: t3 };
51488
51488
  return convertBaseSchema(typeSchema, ctx);
51489
51489
  });
51490
51490
  if (typeSchemas.length === 0) {
@@ -51718,12 +51718,12 @@ function convertSchema(schema, ctx) {
51718
51718
  let baseSchema = convertBaseSchema(schema, ctx);
51719
51719
  const hasExplicitType = schema.type || schema.enum !== void 0 || schema.const !== void 0;
51720
51720
  if (schema.anyOf && Array.isArray(schema.anyOf)) {
51721
- const options = schema.anyOf.map((s4) => convertSchema(s4, ctx));
51721
+ const options = schema.anyOf.map((s3) => convertSchema(s3, ctx));
51722
51722
  const anyOfUnion = z.union(options);
51723
51723
  baseSchema = hasExplicitType ? z.intersection(baseSchema, anyOfUnion) : anyOfUnion;
51724
51724
  }
51725
51725
  if (schema.oneOf && Array.isArray(schema.oneOf)) {
51726
- const options = schema.oneOf.map((s4) => convertSchema(s4, ctx));
51726
+ const options = schema.oneOf.map((s3) => convertSchema(s3, ctx));
51727
51727
  const oneOfUnion = z.xor(options);
51728
51728
  baseSchema = hasExplicitType ? z.intersection(baseSchema, oneOfUnion) : oneOfUnion;
51729
51729
  }
@@ -51813,75 +51813,75 @@ function date4(params) {
51813
51813
  // ../../node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/classic/external.js
51814
51814
  config(en_default());
51815
51815
 
51816
- // ../../node_modules/.pnpm/@x-otto+shared@0.1.0-alpha.1/node_modules/@x-otto/shared/dist/event-bus-CABu09lC.js
51816
+ // ../shared/dist/event-bus-CABu09lC.js
51817
51817
  var e = class {
51818
51818
  listeners = {};
51819
- on(e6, t4) {
51820
- let n4 = this.listeners[e6];
51821
- return n4 || (n4 = /* @__PURE__ */ new Set(), this.listeners[e6] = n4), n4.add(t4), () => this.off(e6, t4);
51819
+ on(e4, t3) {
51820
+ let n3 = this.listeners[e4];
51821
+ return n3 || (n3 = /* @__PURE__ */ new Set(), this.listeners[e4] = n3), n3.add(t3), () => this.off(e4, t3);
51822
51822
  }
51823
- off(e6, t4) {
51824
- this.listeners[e6]?.delete(t4);
51823
+ off(e4, t3) {
51824
+ this.listeners[e4]?.delete(t3);
51825
51825
  }
51826
- emit(e6, ...t4) {
51827
- let n4 = this.listeners[e6];
51828
- if (n4) for (let e7 of [...n4]) e7(...t4);
51826
+ emit(e4, ...t3) {
51827
+ let n3 = this.listeners[e4];
51828
+ if (n3) for (let e5 of [...n3]) e5(...t3);
51829
51829
  }
51830
- once(e6, t4) {
51831
- let n4 = ((...r4) => {
51832
- this.off(e6, n4), t4(...r4);
51830
+ once(e4, t3) {
51831
+ let n3 = ((...r3) => {
51832
+ this.off(e4, n3), t3(...r3);
51833
51833
  });
51834
- return this.on(e6, n4);
51834
+ return this.on(e4, n3);
51835
51835
  }
51836
- removeAllListeners(e6) {
51837
- if (e6 !== void 0) delete this.listeners[e6];
51838
- else for (let e7 of Object.keys(this.listeners)) delete this.listeners[e7];
51836
+ removeAllListeners(e4) {
51837
+ if (e4 !== void 0) delete this.listeners[e4];
51838
+ else for (let e5 of Object.keys(this.listeners)) delete this.listeners[e5];
51839
51839
  }
51840
- listenerCount(e6) {
51841
- return this.listeners[e6]?.size ?? 0;
51840
+ listenerCount(e4) {
51841
+ return this.listeners[e4]?.size ?? 0;
51842
51842
  }
51843
51843
  };
51844
51844
  var t = class extends e {
51845
- publish(e6) {
51846
- let t4 = (e7, ...t5) => this.emit(e7, ...t5);
51847
- for (let [n4, r4] of Object.entries(e6)) {
51848
- let e7 = r4 ?? [];
51849
- t4(n4, ...e7), t4(`*`, n4, ...e7);
51845
+ publish(e4) {
51846
+ let t3 = (e5, ...t4) => this.emit(e5, ...t4);
51847
+ for (let [n3, r3] of Object.entries(e4)) {
51848
+ let e5 = r3 ?? [];
51849
+ t3(n3, ...e5), t3(`*`, n3, ...e5);
51850
51850
  }
51851
51851
  }
51852
- subscribe(e6, t4, n4 = false) {
51853
- return n4 ? this.once(e6, t4) : this.on(e6, t4);
51852
+ subscribe(e4, t3, n3 = false) {
51853
+ return n3 ? this.once(e4, t3) : this.on(e4, t3);
51854
51854
  }
51855
- subscribeAll(e6) {
51856
- return this.subscribe(`*`, e6);
51855
+ subscribeAll(e4) {
51856
+ return this.subscribe(`*`, e4);
51857
51857
  }
51858
51858
  };
51859
51859
 
51860
- // ../../node_modules/.pnpm/@x-otto+shared@0.1.0-alpha.1/node_modules/@x-otto/shared/dist/index.js
51860
+ // ../shared/dist/index.js
51861
51861
  var import_node_module = require("node:module");
51862
51862
  var import_pino = __toESM(require("/Users/aniwei/Desktop/workspaces/x-coding-agent/node_modules/.pnpm/pino@10.3.1/node_modules/pino/pino.js"), 1);
51863
51863
 
51864
- // ../../node_modules/.pnpm/@x-otto+env@0.1.0-alpha.1/node_modules/@x-otto/env/dist/index.js
51864
+ // ../env/dist/index.js
51865
51865
  var import_node_os = require("node:os");
51866
51866
  var import_node_fs = require("node:fs");
51867
51867
  var import_node_path = require("node:path");
51868
51868
  var b = { stream: [`maxRetries`, `initialDelayMs`, `backoffFactor`, `maxDelayMs`], networkDisconnect: [`maxRetries`, `intervalMs`], mcp: [`maxReconnectAttempts`, `reconnectDelayMs`, `requestTimeoutMs`], schedule: [`retryBackoffMs`], errorRetry: [`maxAttempts`, `intervalMs`], oauth: [`refreshLockTimeoutMs`] };
51869
51869
  var x = Object.keys(b);
51870
51870
  var E = [];
51871
- var k = (e6, t4) => {
51872
- if (e6 === void 0) return t4;
51873
- let n4 = parseInt(e6, 10);
51874
- return isNaN(n4) || n4 <= 0 ? (E.push(`Invalid environment variable value: ${e6}. Using default: ${t4}`), t4) : n4;
51871
+ var k = (e4, t3) => {
51872
+ if (e4 === void 0) return t3;
51873
+ let n3 = parseInt(e4, 10);
51874
+ return isNaN(n3) || n3 <= 0 ? (E.push(`Invalid environment variable value: ${e4}. Using default: ${t3}`), t3) : n3;
51875
51875
  };
51876
- function j(e6) {
51877
- return (0, import_node_path.normalize)(e6).replaceAll(import_node_path.sep === `\\` ? `\\` : import_node_path.sep, `/`);
51876
+ function j(e4) {
51877
+ return (0, import_node_path.normalize)(e4).replaceAll(import_node_path.sep === `\\` ? `\\` : import_node_path.sep, `/`);
51878
51878
  }
51879
51879
  function N() {
51880
51880
  try {
51881
- let e6 = j(`${j(new URL(`.`, __otto_plugin_import_meta_url).pathname)}/../package.json`);
51882
- return JSON.parse((0, import_node_fs.readFileSync)(e6, `utf-8`)).version || `unknown`;
51883
- } catch (e6) {
51884
- return console.warn(`Failed to read package version:`, e6), `unknown`;
51881
+ let e4 = j(`${j(new URL(`.`, __otto_plugin_import_meta_url).pathname)}/../package.json`);
51882
+ return JSON.parse((0, import_node_fs.readFileSync)(e4, `utf-8`)).version || `unknown`;
51883
+ } catch {
51884
+ return `unknown`;
51885
51885
  }
51886
51886
  }
51887
51887
  var P = N();
@@ -51905,7 +51905,7 @@ var se = process.env.OTTO_OFFLINE === `1` || process.env.OTTO_OFFLINE?.toLowerCa
51905
51905
  var ce = j(process.env.OTTO_AUTH_PATH || `${U}/auth.json`);
51906
51906
  var $ = j(process.env.OTTO_IDENTITY_PATH || `${z2}/identity.json`);
51907
51907
 
51908
- // ../../node_modules/.pnpm/@x-otto+shared@0.1.0-alpha.1/node_modules/@x-otto/shared/dist/index.js
51908
+ // ../shared/dist/index.js
51909
51909
  var import_node_stream = require("node:stream");
51910
51910
  var import_mime_types = __toESM(require_mime_types(), 1);
51911
51911
  var import_jsonc_parser = require("/Users/aniwei/Desktop/workspaces/x-coding-agent/node_modules/.pnpm/jsonc-parser@3.3.1/node_modules/jsonc-parser/lib/umd/main.js");
@@ -52017,7 +52017,7 @@ function splitLines(chunk) {
52017
52017
  return [lines, incompleteLine];
52018
52018
  }
52019
52019
 
52020
- // ../../node_modules/.pnpm/@x-otto+shared@0.1.0-alpha.1/node_modules/@x-otto/shared/dist/index.js
52020
+ // ../shared/dist/index.js
52021
52021
  var import_undici = __toESM(require_undici(), 1);
52022
52022
  var b2 = class extends Error {
52023
52023
  code;
@@ -52026,31 +52026,31 @@ var b2 = class extends Error {
52026
52026
  headers;
52027
52027
  errorType;
52028
52028
  pluginSource;
52029
- constructor(e6, t4) {
52030
- super(e6, { cause: t4.cause }), this.name = new.target.name, this.code = t4.code, this.cause = t4.cause, this.status = t4.status, this.headers = t4.headers, this.errorType = t4.errorType, this.pluginSource = t4.pluginSource;
52029
+ constructor(e4, t3) {
52030
+ super(e4, { cause: t3.cause }), this.name = new.target.name, this.code = t3.code, this.cause = t3.cause, this.status = t3.status, this.headers = t3.headers, this.errorType = t3.errorType, this.pluginSource = t3.pluginSource;
52031
52031
  }
52032
52032
  };
52033
52033
  var x2 = class extends b2 {
52034
52034
  };
52035
52035
  var Ce = class extends b2 {
52036
52036
  };
52037
- var { setPrototypeOf: Ee = function(e6, t4) {
52038
- return e6.__proto__ = t4, e6;
52037
+ var { setPrototypeOf: Ee = function(e4, t3) {
52038
+ return e4.__proto__ = t3, e4;
52039
52039
  } } = Object;
52040
52040
  var C = class e3 extends Error {
52041
52041
  framesToPop = 1;
52042
52042
  name = `Invariant Violation`;
52043
- constructor(t4 = `Invariant Violation`) {
52044
- super(typeof t4 == `number` ? `Invariant Violation: ${t4}` : t4), Ee(this, e3.prototype);
52043
+ constructor(t3 = `Invariant Violation`) {
52044
+ super(typeof t3 == `number` ? `Invariant Violation: ${t3}` : t3), Ee(this, e3.prototype);
52045
52045
  }
52046
52046
  };
52047
- function w(e6, t4) {
52048
- if (typeof e6 == `function`) w(e6(), t4);
52049
- else if (!e6) throw new C(t4);
52047
+ function w(e4, t3) {
52048
+ if (typeof e4 == `function`) w(e4(), t3);
52049
+ else if (!e4) throw new C(t3);
52050
52050
  }
52051
52051
  var De = /* @__PURE__ */ new Set([`trace`, `debug`, `info`, `warn`, `error`, `fatal`]);
52052
- function T(e6) {
52053
- return De.has(e6) ? e6 : `info`;
52052
+ function T(e4) {
52053
+ return De.has(e4) ? e4 : `info`;
52054
52054
  }
52055
52055
  var Oe = (() => {
52056
52056
  try {
@@ -52067,8 +52067,8 @@ function ke() {
52067
52067
  return false;
52068
52068
  }
52069
52069
  }
52070
- function Ae(e6) {
52071
- return e6 === `stdout` ? 1 : e6 === `stderr` ? 2 : e6;
52070
+ function Ae(e4) {
52071
+ return e4 === `stdout` ? 1 : e4 === `stderr` ? 2 : e4;
52072
52072
  }
52073
52073
  function je() {
52074
52074
  return process.env.OTTO_LOG_STDERR === `0`;
@@ -52076,91 +52076,100 @@ function je() {
52076
52076
  function Me() {
52077
52077
  return process.env.OTTO_LOG_FILE || `${process.env.HOME || process.env.USERPROFILE || `.`}/.otto/logs/otto.log`;
52078
52078
  }
52079
- function Ne(e6, t4) {
52080
- let n4 = ke(), r4 = je(), i2 = { target: n4 ? `pino-pretty` : `pino/file`, options: n4 ? { colorize: true, destination: 2 } : { destination: 2 }, level: t4 };
52081
- if (!e6 || e6 === `stdout` || e6 === `stderr`) return r4 ? [{ target: `pino/file`, options: { destination: Me(), mkdir: true }, level: t4 }] : [i2];
52082
- let a4 = { target: `pino/file`, options: { destination: Ae(e6), mkdir: true }, level: t4 };
52083
- return r4 ? [a4] : [a4, i2];
52079
+ function Ne(e4, t3) {
52080
+ let n3 = ke(), r3 = je(), i2 = { target: n3 ? `pino-pretty` : `pino/file`, options: n3 ? { colorize: true, destination: 2 } : { destination: 2 }, level: t3 };
52081
+ if (!e4 || e4 === `stdout` || e4 === `stderr`) return r3 ? [{ target: `pino/file`, options: { destination: Me(), mkdir: true }, level: t3 }] : [i2];
52082
+ let a3 = { target: `pino/file`, options: { destination: Ae(e4), mkdir: true }, level: t3 };
52083
+ return r3 ? [a3] : [a3, i2];
52084
52084
  }
52085
52085
  var E2 = new import_node_stream.PassThrough();
52086
52086
  var D = new t();
52087
- E2.on(`data`, (e6) => {
52087
+ E2.on(`data`, (e4) => {
52088
52088
  try {
52089
- D.publish({ log: [JSON.parse(e6.toString())] });
52090
- } catch (t4) {
52091
- console.warn(`Failed to parse log chunk for listener:`, e6.toString(), t4);
52089
+ D.publish({ log: [JSON.parse(e4.toString())] });
52090
+ } catch (t3) {
52091
+ console.warn(`Failed to parse log chunk for listener:`, e4.toString(), t3);
52092
52092
  }
52093
52093
  });
52094
52094
  var O = null;
52095
52095
  var k2 = T(oe);
52096
52096
  var Fe = /* @__PURE__ */ new Set();
52097
52097
  var A = null;
52098
- function Re(e6, t4) {
52099
- return { write(n4) {
52100
- A ??= import_pino.default.transport({ targets: Ne(e6, t4) }), A.write(n4);
52098
+ function Re(e4, t3) {
52099
+ return { write(n3) {
52100
+ A ??= import_pino.default.transport({ targets: Ne(e4, t3) }), A.write(n3);
52101
52101
  } };
52102
52102
  }
52103
- function ze(e6, t4) {
52104
- return O ??= (0, import_pino.default)({ level: e6 }, import_pino.default.multistream([{ level: e6, stream: E2 }, { level: e6, stream: Re(t4, e6) }])), k2 = T(O.level), O;
52103
+ function ze(e4, t3) {
52104
+ return O ??= (0, import_pino.default)({ level: e4 }, import_pino.default.multistream([{ level: e4, stream: E2 }, { level: e4, stream: Re(t3, e4) }])), k2 = T(O.level), O;
52105
52105
  }
52106
- function Be(e6, t4) {
52107
- ze(t4?.level ?? T(oe), t4?.destination ?? X), w(O, `Root logger is not initialized`);
52108
- let n4 = O.child({ name: e6 }, { level: t4?.level ?? k2 });
52109
- return Fe.add(n4), n4;
52106
+ function Be(e4, t3) {
52107
+ ze(t3?.level ?? T(oe), t3?.destination ?? X), w(O, `Root logger is not initialized`);
52108
+ let n3 = O.child({ name: e4 }, { level: t3?.level ?? k2 });
52109
+ return Fe.add(n3), n3;
52110
52110
  }
52111
52111
  var j2 = 10 * 1024 * 1024;
52112
52112
  var I2;
52113
- function L2(e6) {
52114
- let t4 = e6 || I2;
52115
- if (t4) try {
52116
- return new import_undici.ProxyAgent({ uri: t4 });
52113
+ function L2(e4) {
52114
+ let t3 = e4 || I2;
52115
+ if (t3) try {
52116
+ return new import_undici.ProxyAgent({ uri: t3 });
52117
52117
  } catch {
52118
52118
  return;
52119
52119
  }
52120
52120
  }
52121
- async function* gt(e6) {
52122
- let { url: t4, method: n4 = `POST`, headers: r4 = {}, body: i2, timeout: a4 = 3e5, idleTimeout: o4 = 12e4, signal: s4 } = e6, c2 = new AbortController(), l4 = s4 ? AbortSignal.any([s4, c2.signal]) : c2.signal, u3 = setTimeout(() => c2.abort(), a4), d, f = () => {
52123
- d && clearTimeout(d), d = setTimeout(() => c2.abort(), o4);
52121
+ async function* gt(e4) {
52122
+ let { url: t3, method: n3 = `POST`, headers: r3 = {}, body: i2, timeout: a3 = 3e5, idleTimeout: o3 = 12e4, signal: s3 } = e4, c2 = new AbortController(), l3 = s3 ? AbortSignal.any([s3, c2.signal]) : c2.signal, u3 = setTimeout(() => c2.abort(), a3), d, f = () => {
52123
+ d && clearTimeout(d), d = setTimeout(() => c2.abort(), o3);
52124
52124
  }, p;
52125
52125
  try {
52126
- let a5 = L2(e6.proxy), o5 = { method: n4, headers: { "content-type": `application/json`, accept: `text/event-stream`, ...r4 }, body: i2 ? typeof i2 == `string` ? i2 : JSON.stringify(i2) : void 0, signal: l4 }, s5 = await fetch(t4, a5 ? { ...o5, dispatcher: a5 } : o5);
52127
- if (!s5.ok) {
52128
- let e7 = await s5.text(), t5 = `BAD_RESPONSE`;
52129
- s5.status === 429 ? t5 = `RATE_LIMIT` : s5.status === 529 ? t5 = `OVERLOADED` : s5.status >= 500 ? t5 = `SERVER_ERROR` : s5.status >= 400 && (t5 = `REQUEST_ERROR`);
52130
- let n5;
52126
+ let a4 = L2(e4.proxy), o4 = { method: n3, headers: { "content-type": `application/json`, accept: `text/event-stream`, ...r3 }, body: i2 ? typeof i2 == `string` ? i2 : JSON.stringify(i2) : void 0, signal: l3 }, s4 = await fetch(t3, a4 ? { ...o4, dispatcher: a4 } : o4);
52127
+ if (!s4.ok) {
52128
+ let e5 = await s4.text(), t4 = `BAD_RESPONSE`;
52129
+ s4.status === 429 ? t4 = `RATE_LIMIT` : s4.status === 529 ? t4 = `OVERLOADED` : s4.status >= 500 ? t4 = `SERVER_ERROR` : s4.status >= 400 && (t4 = `REQUEST_ERROR`);
52130
+ let n4;
52131
52131
  try {
52132
- let t6 = JSON.parse(e7)?.error;
52133
- n5 = t6?.code ?? t6?.type;
52132
+ let t5 = JSON.parse(e5)?.error;
52133
+ n4 = t5?.code ?? t5?.type;
52134
52134
  } catch {
52135
52135
  }
52136
- throw new x2(`Http request failed ${s5.status}: ${e7}`, { code: t5, status: s5.status, headers: s5.headers, errorType: n5 });
52136
+ throw new x2(`Http request failed ${s4.status}: ${e5}`, { code: t4, status: s4.status, headers: s4.headers, errorType: n4 });
52137
52137
  }
52138
- if (e6.onResponse?.(s5.headers), !s5.body) throw new x2(`Response body is empty`, { code: `BAD_RESPONSE` });
52139
- p = s5.body.getReader();
52140
- let c3 = new TextDecoder(), u4 = [], d2 = createParser({ onEvent(e7) {
52141
- u4.push({ event: e7.event || void 0, data: e7.data, id: e7.id || void 0 });
52138
+ if (e4.onResponse?.(s4.headers), !s4.body) throw new x2(`Response body is empty`, { code: `BAD_RESPONSE` });
52139
+ p = s4.body.getReader();
52140
+ let c3 = new TextDecoder(), u4 = [], d2 = createParser({ onEvent(e5) {
52141
+ u4.push({ event: e5.event || void 0, data: e5.data, id: e5.id || void 0 });
52142
52142
  } });
52143
52143
  for (f(); ; ) {
52144
- let { done: e7, value: t5 } = await p.read();
52145
- if (e7) break;
52146
- for (f(), d2.feed(c3.decode(t5, { stream: true })); u4.length > 0; ) {
52147
- let e8 = u4.shift();
52148
- e8 && (yield e8);
52144
+ let { done: e5, value: t4 } = await p.read();
52145
+ if (e5) break;
52146
+ for (f(), d2.feed(c3.decode(t4, { stream: true })); u4.length > 0; ) {
52147
+ let e6 = u4.shift();
52148
+ e6 && (yield e6);
52149
52149
  }
52150
52150
  }
52151
52151
  for (d2.feed(c3.decode()); u4.length > 0; ) {
52152
- let e7 = u4.shift();
52153
- e7 && (yield e7);
52152
+ let e5 = u4.shift();
52153
+ e5 && (yield e5);
52154
52154
  }
52155
- } catch (e7) {
52156
- throw e7 instanceof x2 ? e7 : e7 instanceof DOMException && e7.name === `AbortError` ? new x2(`Stream aborted or timed out`, { code: `TIMEOUT`, cause: e7 }) : new x2(`Stream request failed`, { code: `NETWORK_ERROR`, cause: e7 instanceof Error ? e7 : Error(String(e7)) });
52155
+ } catch (e5) {
52156
+ throw e5 instanceof x2 ? e5 : e5 instanceof DOMException && e5.name === `AbortError` ? new x2(`Stream aborted or timed out`, { code: `TIMEOUT`, cause: e5 }) : new x2(`Stream request failed`, { code: `NETWORK_ERROR`, cause: e5 instanceof Error ? e5 : Error(String(e5)) });
52157
52157
  } finally {
52158
52158
  clearTimeout(u3), d && clearTimeout(d), p && p.cancel().catch(() => {
52159
52159
  });
52160
52160
  }
52161
52161
  }
52162
+ function _t(e4, t3) {
52163
+ if (e4 == null) return;
52164
+ if (typeof e4.get == `function`) return e4.get(t3) ?? void 0;
52165
+ let n3 = e4;
52166
+ for (let e5 of Object.keys(n3)) if (e5.toLowerCase() === t3) {
52167
+ let t4 = n3[e5];
52168
+ return typeof t4 == `string` ? t4 : void 0;
52169
+ }
52170
+ }
52162
52171
  var z3 = { Bash: `bash`, Read: `read`, Write: `write`, Edit: `edit`, MultiEdit: `edit`, Grep: `grep`, Glob: `find`, WebFetch: `web_fetch`, WebSearch: `web_search`, Task: `task_delegate`, TodoWrite: `write_todos` };
52163
- var St = Object.fromEntries(Object.entries(z3).reverse().map(([e6, t4]) => [t4, e6]));
52172
+ var St = Object.fromEntries(Object.entries(z3).reverse().map(([e4, t3]) => [t3, e4]));
52164
52173
  function Ot() {
52165
52174
  return `<span class="otto-wordmark">OTTO</span>`;
52166
52175
  }
@@ -52176,17 +52185,17 @@ function At() {
52176
52185
  <path d="M19 19l14 14M33 19l-14 14" stroke="var(--gray-9)" stroke-width="2.8" stroke-linecap="round"/>
52177
52186
  </svg>`;
52178
52187
  }
52179
- function U2(e6) {
52180
- return e6.replace(/[&<>"']/g, (e7) => ({ "&": `&amp;`, "<": `&lt;`, ">": `&gt;`, '"': `&quot;`, "'": `&#39;` })[e7] ?? e7);
52188
+ function U2(e4) {
52189
+ return e4.replace(/[&<>"']/g, (e5) => ({ "&": `&amp;`, "<": `&lt;`, ">": `&gt;`, '"': `&quot;`, "'": `&#39;` })[e5] ?? e5);
52181
52190
  }
52182
- function jt(e6, t4, n4, r4) {
52183
- let i2 = e6 === `success` ? kt() : At();
52191
+ function jt(e4, t3, n3, r3) {
52192
+ let i2 = e4 === `success` ? kt() : At();
52184
52193
  return `<!doctype html>
52185
52194
  <html lang="en">
52186
52195
  <head>
52187
52196
  <meta charset="utf-8">
52188
52197
  <meta name="viewport" content="width=device-width,initial-scale=1">
52189
- <title>${U2(t4)}</title>
52198
+ <title>${U2(t3)}</title>
52190
52199
  <style>
52191
52200
  :root {
52192
52201
  --gray-1:#FFFFFF;--gray-2:#F5F6FA;--gray-3:#EEF0F9;
@@ -52250,11 +52259,11 @@ function jt(e6, t4, n4, r4) {
52250
52259
  ${Ot()}
52251
52260
  <section class="card">
52252
52261
  <div class="status-icon">${i2}</div>
52253
- <p class="kicker">${e6 === `success` ? `Authentication` : `Error`}</p>
52254
- <h1 id="title">${U2(t4)}</h1>
52255
- <p class="desc">${U2(n4)}</p>
52262
+ <p class="kicker">${e4 === `success` ? `Authentication` : `Error`}</p>
52263
+ <h1 id="title">${U2(t3)}</h1>
52264
+ <p class="desc">${U2(n3)}</p>
52256
52265
  <div class="separator"></div>
52257
- <p class="footer">${U2(r4)}</p>
52266
+ <p class="footer">${U2(r3)}</p>
52258
52267
  </section>
52259
52268
  </main>
52260
52269
  </body>
@@ -52271,44 +52280,62 @@ var Y = Be(`@x-otto/shared:file-lock`);
52271
52280
  // ../plugin/dist/index.js
52272
52281
  var import_semver = __toESM(require_semver2(), 1);
52273
52282
 
52274
- // ../../node_modules/.pnpm/@x-otto+interchange@0.1.0-alpha.1/node_modules/@x-otto/interchange/dist/index.js
52283
+ // ../interchange/dist/index.js
52275
52284
  var a2 = /^data:([^;,]*)(?:;[^,]*)?,(.*)$/s;
52276
- function o2(e6, t4) {
52277
- let n4 = a2.exec(e6), r4 = (n4 ? n4[2] ?? `` : e6).replace(/\s+/g, ``);
52278
- return { base64: r4, mediaType: ((n4 ? n4[1] : ``) || t4 || ``).toLowerCase(), valid: s2(r4) };
52285
+ function o2(e4, t3) {
52286
+ let n3 = a2.exec(e4), r3 = (n3 ? n3[2] ?? `` : e4).replace(/\s+/g, ``);
52287
+ return { base64: r3, mediaType: ((n3 ? n3[1] : ``) || t3 || ``).toLowerCase(), valid: s2(r3) };
52288
+ }
52289
+ function s2(e4) {
52290
+ return e4.length === 0 || e4 === `undefined` || e4.length % 4 == 1 ? false : /^[A-Za-z0-9+/]*={0,2}$/.test(e4);
52291
+ }
52292
+ function c(e4, t3) {
52293
+ switch (e4.toLowerCase()) {
52294
+ case `image/jpeg`:
52295
+ case `image/jpg`:
52296
+ return `image/jpeg`;
52297
+ case `image/png`:
52298
+ return `image/png`;
52299
+ case `image/gif`:
52300
+ return `image/gif`;
52301
+ case `image/webp`:
52302
+ return `image/webp`;
52303
+ default:
52304
+ return l2(t3);
52305
+ }
52279
52306
  }
52280
- function s2(e6) {
52281
- return e6.length === 0 || e6 === `undefined` || e6.length % 4 == 1 ? false : /^[A-Za-z0-9+/]*={0,2}$/.test(e6);
52307
+ function l2(e4) {
52308
+ return e4.startsWith(`/9j/`) ? `image/jpeg` : e4.startsWith(`iVBOR`) ? `image/png` : e4.startsWith(`R0lGOD`) ? `image/gif` : e4.startsWith(`UklGR`) ? `image/webp` : `image/png`;
52282
52309
  }
52283
52310
 
52284
52311
  // ../plugin/dist/index.js
52285
52312
  var pe = [`provider`, `tools`, `hooks`, `tui.renderer`, `network`, `context`, `monitor`, `wire-protocol`, `a2ui.component`, `panel.backend`, `mcp.server`, `feedback`, `input.resolver`, `a2ui.renderer`, `theme`, `agent.dispatch`, `service`, `storage`, `session.read`, `llm.complete`, `user.notify`, `user.ask`];
52286
52313
  var b3 = { provider: true, tools: true, hooks: false, "tui.renderer": true, network: true, context: false, monitor: false, "wire-protocol": true, "a2ui.component": true, "panel.backend": true, "mcp.server": true, feedback: false, "input.resolver": true, "a2ui.renderer": true, theme: false, "agent.dispatch": true, service: true, storage: false, "session.read": true, "llm.complete": true, "user.notify": false, "user.ask": true };
52287
- var x3 = Object.freeze(Object.keys(b3).filter((e6) => b3[e6]));
52314
+ var x3 = Object.freeze(Object.keys(b3).filter((e4) => b3[e4]));
52288
52315
  var S = Be(`@x-otto/coding:plugin-manifest`);
52289
52316
  var w2 = /^[a-z0-9]+(?:-[a-z0-9]+)*$/;
52290
- var T2 = (e6) => e6.optional().catch(void 0);
52291
- var E3 = external_exports.string().refine((e6) => e6.trim().length > 0, `must be non-empty`);
52292
- var me = external_exports.object({ id: E3, title: E3, entry: E3.refine((e6) => !e6.startsWith(`/`) && !e6.split(/[\\/]/).includes(`..`), `unsafe path (absolute or traversal)`), export: T2(E3) });
52293
- var he = external_exports.object({ role: T2(E3), toolName: T2(E3), contentType: T2(E3) }).refine((e6) => e6.role != null || e6.toolName != null || e6.contentType != null, { message: `matcher must declare at least one of role/toolName/contentType` });
52294
- var ge = external_exports.object({ id: E3, matcher: he, entry: E3.refine((e6) => !e6.startsWith(`/`) && !e6.split(/[\\/]/).includes(`..`), `unsafe path (absolute or traversal)`), export: T2(E3) });
52295
- var _e = external_exports.object({ id: E3, matcher: he, entry: E3.refine((e6) => !e6.startsWith(`/`) && !e6.split(/[\\/]/).includes(`..`), `unsafe path (absolute or traversal)`), export: T2(E3) });
52296
- var ve = external_exports.object({ extensions: T2(external_exports.array(E3)), filenames: T2(external_exports.array(E3)), glob: T2(external_exports.array(E3)) }).refine((e6) => (e6.extensions?.length ?? 0) + (e6.filenames?.length ?? 0) + (e6.glob?.length ?? 0) > 0, { message: `matcher must declare at least one of extensions/filenames/glob` });
52297
- var ye = D2(external_exports.object({ id: E3, label: E3, matcher: ve, entry: E3.refine((e6) => !e6.startsWith(`/`) && !e6.split(/[\\/]/).includes(`..`), `unsafe path (absolute or traversal)`), export: T2(E3), order: T2(external_exports.number()) }), `fileViewers`);
52298
- var be = D2(external_exports.object({ type: E3, entry: E3.refine((e6) => !e6.startsWith(`/`) && !e6.split(/[\\/]/).includes(`..`), `unsafe path (absolute or traversal)`), export: T2(E3) }), `a2uiComponents`);
52299
- var xe = D2(external_exports.object({ id: E3, entry: E3.refine((e6) => !e6.startsWith(`/`) && !e6.split(/[\\/]/).includes(`..`), `unsafe path (absolute or traversal)`), export: T2(E3), order: T2(external_exports.number()), tickMs: T2(external_exports.number()) }), `statusWidgets`);
52317
+ var T2 = (e4) => e4.optional().catch(void 0);
52318
+ var E3 = external_exports.string().refine((e4) => e4.trim().length > 0, `must be non-empty`);
52319
+ var me = external_exports.object({ id: E3, title: E3, entry: E3.refine((e4) => !e4.startsWith(`/`) && !e4.split(/[\\/]/).includes(`..`), `unsafe path (absolute or traversal)`), export: T2(E3) });
52320
+ var he = external_exports.object({ role: T2(E3), toolName: T2(E3), contentType: T2(E3) }).refine((e4) => e4.role != null || e4.toolName != null || e4.contentType != null, { message: `matcher must declare at least one of role/toolName/contentType` });
52321
+ var ge = external_exports.object({ id: E3, matcher: he, entry: E3.refine((e4) => !e4.startsWith(`/`) && !e4.split(/[\\/]/).includes(`..`), `unsafe path (absolute or traversal)`), export: T2(E3) });
52322
+ var _e = external_exports.object({ id: E3, matcher: he, entry: E3.refine((e4) => !e4.startsWith(`/`) && !e4.split(/[\\/]/).includes(`..`), `unsafe path (absolute or traversal)`), export: T2(E3) });
52323
+ var ve = external_exports.object({ extensions: T2(external_exports.array(E3)), filenames: T2(external_exports.array(E3)), glob: T2(external_exports.array(E3)) }).refine((e4) => (e4.extensions?.length ?? 0) + (e4.filenames?.length ?? 0) + (e4.glob?.length ?? 0) > 0, { message: `matcher must declare at least one of extensions/filenames/glob` });
52324
+ var ye = D2(external_exports.object({ id: E3, label: E3, matcher: ve, entry: E3.refine((e4) => !e4.startsWith(`/`) && !e4.split(/[\\/]/).includes(`..`), `unsafe path (absolute or traversal)`), export: T2(E3), order: T2(external_exports.number()) }), `fileViewers`);
52325
+ var be = D2(external_exports.object({ type: E3, entry: E3.refine((e4) => !e4.startsWith(`/`) && !e4.split(/[\\/]/).includes(`..`), `unsafe path (absolute or traversal)`), export: T2(E3) }), `a2uiComponents`);
52326
+ var xe = D2(external_exports.object({ id: E3, entry: E3.refine((e4) => !e4.startsWith(`/`) && !e4.split(/[\\/]/).includes(`..`), `unsafe path (absolute or traversal)`), export: T2(E3), order: T2(external_exports.number()), tickMs: T2(external_exports.number()) }), `statusWidgets`);
52300
52327
  var Se = D2(ge, `renderers`);
52301
52328
  var Ce2 = D2(me, `panels`);
52302
52329
  var we = external_exports.discriminatedUnion(`type`, [external_exports.object({ type: external_exports.literal(`builtin`), id: E3 }), external_exports.object({ type: external_exports.literal(`mcp`), server: E3, tool: E3, params: T2(external_exports.record(external_exports.string(), external_exports.unknown())) }), external_exports.object({ type: external_exports.literal(`open`), target: E3 }), external_exports.object({ type: external_exports.literal(`command`), name: E3, args: T2(E3) }), external_exports.object({ type: external_exports.literal(`script`), name: E3 })]);
52303
52330
  var Te = external_exports.object({ id: E3, title: E3, command: we, color: T2(external_exports.enum([`accent`, `amber`, `red`, `green`, `gray`])) });
52304
52331
  var Ee2 = external_exports.object({ action: E3, point: E3, when: T2(E3), order: T2(external_exports.number()) });
52305
52332
  var De2 = external_exports.object({ key: E3, groups: external_exports.array(external_exports.array(E3)), map: external_exports.object({ none: E3, partial: E3, all: E3 }) });
52306
- function D2(t4, n4) {
52307
- return external_exports.array(external_exports.unknown()).transform((e6) => {
52308
- let r4 = e6.map((e7) => t4.safeParse(e7)), i2 = r4.filter((e7) => e7.success).map((e7) => e7.data), a4 = r4.length - i2.length;
52309
- if (a4 > 0 && n4) {
52310
- let e7 = r4.filter((e8) => !e8.success).map((e8) => e8.success ? `` : e8.error.issues.map((e9) => e9.message).join(`; `));
52311
- S.warn({ label: n4, dropped: a4, total: r4.length, issues: e7 }, `contributes.${n4}: ${a4}/${r4.length} \u6761 entry \u6821\u9A8C\u5931\u8D25\uFF0C\u5DF2\u9759\u9ED8\u4E22\u5F03\uFF08fail-soft\uFF09`);
52333
+ function D2(t3, n3) {
52334
+ return external_exports.array(external_exports.unknown()).transform((e4) => {
52335
+ let r3 = e4.map((e5) => t3.safeParse(e5)), i2 = r3.filter((e5) => e5.success).map((e5) => e5.data), a3 = r3.length - i2.length;
52336
+ if (a3 > 0 && n3) {
52337
+ let e5 = r3.filter((e6) => !e6.success).map((e6) => e6.success ? `` : e6.error.issues.map((e7) => e7.message).join(`; `));
52338
+ S.warn({ label: n3, dropped: a3, total: r3.length, issues: e5 }, `contributes.${n3}: ${a3}/${r3.length} \u6761 entry \u6821\u9A8C\u5931\u8D25\uFF0C\u5DF2\u9759\u9ED8\u4E22\u5F03\uFF08fail-soft\uFF09`);
52312
52339
  }
52313
52340
  return i2.length > 0 ? i2 : void 0;
52314
52341
  });
@@ -52320,71 +52347,71 @@ var je2 = external_exports.enum([`low`, `medium`, `high`, `xhigh`, `max`]);
52320
52347
  var Me2 = external_exports.enum([`enabled`, `adaptive`]);
52321
52348
  var Ne2 = external_exports.object({ id: E3, contextWindow: external_exports.number().int().positive(), maxOutput: external_exports.number().int().positive(), cost: T2(Oe2), strengths: T2(external_exports.array(Ae2).min(1)), reasoning: T2(external_exports.boolean()), thinkingLevels: T2(external_exports.array(je2).min(1)), thinkingMode: T2(Me2) });
52322
52349
  var Pe = external_exports.enum([`openai-completions`, `openai-responses`, `anthropic-messages`]);
52323
- var Fe2 = external_exports.object({ label: E3, value: E3.refine((e6) => !e6.startsWith(`!`) && !e6.startsWith(`#`), `value must not start with '!' or '#' (mode-prefix collision)`), kind: external_exports.enum([`resource`, `hashtag`]), description: T2(E3), resolverId: T2(E3) });
52350
+ var Fe2 = external_exports.object({ label: E3, value: E3.refine((e4) => !e4.startsWith(`!`) && !e4.startsWith(`#`), `value must not start with '!' or '#' (mode-prefix collision)`), kind: external_exports.enum([`resource`, `hashtag`]), description: T2(E3), resolverId: T2(E3) });
52324
52351
  var Ie = external_exports.object({ id: E3, dataSource: external_exports.object({ contextKey: E3 }), point: T2(E3), when: T2(E3), order: T2(external_exports.number()) });
52325
- var Le = external_exports.union([E3, external_exports.object({ file: E3.refine((e6) => !e6.startsWith(`/`) && !e6.split(/[\\/]/).includes(`..`), `unsafe path (absolute or traversal)`) })]);
52352
+ var Le = external_exports.union([E3, external_exports.object({ file: E3.refine((e4) => !e4.startsWith(`/`) && !e4.split(/[\\/]/).includes(`..`), `unsafe path (absolute or traversal)`) })]);
52326
52353
  var Re2 = external_exports.object({ id: E3, priority: T2(external_exports.number()), content: Le });
52327
52354
  var ze2 = external_exports.object({ id: E3, translations: external_exports.record(external_exports.string(), external_exports.string()) });
52328
52355
  var Be2 = /[\u0000-\u0008\u000b\u000c\u000e-\u001f\u007f]/;
52329
- var O2 = (e6) => !Be2.test(e6);
52356
+ var O2 = (e4) => !Be2.test(e4);
52330
52357
  var Ve = /^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/;
52331
- var k3 = (t4) => external_exports.string().max(16).refine((e6) => Ve.test(e6), `${t4} must be a #RRGGBB or #RGB hex color`);
52358
+ var k3 = (t3) => external_exports.string().max(16).refine((e4) => Ve.test(e4), `${t3} must be a #RRGGBB or #RGB hex color`);
52332
52359
  var He = external_exports.object({ brand: k3(`brand`), brandShimmer: k3(`brandShimmer`), accent: k3(`accent`), accentDim: k3(`accentDim`), accentBright: k3(`accentBright`), text: T2(k3(`text`)), inactive: k3(`inactive`), secondary: k3(`secondary`), subtle: k3(`subtle`), replyPrefix: k3(`replyPrefix`), success: k3(`success`), error: k3(`error`), warning: k3(`warning`), special: k3(`special`), suggestion: k3(`suggestion`), permission: k3(`permission`), codeText: k3(`codeText`), diffAdd: k3(`diffAdd`), diffRemove: k3(`diffRemove`), diffAddBg: k3(`diffAddBg`), diffRemoveBg: k3(`diffRemoveBg`), panelBorder: k3(`panelBorder`), overlayBg: k3(`overlayBg`), tagBg: k3(`tagBg`), toolText: k3(`toolText`), focusBorder: k3(`focusBorder`), selection: k3(`selection`) });
52333
52360
  var A2 = external_exports.enum(`brand.brandShimmer.accent.accentDim.accentBright.text.inactive.secondary.subtle.replyPrefix.success.error.warning.special.suggestion.permission.codeText.diffAdd.diffRemove.diffAddBg.diffRemoveBg.panelBorder.overlayBg.tagBg.toolText.focusBorder.selection`.split(`.`));
52334
52361
  var Ue = external_exports.strictObject({ heading1: T2(A2), heading2: T2(A2), headingWeak: T2(A2), listMarker: T2(A2), listMarkerMuted: T2(A2), quoteBar: T2(A2), quoteText: T2(A2), link: T2(A2), inlineCode: T2(A2), codeFence: T2(A2), tableHeader: T2(A2), tableDivider: T2(A2), listIndent: T2(external_exports.union([external_exports.literal(2), external_exports.literal(3)])), listMarkers: T2(external_exports.tuple([external_exports.string().min(1).max(4), external_exports.string().min(1).max(4), external_exports.string().min(1).max(4), external_exports.string().min(1).max(4)])), codeBlockDivider: T2(external_exports.enum([`hr`, `none`])) });
52335
- var We = external_exports.object({ localId: E3.max(64).refine((e6) => w2.test(e6), `localId must be kebab-case`), label: E3.max(64).refine(O2, `label must not contain control characters`), appearance: external_exports.enum([`dark`, `light`]), colors: He, markdown: T2(Ue), meta: T2(external_exports.object({ author: T2(E3.max(128).refine(O2, `author must not contain control characters`)), description: T2(E3.max(256).refine(O2, `description must not contain control characters`)), version: T2(E3.max(32).refine(O2, `version must not contain control characters`)) })) });
52362
+ var We = external_exports.object({ localId: E3.max(64).refine((e4) => w2.test(e4), `localId must be kebab-case`), label: E3.max(64).refine(O2, `label must not contain control characters`), appearance: external_exports.enum([`dark`, `light`]), colors: He, markdown: T2(Ue), meta: T2(external_exports.object({ author: T2(E3.max(128).refine(O2, `author must not contain control characters`)), description: T2(E3.max(256).refine(O2, `description must not contain control characters`)), version: T2(E3.max(32).refine(O2, `version must not contain control characters`)) })) });
52336
52363
  var qe = 2 * 1024;
52337
52364
  var Ye = 64 * 1024;
52338
52365
  var Xe = external_exports.object({ id: E3, label: E3, toolRef: E3 });
52339
- var Ze = external_exports.object({ header: E3.refine((e6) => /^[a-zA-Z0-9][a-zA-Z0-9\-_]*$/.test(e6), `header name must be alphanumeric with hyphens/underscores only`), source: external_exports.object({ kind: external_exports.literal(`jwt-claim`), claim: E3, namespace: T2(E3), tokenSources: T2(external_exports.array(external_exports.enum([`id_token`, `access_token`]))) }) });
52366
+ var Ze = external_exports.object({ header: E3.refine((e4) => /^[a-zA-Z0-9][a-zA-Z0-9\-_]*$/.test(e4), `header name must be alphanumeric with hyphens/underscores only`), source: external_exports.object({ kind: external_exports.literal(`jwt-claim`), claim: E3, namespace: T2(E3), tokenSources: T2(external_exports.array(external_exports.enum([`id_token`, `access_token`]))) }) });
52340
52367
  var Qe = external_exports.object({ imageConstraints: T2(ke2), supportsTools: T2(external_exports.boolean()) });
52341
52368
  var j3 = external_exports.object({ url: E3, responseFormat: external_exports.literal(`openai-list`), authScheme: T2(external_exports.enum([`bearer`, `x-api-key`, `auto`])), betaHeaderName: T2(E3), modelIdExclude: T2(D2(external_exports.string(), `modelIdExclude`)) });
52342
52369
  var M2 = external_exports.object({ store: T2(external_exports.boolean()), sendMaxOutputTokens: T2(external_exports.boolean()) });
52343
- var $e = external_exports.object({ id: E3, name: T2(E3), catalogOnly: T2(external_exports.boolean()), baseUrl: T2(E3), wireApi: T2(Pe), envKey: T2(E3), oauthRef: T2(E3), headers: T2(external_exports.record(external_exports.string(), external_exports.string())), models: T2(D2(Ne2, `models`)), tokenDerivedHeaders: T2(D2(Ze, `tokenDerivedHeaders`)), modelsEndpoint: T2(j3), responseBodyPolicy: T2(M2), allowAuthHeaderOverride: T2(external_exports.boolean()), preserveProviderId: T2(external_exports.boolean()) }).extend(Qe.shape).superRefine((t4, n4) => {
52344
- if (t4.catalogOnly === true) {
52345
- t4.wireApi && n4.addIssue({ code: external_exports.ZodIssueCode.custom, message: `catalogOnly entries must not declare wireApi; use providerFactories for custom protocols`, path: [`wireApi`] }), t4.baseUrl && n4.addIssue({ code: external_exports.ZodIssueCode.custom, message: `catalogOnly entries must not declare baseUrl; use providerFactories for custom protocols`, path: [`baseUrl`] });
52370
+ var $e = external_exports.object({ id: E3, name: T2(E3), catalogOnly: T2(external_exports.boolean()), baseUrl: T2(E3), wireApi: T2(Pe), envKey: T2(E3), oauthRef: T2(E3), headers: T2(external_exports.record(external_exports.string(), external_exports.string())), models: T2(D2(Ne2, `models`)), tokenDerivedHeaders: T2(D2(Ze, `tokenDerivedHeaders`)), modelsEndpoint: T2(j3), responseBodyPolicy: T2(M2), allowAuthHeaderOverride: T2(external_exports.boolean()), preserveProviderId: T2(external_exports.boolean()) }).extend(Qe.shape).superRefine((t3, n3) => {
52371
+ if (t3.catalogOnly === true) {
52372
+ t3.wireApi && n3.addIssue({ code: external_exports.ZodIssueCode.custom, message: `catalogOnly entries must not declare wireApi; use providerFactories for custom protocols`, path: [`wireApi`] }), t3.baseUrl && n3.addIssue({ code: external_exports.ZodIssueCode.custom, message: `catalogOnly entries must not declare baseUrl; use providerFactories for custom protocols`, path: [`baseUrl`] });
52346
52373
  return;
52347
52374
  }
52348
- t4.baseUrl || n4.addIssue({ code: external_exports.ZodIssueCode.custom, message: `baseUrl is required unless catalogOnly is true`, path: [`baseUrl`] }), t4.wireApi || n4.addIssue({ code: external_exports.ZodIssueCode.custom, message: `wireApi is required unless catalogOnly is true`, path: [`wireApi`] });
52375
+ t3.baseUrl || n3.addIssue({ code: external_exports.ZodIssueCode.custom, message: `baseUrl is required unless catalogOnly is true`, path: [`baseUrl`] }), t3.wireApi || n3.addIssue({ code: external_exports.ZodIssueCode.custom, message: `wireApi is required unless catalogOnly is true`, path: [`wireApi`] });
52349
52376
  });
52350
- var et = external_exports.object({ name: E3.refine((e6) => /^[a-z][a-z0-9-]*$/.test(e6), `must be lowercase kebab-case`), bin: T2(E3) });
52377
+ var et = external_exports.object({ name: E3.refine((e4) => /^[a-z][a-z0-9-]*$/.test(e4), `must be lowercase kebab-case`), bin: T2(E3) });
52351
52378
  var tt = external_exports.discriminatedUnion(`kind`, [external_exports.object({ kind: external_exports.literal(`pkce`), id: E3, name: T2(E3), clientId: E3, authorizeUrl: E3, tokenUrl: E3, redirectUri: E3, scope: E3, loopbackPorts: T2(external_exports.array(external_exports.number().int().positive())), assumesLoopbackAlways: T2(external_exports.boolean()), extraAuthParams: T2(external_exports.record(external_exports.string(), external_exports.string())), tokenExchangeEncoding: T2(external_exports.enum([`json`, `form`])), subscriptionScoped: T2(external_exports.boolean()), oauthBeta: T2(E3) }), external_exports.object({ kind: external_exports.literal(`device-flow`), id: E3, name: T2(E3), clientId: E3, deviceCodeUrlTemplate: E3, tokenUrlTemplate: E3, refreshUrlTemplate: T2(E3), scope: E3, allowCustomDomain: T2(external_exports.boolean()), userAgent: T2(E3) })]);
52352
- var nt = external_exports.object({ skills: T2(external_exports.boolean()), agents: T2(external_exports.boolean()), commands: T2(external_exports.boolean()), mcp: T2(external_exports.boolean()), cli: T2(et), panels: T2(Ce2), actions: T2(D2(Te, `actions`)), menus: T2(D2(Ee2, `menus`)), contextKeys: T2(D2(De2, `contextKeys`)), providers: T2(D2($e, `providers`)), oauth: T2(D2(tt, `oauth`)), statusItems: T2(D2(Ie, `statusItems`)), perfMetrics: T2(D2(Xe, `perfMetrics`)), renderers: T2(Se), fileViewers: T2(ye), statusWidgets: T2(xe), a2uiComponents: T2(be), contextSources: T2(D2(Re2, `contextSources`)), i18n: T2(D2(ze2, `i18n`)), themePresets: T2(D2(We, `themePresets`)), i18nDir: T2(E3.refine((e6) => !e6.startsWith(`/`) && !e6.split(/[\\/]/).includes(`..`), `unsafe path (absolute or traversal)`)), inputEntries: T2(E3), sigilEntries: T2(D2(Fe2, `sigilEntries`)), a2uiRenderers: T2(D2(_e, `a2uiRenderers`)) });
52379
+ var nt = external_exports.object({ skills: T2(external_exports.boolean()), agents: T2(external_exports.boolean()), commands: T2(external_exports.boolean()), mcp: T2(external_exports.boolean()), cli: T2(et), panels: T2(Ce2), actions: T2(D2(Te, `actions`)), menus: T2(D2(Ee2, `menus`)), contextKeys: T2(D2(De2, `contextKeys`)), providers: T2(D2($e, `providers`)), oauth: T2(D2(tt, `oauth`)), statusItems: T2(D2(Ie, `statusItems`)), perfMetrics: T2(D2(Xe, `perfMetrics`)), renderers: T2(Se), fileViewers: T2(ye), statusWidgets: T2(xe), a2uiComponents: T2(be), contextSources: T2(D2(Re2, `contextSources`)), i18n: T2(D2(ze2, `i18n`)), themePresets: T2(D2(We, `themePresets`)), i18nDir: T2(E3.refine((e4) => !e4.startsWith(`/`) && !e4.split(/[\\/]/).includes(`..`), `unsafe path (absolute or traversal)`)), inputEntries: T2(E3), sigilEntries: T2(D2(Fe2, `sigilEntries`)), a2uiRenderers: T2(D2(_e, `a2uiRenderers`)) });
52353
52380
  var rt = external_exports.enum(pe);
52354
- var it = external_exports.array(external_exports.unknown()).transform((e6) => {
52355
- let t4 = e6.map((e7) => rt.safeParse(e7)).filter((e7) => e7.success).map((e7) => e7.data);
52356
- return t4.length > 0 ? [...new Set(t4)] : void 0;
52381
+ var it = external_exports.array(external_exports.unknown()).transform((e4) => {
52382
+ let t3 = e4.map((e5) => rt.safeParse(e5)).filter((e5) => e5.success).map((e5) => e5.data);
52383
+ return t3.length > 0 ? [...new Set(t3)] : void 0;
52357
52384
  });
52358
52385
  var at = /^(onStartup|onCommand:[^\s]+|onView:[^\s]+|onProvider:[^\s]+)$/;
52359
- var ot = external_exports.array(external_exports.unknown()).transform((e6) => {
52360
- let t4 = e6.filter((e7) => typeof e7 == `string` && at.test(e7));
52361
- return t4.length > 0 ? [...new Set(t4)] : void 0;
52386
+ var ot = external_exports.array(external_exports.unknown()).transform((e4) => {
52387
+ let t3 = e4.filter((e5) => typeof e5 == `string` && at.test(e5));
52388
+ return t3.length > 0 ? [...new Set(t3)] : void 0;
52362
52389
  });
52363
- var st = external_exports.array(external_exports.unknown()).transform((e6) => {
52364
- let t4 = e6.filter((e7) => typeof e7 == `string` && w2.test(e7));
52365
- return t4.length > 0 ? [...new Set(t4)] : void 0;
52390
+ var st = external_exports.array(external_exports.unknown()).transform((e4) => {
52391
+ let t3 = e4.filter((e5) => typeof e5 == `string` && w2.test(e5));
52392
+ return t3.length > 0 ? [...new Set(t3)] : void 0;
52366
52393
  });
52367
- var ct = external_exports.array(external_exports.unknown()).transform((e6) => {
52368
- let t4 = e6.filter((e7) => typeof e7 == `string` && e7.trim().length > 0);
52369
- return t4.length > 0 ? [...new Set(t4)] : void 0;
52394
+ var ct = external_exports.array(external_exports.unknown()).transform((e4) => {
52395
+ let t3 = e4.filter((e5) => typeof e5 == `string` && e5.trim().length > 0);
52396
+ return t3.length > 0 ? [...new Set(t3)] : void 0;
52370
52397
  });
52371
52398
  var lt = j3.extend({ headers: T2(external_exports.record(external_exports.string(), external_exports.string())) });
52372
- var ut = external_exports.record(external_exports.string(), external_exports.unknown()).transform((e6) => {
52373
- let t4 = {};
52374
- for (let [n4, r4] of Object.entries(e6)) {
52375
- let e7 = lt.safeParse(r4);
52376
- e7.success && (t4[n4] = e7.data);
52399
+ var ut = external_exports.record(external_exports.string(), external_exports.unknown()).transform((e4) => {
52400
+ let t3 = {};
52401
+ for (let [n3, r3] of Object.entries(e4)) {
52402
+ let e5 = lt.safeParse(r3);
52403
+ e5.success && (t3[n3] = e5.data);
52377
52404
  }
52378
- return Object.keys(t4).length > 0 ? t4 : void 0;
52405
+ return Object.keys(t3).length > 0 ? t3 : void 0;
52379
52406
  });
52380
52407
  var dt = external_exports.object({ baseUrl: E3, models: D2(Ne2, `codeProviderModels`), responseBodyPolicy: T2(M2) }).extend(Qe.shape);
52381
- var ft = external_exports.record(external_exports.string(), external_exports.unknown()).transform((e6) => {
52382
- let t4 = {};
52383
- for (let [n4, r4] of Object.entries(e6)) {
52384
- let e7 = dt.safeParse(r4);
52385
- e7.success && e7.data.models && e7.data.models.length > 0 && (t4[n4] = e7.data);
52408
+ var ft = external_exports.record(external_exports.string(), external_exports.unknown()).transform((e4) => {
52409
+ let t3 = {};
52410
+ for (let [n3, r3] of Object.entries(e4)) {
52411
+ let e5 = dt.safeParse(r3);
52412
+ e5.success && e5.data.models && e5.data.models.length > 0 && (t3[n3] = e5.data);
52386
52413
  }
52387
- return Object.keys(t4).length > 0 ? t4 : void 0;
52414
+ return Object.keys(t3).length > 0 ? t3 : void 0;
52388
52415
  });
52389
52416
  var pt = external_exports.object({ postinstall: T2(E3), setup: T2(E3) }).catchall(E3);
52390
52417
  var mt = external_exports.object({ otto: T2(E3) });
@@ -52393,8 +52420,8 @@ var P2 = Be(`@x-otto/coding:plugin-discovery`);
52393
52420
  var z4 = { extensionDetailActions: `extension/detail/actions` };
52394
52421
  var B2 = { statuslineItem: `shell/statusline/item`, menuItem: `shell/menu/item` };
52395
52422
  var Et = { ...z4, ...B2 };
52396
- function At2(e6) {
52397
- return e6;
52423
+ function At2(e4) {
52424
+ return e4;
52398
52425
  }
52399
52426
  var Ft = Be(`@x-otto/plugin:file-provider`);
52400
52427
  var Vt = Be(`@x-otto/coding:trust-store`);
@@ -52563,11 +52590,11 @@ var isAbsoluteURL = (url2) => {
52563
52590
  };
52564
52591
  var isArray = (val) => (isArray = Array.isArray, isArray(val));
52565
52592
  var isReadonlyArray = isArray;
52566
- function maybeObj(x6) {
52567
- if (typeof x6 !== "object") {
52593
+ function maybeObj(x5) {
52594
+ if (typeof x5 !== "object") {
52568
52595
  return {};
52569
52596
  }
52570
- return x6 ?? {};
52597
+ return x5 ?? {};
52571
52598
  }
52572
52599
  function isEmptyObj(obj) {
52573
52600
  if (!obj)
@@ -52579,14 +52606,14 @@ function isEmptyObj(obj) {
52579
52606
  function hasOwn(obj, key) {
52580
52607
  return Object.prototype.hasOwnProperty.call(obj, key);
52581
52608
  }
52582
- var validatePositiveInteger = (name, n4) => {
52583
- if (typeof n4 !== "number" || !Number.isInteger(n4)) {
52609
+ var validatePositiveInteger = (name, n3) => {
52610
+ if (typeof n3 !== "number" || !Number.isInteger(n3)) {
52584
52611
  throw new AnthropicError(`${name} must be an integer`);
52585
52612
  }
52586
- if (n4 < 0) {
52613
+ if (n3 < 0) {
52587
52614
  throw new AnthropicError(`${name} must be a positive integer`);
52588
52615
  }
52589
- return n4;
52616
+ return n3;
52590
52617
  };
52591
52618
  var safeJSON = (text) => {
52592
52619
  try {
@@ -52779,9 +52806,9 @@ function ReadableStreamToAsyncIterable(stream) {
52779
52806
  if (result?.done)
52780
52807
  reader.releaseLock();
52781
52808
  return result;
52782
- } catch (e6) {
52809
+ } catch (e4) {
52783
52810
  reader.releaseLock();
52784
- throw e6;
52811
+ throw e4;
52785
52812
  }
52786
52813
  },
52787
52814
  async return() {
@@ -53029,19 +53056,19 @@ var Stream = class _Stream {
53029
53056
  if (sse.event === "completion") {
53030
53057
  try {
53031
53058
  yield JSON.parse(sse.data);
53032
- } catch (e6) {
53059
+ } catch (e4) {
53033
53060
  logger.error(`Could not parse message into JSON:`, sse.data);
53034
53061
  logger.error(`From chunk:`, sse.raw);
53035
- throw e6;
53062
+ throw e4;
53036
53063
  }
53037
53064
  }
53038
53065
  if (sse.event === "message_start" || sse.event === "message_delta" || sse.event === "message_stop" || sse.event === "content_block_start" || sse.event === "content_block_delta" || sse.event === "content_block_stop" || sse.event === "message") {
53039
53066
  try {
53040
53067
  yield JSON.parse(sse.data);
53041
- } catch (e6) {
53068
+ } catch (e4) {
53042
53069
  logger.error(`Could not parse message into JSON:`, sse.data);
53043
53070
  logger.error(`From chunk:`, sse.raw);
53044
- throw e6;
53071
+ throw e4;
53045
53072
  }
53046
53073
  }
53047
53074
  if (sse.event === "ping") {
@@ -53054,10 +53081,10 @@ var Stream = class _Stream {
53054
53081
  }
53055
53082
  }
53056
53083
  done = true;
53057
- } catch (e6) {
53058
- if (isAbortError(e6))
53084
+ } catch (e4) {
53085
+ if (isAbortError(e4))
53059
53086
  return;
53060
- throw e6;
53087
+ throw e4;
53061
53088
  } finally {
53062
53089
  if (!done)
53063
53090
  controller.abort();
@@ -53097,10 +53124,10 @@ var Stream = class _Stream {
53097
53124
  yield JSON.parse(line);
53098
53125
  }
53099
53126
  done = true;
53100
- } catch (e6) {
53101
- if (isAbortError(e6))
53127
+ } catch (e4) {
53128
+ if (isAbortError(e4))
53102
53129
  return;
53103
- throw e6;
53130
+ throw e4;
53104
53131
  } finally {
53105
53132
  if (!done)
53106
53133
  controller.abort();
@@ -53736,7 +53763,7 @@ var createPathTagFunction = (pathEncoder = encodeURIPath) => function path2(stat
53736
53763
  error: `Value "${match[0]}" can't be safely passed as a path parameter`
53737
53764
  });
53738
53765
  }
53739
- invalidSegments.sort((a4, b6) => a4.start - b6.start);
53766
+ invalidSegments.sort((a3, b5) => a3.start - b5.start);
53740
53767
  if (invalidSegments.length > 0) {
53741
53768
  let lastEnd = 0;
53742
53769
  const underline = invalidSegments.reduce((acc, segment) => {
@@ -53746,7 +53773,7 @@ var createPathTagFunction = (pathEncoder = encodeURIPath) => function path2(stat
53746
53773
  return acc + spaces + arrows;
53747
53774
  }, "");
53748
53775
  throw new AnthropicError(`Path parameters result in path with invalid segments:
53749
- ${invalidSegments.map((e6) => e6.error).join("\n")}
53776
+ ${invalidSegments.map((e4) => e4.error).join("\n")}
53750
53777
  ${path3}
53751
53778
  ${underline}`);
53752
53779
  }
@@ -54772,7 +54799,7 @@ var BetaMessageStream = class _BetaMessageStream {
54772
54799
  const listeners = __classPrivateFieldGet(this, _BetaMessageStream_listeners, "f")[event];
54773
54800
  if (!listeners)
54774
54801
  return this;
54775
- const index = listeners.findIndex((l4) => l4.listener === listener);
54802
+ const index = listeners.findIndex((l3) => l3.listener === listener);
54776
54803
  if (index >= 0)
54777
54804
  listeners.splice(index, 1);
54778
54805
  return this;
@@ -54840,7 +54867,7 @@ var BetaMessageStream = class _BetaMessageStream {
54840
54867
  }
54841
54868
  const listeners = __classPrivateFieldGet(this, _BetaMessageStream_listeners, "f")[event];
54842
54869
  if (listeners) {
54843
- __classPrivateFieldGet(this, _BetaMessageStream_listeners, "f")[event] = listeners.filter((l4) => !l4.once);
54870
+ __classPrivateFieldGet(this, _BetaMessageStream_listeners, "f")[event] = listeners.filter((l3) => !l3.once);
54844
54871
  listeners.forEach(({ listener }) => listener(...args));
54845
54872
  }
54846
54873
  if (event === "abort") {
@@ -55162,7 +55189,7 @@ var BetaMessageStream = class _BetaMessageStream {
55162
55189
  return stream.toReadableStream();
55163
55190
  }
55164
55191
  };
55165
- function checkNever(x6) {
55192
+ function checkNever(x5) {
55166
55193
  }
55167
55194
 
55168
55195
  // ../../node_modules/.pnpm/@anthropic-ai+sdk@0.88.0_zod@4.4.3/node_modules/@anthropic-ai/sdk/lib/tools/ToolError.mjs
@@ -55519,7 +55546,7 @@ async function generateToolResponse(params, lastMessage = params.messages.at(-1)
55519
55546
  return null;
55520
55547
  }
55521
55548
  const toolResults = await Promise.all(toolUseBlocks.map(async (toolUse) => {
55522
- const tool = params.tools.find((t4) => ("name" in t4 ? t4.name : t4.mcp_server_name) === toolUse.name);
55549
+ const tool = params.tools.find((t3) => ("name" in t3 ? t3.name : t3.mcp_server_name) === toolUse.name);
55523
55550
  if (!tool || !("run" in tool)) {
55524
55551
  return {
55525
55552
  type: "tool_result",
@@ -57050,7 +57077,7 @@ var MessageStream = class _MessageStream {
57050
57077
  const listeners = __classPrivateFieldGet(this, _MessageStream_listeners, "f")[event];
57051
57078
  if (!listeners)
57052
57079
  return this;
57053
- const index = listeners.findIndex((l4) => l4.listener === listener);
57080
+ const index = listeners.findIndex((l3) => l3.listener === listener);
57054
57081
  if (index >= 0)
57055
57082
  listeners.splice(index, 1);
57056
57083
  return this;
@@ -57118,7 +57145,7 @@ var MessageStream = class _MessageStream {
57118
57145
  }
57119
57146
  const listeners = __classPrivateFieldGet(this, _MessageStream_listeners, "f")[event];
57120
57147
  if (listeners) {
57121
- __classPrivateFieldGet(this, _MessageStream_listeners, "f")[event] = listeners.filter((l4) => !l4.once);
57148
+ __classPrivateFieldGet(this, _MessageStream_listeners, "f")[event] = listeners.filter((l3) => !l3.once);
57122
57149
  listeners.forEach(({ listener }) => listener(...args));
57123
57150
  }
57124
57151
  if (event === "abort") {
@@ -57415,7 +57442,7 @@ var MessageStream = class _MessageStream {
57415
57442
  return stream.toReadableStream();
57416
57443
  }
57417
57444
  };
57418
- function checkNever2(x6) {
57445
+ function checkNever2(x5) {
57419
57446
  }
57420
57447
 
57421
57448
  // ../../node_modules/.pnpm/@anthropic-ai+sdk@0.88.0_zod@4.4.3/node_modules/@anthropic-ai/sdk/resources/messages/batches.mjs
@@ -58191,431 +58218,94 @@ Anthropic.Messages = Messages2;
58191
58218
  Anthropic.Models = Models2;
58192
58219
  Anthropic.Beta = Beta;
58193
58220
 
58194
- // ../shared/dist/event-bus-CABu09lC.js
58195
- var e4 = class {
58196
- listeners = {};
58197
- on(e6, t4) {
58198
- let n4 = this.listeners[e6];
58199
- return n4 || (n4 = /* @__PURE__ */ new Set(), this.listeners[e6] = n4), n4.add(t4), () => this.off(e6, t4);
58200
- }
58201
- off(e6, t4) {
58202
- this.listeners[e6]?.delete(t4);
58203
- }
58204
- emit(e6, ...t4) {
58205
- let n4 = this.listeners[e6];
58206
- if (n4) for (let e7 of [...n4]) e7(...t4);
58207
- }
58208
- once(e6, t4) {
58209
- let n4 = ((...r4) => {
58210
- this.off(e6, n4), t4(...r4);
58211
- });
58212
- return this.on(e6, n4);
58213
- }
58214
- removeAllListeners(e6) {
58215
- if (e6 !== void 0) delete this.listeners[e6];
58216
- else for (let e7 of Object.keys(this.listeners)) delete this.listeners[e7];
58217
- }
58218
- listenerCount(e6) {
58219
- return this.listeners[e6]?.size ?? 0;
58220
- }
58221
- };
58222
- var t3 = class extends e4 {
58223
- publish(e6) {
58224
- let t4 = (e7, ...t5) => this.emit(e7, ...t5);
58225
- for (let [n4, r4] of Object.entries(e6)) {
58226
- let e7 = r4 ?? [];
58227
- t4(n4, ...e7), t4(`*`, n4, ...e7);
58228
- }
58229
- }
58230
- subscribe(e6, t4, n4 = false) {
58231
- return n4 ? this.once(e6, t4) : this.on(e6, t4);
58232
- }
58233
- subscribeAll(e6) {
58234
- return this.subscribe(`*`, e6);
58235
- }
58236
- };
58237
-
58238
- // ../shared/dist/index.js
58239
- var import_node_module2 = require("node:module");
58240
- var import_pino2 = __toESM(require("/Users/aniwei/Desktop/workspaces/x-coding-agent/node_modules/.pnpm/pino@10.3.1/node_modules/pino/pino.js"), 1);
58241
- var import_node_stream2 = require("node:stream");
58242
- var import_mime_types2 = __toESM(require_mime_types(), 1);
58243
- var import_jsonc_parser2 = require("/Users/aniwei/Desktop/workspaces/x-coding-agent/node_modules/.pnpm/jsonc-parser@3.3.1/node_modules/jsonc-parser/lib/umd/main.js");
58244
- var import_undici2 = __toESM(require_undici(), 1);
58245
- var b4 = class extends Error {
58246
- code;
58247
- cause;
58248
- status;
58249
- headers;
58250
- errorType;
58251
- pluginSource;
58252
- constructor(e6, t4) {
58253
- super(e6, { cause: t4.cause }), this.name = new.target.name, this.code = t4.code, this.cause = t4.cause, this.status = t4.status, this.headers = t4.headers, this.errorType = t4.errorType, this.pluginSource = t4.pluginSource;
58254
- }
58255
- };
58256
- var x4 = class extends b4 {
58257
- };
58258
- var Ce3 = class extends b4 {
58259
- };
58260
- var { setPrototypeOf: Ee3 = function(e6, t4) {
58261
- return e6.__proto__ = t4, e6;
58262
- } } = Object;
58263
- var C2 = class e5 extends Error {
58264
- framesToPop = 1;
58265
- name = `Invariant Violation`;
58266
- constructor(t4 = `Invariant Violation`) {
58267
- super(typeof t4 == `number` ? `Invariant Violation: ${t4}` : t4), Ee3(this, e5.prototype);
58268
- }
58269
- };
58270
- function w3(e6, t4) {
58271
- if (typeof e6 == `function`) w3(e6(), t4);
58272
- else if (!e6) throw new C2(t4);
58273
- }
58274
- var De3 = /* @__PURE__ */ new Set([`trace`, `debug`, `info`, `warn`, `error`, `fatal`]);
58275
- function T3(e6) {
58276
- return De3.has(e6) ? e6 : `info`;
58277
- }
58278
- var Oe3 = (() => {
58279
- try {
58280
- return (0, import_node_module2.createRequire)(__otto_plugin_import_meta_url);
58281
- } catch {
58282
- return;
58283
- }
58284
- })();
58285
- function ke3() {
58286
- if (!Oe3) return false;
58287
- try {
58288
- return Oe3.resolve(`pino-pretty`), true;
58289
- } catch {
58290
- return false;
58291
- }
58292
- }
58293
- function Ae3(e6) {
58294
- return e6 === `stdout` ? 1 : e6 === `stderr` ? 2 : e6;
58295
- }
58296
- function je3() {
58297
- return process.env.OTTO_LOG_STDERR === `0`;
58298
- }
58299
- function Me3() {
58300
- return process.env.OTTO_LOG_FILE || `${process.env.HOME || process.env.USERPROFILE || `.`}/.otto/logs/otto.log`;
58301
- }
58302
- function Ne3(e6, t4) {
58303
- let n4 = ke3(), r4 = je3(), i2 = { target: n4 ? `pino-pretty` : `pino/file`, options: n4 ? { colorize: true, destination: 2 } : { destination: 2 }, level: t4 };
58304
- if (!e6 || e6 === `stdout` || e6 === `stderr`) return r4 ? [{ target: `pino/file`, options: { destination: Me3(), mkdir: true }, level: t4 }] : [i2];
58305
- let a4 = { target: `pino/file`, options: { destination: Ae3(e6), mkdir: true }, level: t4 };
58306
- return r4 ? [a4] : [a4, i2];
58307
- }
58308
- var E4 = new import_node_stream2.PassThrough();
58309
- var D3 = new t3();
58310
- E4.on(`data`, (e6) => {
58311
- try {
58312
- D3.publish({ log: [JSON.parse(e6.toString())] });
58313
- } catch (t4) {
58314
- console.warn(`Failed to parse log chunk for listener:`, e6.toString(), t4);
58315
- }
58316
- });
58317
- var O3 = null;
58318
- var k4 = T3(oe);
58319
- var Fe3 = /* @__PURE__ */ new Set();
58320
- var A3 = null;
58321
- function Re3(e6, t4) {
58322
- return { write(n4) {
58323
- A3 ??= import_pino2.default.transport({ targets: Ne3(e6, t4) }), A3.write(n4);
58324
- } };
58325
- }
58326
- function ze3(e6, t4) {
58327
- return O3 ??= (0, import_pino2.default)({ level: e6 }, import_pino2.default.multistream([{ level: e6, stream: E4 }, { level: e6, stream: Re3(t4, e6) }])), k4 = T3(O3.level), O3;
58328
- }
58329
- function Be3(e6, t4) {
58330
- ze3(t4?.level ?? T3(oe), t4?.destination ?? X), w3(O3, `Root logger is not initialized`);
58331
- let n4 = O3.child({ name: e6 }, { level: t4?.level ?? k4 });
58332
- return Fe3.add(n4), n4;
58333
- }
58334
- var j4 = 10 * 1024 * 1024;
58335
- var I3;
58336
- function L3(e6) {
58337
- let t4 = e6 || I3;
58338
- if (t4) try {
58339
- return new import_undici2.ProxyAgent({ uri: t4 });
58340
- } catch {
58341
- return;
58342
- }
58343
- }
58344
- async function* gt2(e6) {
58345
- let { url: t4, method: n4 = `POST`, headers: r4 = {}, body: i2, timeout: a4 = 3e5, idleTimeout: o4 = 12e4, signal: s4 } = e6, c2 = new AbortController(), l4 = s4 ? AbortSignal.any([s4, c2.signal]) : c2.signal, u3 = setTimeout(() => c2.abort(), a4), d, f = () => {
58346
- d && clearTimeout(d), d = setTimeout(() => c2.abort(), o4);
58347
- }, p;
58348
- try {
58349
- let a5 = L3(e6.proxy), o5 = { method: n4, headers: { "content-type": `application/json`, accept: `text/event-stream`, ...r4 }, body: i2 ? typeof i2 == `string` ? i2 : JSON.stringify(i2) : void 0, signal: l4 }, s5 = await fetch(t4, a5 ? { ...o5, dispatcher: a5 } : o5);
58350
- if (!s5.ok) {
58351
- let e7 = await s5.text(), t5 = `BAD_RESPONSE`;
58352
- s5.status === 429 ? t5 = `RATE_LIMIT` : s5.status === 529 ? t5 = `OVERLOADED` : s5.status >= 500 ? t5 = `SERVER_ERROR` : s5.status >= 400 && (t5 = `REQUEST_ERROR`);
58353
- let n5;
58354
- try {
58355
- let t6 = JSON.parse(e7)?.error;
58356
- n5 = t6?.code ?? t6?.type;
58357
- } catch {
58358
- }
58359
- throw new x4(`Http request failed ${s5.status}: ${e7}`, { code: t5, status: s5.status, headers: s5.headers, errorType: n5 });
58360
- }
58361
- if (e6.onResponse?.(s5.headers), !s5.body) throw new x4(`Response body is empty`, { code: `BAD_RESPONSE` });
58362
- p = s5.body.getReader();
58363
- let c3 = new TextDecoder(), u4 = [], d2 = createParser({ onEvent(e7) {
58364
- u4.push({ event: e7.event || void 0, data: e7.data, id: e7.id || void 0 });
58365
- } });
58366
- for (f(); ; ) {
58367
- let { done: e7, value: t5 } = await p.read();
58368
- if (e7) break;
58369
- for (f(), d2.feed(c3.decode(t5, { stream: true })); u4.length > 0; ) {
58370
- let e8 = u4.shift();
58371
- e8 && (yield e8);
58372
- }
58373
- }
58374
- for (d2.feed(c3.decode()); u4.length > 0; ) {
58375
- let e7 = u4.shift();
58376
- e7 && (yield e7);
58377
- }
58378
- } catch (e7) {
58379
- throw e7 instanceof x4 ? e7 : e7 instanceof DOMException && e7.name === `AbortError` ? new x4(`Stream aborted or timed out`, { code: `TIMEOUT`, cause: e7 }) : new x4(`Stream request failed`, { code: `NETWORK_ERROR`, cause: e7 instanceof Error ? e7 : Error(String(e7)) });
58380
- } finally {
58381
- clearTimeout(u3), d && clearTimeout(d), p && p.cancel().catch(() => {
58382
- });
58383
- }
58384
- }
58385
- function _t(e6, t4) {
58386
- if (e6 == null) return;
58387
- if (typeof e6.get == `function`) return e6.get(t4) ?? void 0;
58388
- let n4 = e6;
58389
- for (let e7 of Object.keys(n4)) if (e7.toLowerCase() === t4) {
58390
- let t5 = n4[e7];
58391
- return typeof t5 == `string` ? t5 : void 0;
58392
- }
58393
- }
58394
- var z5 = { Bash: `bash`, Read: `read`, Write: `write`, Edit: `edit`, MultiEdit: `edit`, Grep: `grep`, Glob: `find`, WebFetch: `web_fetch`, WebSearch: `web_search`, Task: `task_delegate`, TodoWrite: `write_todos` };
58395
- var St2 = Object.fromEntries(Object.entries(z5).reverse().map(([e6, t4]) => [t4, e6]));
58396
- function Ot2() {
58397
- return `<span class="otto-wordmark">OTTO</span>`;
58398
- }
58399
- function kt2() {
58400
- return `<svg viewBox="0 0 52 52" fill="none" xmlns="http://www.w3.org/2000/svg">
58401
- <circle cx="26" cy="26" r="24" fill="var(--gray-3)" stroke="var(--gray-5)" stroke-width="2"/>
58402
- <path d="M15.5 27l7 6.5 14-15" stroke="var(--gray-12)" stroke-width="2.8" stroke-linecap="round" stroke-linejoin="round"/>
58403
- </svg>`;
58404
- }
58405
- function At3() {
58406
- return `<svg viewBox="0 0 52 52" fill="none" xmlns="http://www.w3.org/2000/svg">
58407
- <circle cx="26" cy="26" r="24" fill="var(--gray-3)" stroke="var(--gray-5)" stroke-width="2"/>
58408
- <path d="M19 19l14 14M33 19l-14 14" stroke="var(--gray-9)" stroke-width="2.8" stroke-linecap="round"/>
58409
- </svg>`;
58410
- }
58411
- function U3(e6) {
58412
- return e6.replace(/[&<>"']/g, (e7) => ({ "&": `&amp;`, "<": `&lt;`, ">": `&gt;`, '"': `&quot;`, "'": `&#39;` })[e7] ?? e7);
58413
- }
58414
- function jt2(e6, t4, n4, r4) {
58415
- let i2 = e6 === `success` ? kt2() : At3();
58416
- return `<!doctype html>
58417
- <html lang="en">
58418
- <head>
58419
- <meta charset="utf-8">
58420
- <meta name="viewport" content="width=device-width,initial-scale=1">
58421
- <title>${U3(t4)}</title>
58422
- <style>
58423
- :root {
58424
- --gray-1:#FFFFFF;--gray-2:#F5F6FA;--gray-3:#EEF0F9;
58425
- --gray-5:#DBDDEB;--gray-7:#AEB2C8;--gray-9:#7A7EA0;
58426
- --gray-11:#565A78;--gray-12:#12152B;
58427
- --radius-xl:24px;
58428
- --shadow-card:0 1px 2px rgba(18,21,43,.04),0 8px 24px rgba(18,21,43,.06);
58429
- --hairline:.75px;
58430
- --pixel:"Silkscreen","Press Start 2P","Pixelify Sans","SF Mono",monospace;
58431
- }
58432
-
58433
- @media (prefers-color-scheme:dark) {
58434
- :root:not([data-theme=light]) {
58435
- --gray-1:#191F39;--gray-2:#111529;--gray-3:rgba(255,255,255,.08);
58436
- --gray-5:rgba(255,255,255,.11);--gray-7:rgba(255,255,255,.18);
58437
- --gray-9:rgba(255,255,255,.34);--gray-11:#AAB2CC;--gray-12:#F4F6FF;
58438
- --shadow-card:0 1px 2px rgba(0,0,0,.14),0 8px 24px rgba(0,0,0,.22);
58439
- }
58440
- }
58441
-
58442
- *,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
58443
- body{
58444
- min-height:100dvh;display:grid;place-items:center;padding:32px;
58445
- background:var(--gray-2);-webkit-font-smoothing:antialiased;
58446
- }
58447
-
58448
- .page{width:min(440px,100%);text-align:center}
58449
-
58450
- .otto-wordmark{font-family:var(--pixel);font-size:28px;font-weight:700;letter-spacing:.04em;color:var(--gray-12);margin-bottom:28px}
58451
-
58452
- .card{
58453
- padding:36px 40px;border-radius:var(--radius-xl);
58454
- border:var(--hairline) solid var(--gray-3);background:var(--gray-1);
58455
- box-shadow:var(--shadow-card);
58456
- }
58457
-
58458
- .status-icon{display:inline-block;margin-bottom:22px}
58459
- .status-icon svg{width:52px;height:52px}
58460
-
58461
- .card *{font-family:var(--pixel)}
58462
- .kicker{
58463
- font-size:11px;font-weight:700;letter-spacing:.16em;text-transform:uppercase;
58464
- color:var(--gray-7);margin-bottom:10px;
58465
- }
58466
- h1{font-size:22px;font-weight:700;line-height:1.3;letter-spacing:.02em;color:var(--gray-12)}
58467
- .desc{
58468
- margin-top:14px;font-size:13px;line-height:1.7;color:var(--gray-11);
58469
- max-width:300px;margin-left:auto;margin-right:auto;
58470
- }
58471
- .separator{
58472
- width:60px;height:2px;margin:24px auto 20px;background:var(--gray-3)
58473
- }
58474
- .footer{
58475
- font-size:11px;color:var(--gray-7);font-weight:600;letter-spacing:.06em;
58476
- text-transform:uppercase;
58477
- }
58478
- </style>
58479
- </head>
58480
- <body>
58481
- <main class="page" aria-labelledby="title">
58482
- ${Ot2()}
58483
- <section class="card">
58484
- <div class="status-icon">${i2}</div>
58485
- <p class="kicker">${e6 === `success` ? `Authentication` : `Error`}</p>
58486
- <h1 id="title">${U3(t4)}</h1>
58487
- <p class="desc">${U3(n4)}</p>
58488
- <div class="separator"></div>
58489
- <p class="footer">${U3(r4)}</p>
58490
- </section>
58491
- </main>
58492
- </body>
58493
- </html>`;
58494
- }
58495
- var Mt2 = jt2(`success`, `Login complete`, `You can close this window and return to the terminal.`, `Otto Auth`);
58496
- var Ht2 = 5 * 1024 * 1024;
58497
- var Ut2 = Buffer.from([137, 80, 78, 71, 13, 10, 26, 10]);
58498
- var Wt2 = Buffer.from(`GIF8`, `ascii`);
58499
- var K3 = process.env.OTTO_STARTUP_TRACE === `1`;
58500
- var en2 = K3 ? performance.now() : 0;
58501
- var Y2 = Be3(`@x-otto/shared:file-lock`);
58502
-
58503
- // ../interchange/dist/index.js
58504
- var a3 = /^data:([^;,]*)(?:;[^,]*)?,(.*)$/s;
58505
- function o3(e6, t4) {
58506
- let n4 = a3.exec(e6), r4 = (n4 ? n4[2] ?? `` : e6).replace(/\s+/g, ``);
58507
- return { base64: r4, mediaType: ((n4 ? n4[1] : ``) || t4 || ``).toLowerCase(), valid: s3(r4) };
58508
- }
58509
- function s3(e6) {
58510
- return e6.length === 0 || e6 === `undefined` || e6.length % 4 == 1 ? false : /^[A-Za-z0-9+/]*={0,2}$/.test(e6);
58511
- }
58512
- function c(e6, t4) {
58513
- switch (e6.toLowerCase()) {
58514
- case `image/jpeg`:
58515
- case `image/jpg`:
58516
- return `image/jpeg`;
58517
- case `image/png`:
58518
- return `image/png`;
58519
- case `image/gif`:
58520
- return `image/gif`;
58521
- case `image/webp`:
58522
- return `image/webp`;
58523
- default:
58524
- return l3(t4);
58525
- }
58526
- }
58527
- function l3(e6) {
58528
- return e6.startsWith(`/9j/`) ? `image/jpeg` : e6.startsWith(`iVBOR`) ? `image/png` : e6.startsWith(`R0lGOD`) ? `image/gif` : e6.startsWith(`UklGR`) ? `image/webp` : `image/png`;
58529
- }
58530
-
58531
58221
  // ../provider/dist/index.js
58532
58222
  var h = Be(`@x-otto/provider:tool-roundtrip`);
58533
- function g(e6) {
58534
- let t4 = [], n4 = [], r4 = () => {
58535
- for (let e7 of n4) h.warn({ toolCallId: e7.id, toolName: e7.name }, `Synthesizing placeholder for unanswered tool_call`), t4.push(_(e7));
58536
- n4 = [];
58223
+ function g(e4) {
58224
+ let t3 = [], n3 = [], r3 = () => {
58225
+ for (let e5 of n3) h.warn({ toolCallId: e5.id, toolName: e5.name }, `Synthesizing placeholder for unanswered tool_call`), t3.push(_(e5));
58226
+ n3 = [];
58537
58227
  };
58538
- for (let i2 of e6) {
58228
+ for (let i2 of e4) {
58539
58229
  if (i2.role === `tool_result`) {
58540
- let e7 = n4.findIndex((e8) => e8.id === i2.toolCallId);
58541
- if (e7 === -1) {
58230
+ let e5 = n3.findIndex((e6) => e6.id === i2.toolCallId);
58231
+ if (e5 === -1) {
58542
58232
  h.warn({ toolCallId: i2.toolCallId, toolName: i2.toolName }, `Dropping orphan tool_result with no preceding tool_call`);
58543
58233
  continue;
58544
58234
  }
58545
- n4.splice(e7, 1), t4.push(i2);
58235
+ n3.splice(e5, 1), t3.push(i2);
58546
58236
  continue;
58547
58237
  }
58548
- r4(), t4.push(i2), i2.role === `assistant` && (n4 = i2.content.filter((e7) => e7.type === `tool_call`));
58238
+ r3(), t3.push(i2), i2.role === `assistant` && (n3 = i2.content.filter((e5) => e5.type === `tool_call`));
58549
58239
  }
58550
- return r4(), t4;
58240
+ return r3(), t3;
58551
58241
  }
58552
- function _(e6) {
58553
- return { role: `tool_result`, toolCallId: e6.id, toolName: e6.name, content: [{ type: `text`, text: `[tool result unavailable]` }], details: void 0, isError: true, timestamp: 0 };
58242
+ function _(e4) {
58243
+ return { role: `tool_result`, toolCallId: e4.id, toolName: e4.name, content: [{ type: `text`, text: `[tool result unavailable]` }], details: void 0, isError: true, timestamp: 0 };
58554
58244
  }
58555
- function v(e6) {
58556
- return `[System notification] ${e6}`;
58245
+ function v(e4) {
58246
+ return `[System notification] ${e4}`;
58557
58247
  }
58558
- function y(e6) {
58559
- let t4 = [];
58560
- for (let n4 of e6) {
58561
- let e7 = t4.at(-1);
58562
- if (n4.role === `system_notification` && e7?.role === `system_notification`) {
58563
- t4[t4.length - 1] = { ...e7, content: `${e7.content}
58564
- ${n4.content}`, isError: e7.isError || n4.isError };
58248
+ function y(e4) {
58249
+ let t3 = [];
58250
+ for (let n3 of e4) {
58251
+ let e5 = t3.at(-1);
58252
+ if (n3.role === `system_notification` && e5?.role === `system_notification`) {
58253
+ t3[t3.length - 1] = { ...e5, content: `${e5.content}
58254
+ ${n3.content}`, isError: e5.isError || n3.isError };
58565
58255
  continue;
58566
58256
  }
58567
- t4.push(n4);
58257
+ t3.push(n3);
58568
58258
  }
58569
- return t4;
58259
+ return t3;
58570
58260
  }
58571
- function b5(e6) {
58572
- for (let t4 = 0; t4 < e6.length; t4++) {
58573
- let n4 = e6[t4];
58574
- if (n4.role !== `system_notification`) continue;
58575
- let r4 = t4 > 0 ? e6[t4 - 1] : void 0;
58576
- r4 !== void 0 && (r4.role === `tool_result` || r4.role === `assistant`) || h.warn({ index: t4, relatedToolCallId: n4.relatedToolCallId, precedingRole: r4?.role ?? `(start of array)` }, `system_notification message does not immediately follow a tool_result/assistant turn (Anthropic placement rule violation risk) \u2014 sending anyway, provider may reject`);
58577
- let i2 = t4 + 1 < e6.length ? e6[t4 + 1] : void 0;
58578
- i2 === void 0 || i2.role === `assistant` || h.warn({ index: t4, relatedToolCallId: n4.relatedToolCallId, followingRole: i2?.role }, `system_notification message is not the last entry and is not immediately followed by an assistant turn (Anthropic placement rule violation risk) \u2014 sending anyway, provider may reject`);
58261
+ function b4(e4) {
58262
+ for (let t3 = 0; t3 < e4.length; t3++) {
58263
+ let n3 = e4[t3];
58264
+ if (n3.role !== `system_notification`) continue;
58265
+ let r3 = t3 > 0 ? e4[t3 - 1] : void 0;
58266
+ r3 !== void 0 && (r3.role === `tool_result` || r3.role === `assistant`) || h.warn({ index: t3, relatedToolCallId: n3.relatedToolCallId, precedingRole: r3?.role ?? `(start of array)` }, `system_notification message does not immediately follow a tool_result/assistant turn (Anthropic placement rule violation risk) \u2014 sending anyway, provider may reject`);
58267
+ let i2 = t3 + 1 < e4.length ? e4[t3 + 1] : void 0;
58268
+ i2 === void 0 || i2.role === `assistant` || h.warn({ index: t3, relatedToolCallId: n3.relatedToolCallId, followingRole: i2?.role }, `system_notification message is not the last entry and is not immediately followed by an assistant turn (Anthropic placement rule violation risk) \u2014 sending anyway, provider may reject`);
58579
58269
  }
58580
58270
  }
58581
- function x5(e6) {
58582
- return e6.replace(/[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?<![\uD800-\uDBFF])[\uDC00-\uDFFF]/g, `\uFFFD`);
58271
+ function x4(e4) {
58272
+ return e4.replace(/[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?<![\uD800-\uDBFF])[\uDC00-\uDFFF]/g, `\uFFFD`);
58583
58273
  }
58584
- function ee(e6) {
58585
- return e6.toJSONSchema?.() ?? {};
58274
+ function ee(e4) {
58275
+ return e4.toJSONSchema?.() ?? {};
58586
58276
  }
58587
58277
  var S3 = [`low`, `medium`, `high`, `xhigh`, `max`];
58588
- function C3(e6, t4) {
58589
- if (!t4 || t4.length === 0 || t4.includes(e6)) return e6;
58590
- let n4 = S3.indexOf(e6), r4 = [...t4].sort((e7, t5) => S3.indexOf(e7) - S3.indexOf(t5)), i2;
58591
- for (let e7 of r4) if (S3.indexOf(e7) <= n4) i2 = e7;
58278
+ function C2(e4, t3) {
58279
+ if (!t3 || t3.length === 0 || t3.includes(e4)) return e4;
58280
+ let n3 = S3.indexOf(e4), r3 = [...t3].sort((e5, t4) => S3.indexOf(e5) - S3.indexOf(t4)), i2;
58281
+ for (let e5 of r3) if (S3.indexOf(e5) <= n3) i2 = e5;
58592
58282
  else break;
58593
- return i2 ?? r4[0];
58283
+ return i2 ?? r3[0];
58594
58284
  }
58595
- function te3(e6) {
58596
- for (let t4 of e6) if (t4.role === `tool_result` || t4.role === `assistant` && t4.content.some((e7) => e7.type === `tool_call`)) return true;
58285
+ function te2(e4) {
58286
+ for (let t3 of e4) if (t3.role === `tool_result` || t3.role === `assistant` && t3.content.some((e5) => e5.type === `tool_call`)) return true;
58597
58287
  return false;
58598
58288
  }
58599
- function w4(t4) {
58600
- let n4 = [];
58601
- t4.systemPrompt && n4.push({ role: `system`, content: x5(t4.systemPrompt) });
58602
- for (let r4 of g(t4.messages)) if (r4.role === `user`) typeof r4.content == `string` ? n4.push({ role: `user`, content: x5(r4.content) }) : n4.push({ role: `user`, content: r4.content.map((t5) => {
58603
- if (t5.type === `text`) return { type: `text`, text: x5(t5.text) };
58604
- if (t5.type === `image`) {
58605
- let { base64: n5, mediaType: r5, valid: i2 } = o2(t5.source, t5.mime);
58606
- return i2 ? { type: `image_url`, image_url: { url: `data:${r5 || `image/png`};base64,${n5}` } } : { type: `text`, text: `[image omitted: corrupted or empty data]` };
58289
+ function w3(t3) {
58290
+ let n3 = [];
58291
+ t3.systemPrompt && n3.push({ role: `system`, content: x4(t3.systemPrompt) });
58292
+ for (let r3 of g(t3.messages)) if (r3.role === `user`) typeof r3.content == `string` ? n3.push({ role: `user`, content: x4(r3.content) }) : n3.push({ role: `user`, content: r3.content.map((t4) => {
58293
+ if (t4.type === `text`) return { type: `text`, text: x4(t4.text) };
58294
+ if (t4.type === `image`) {
58295
+ let { base64: n4, mediaType: r4, valid: i2 } = o2(t4.source, t4.mime);
58296
+ return i2 ? { type: `image_url`, image_url: { url: `data:${r4 || `image/png`};base64,${n4}` } } : { type: `text`, text: `[image omitted: corrupted or empty data]` };
58607
58297
  }
58608
58298
  return { type: `text`, text: `[unsupported]` };
58609
58299
  }) });
58610
- else if (r4.role === `assistant`) {
58611
- let e6 = r4.content.filter((e7) => e7.type === `tool_call`).map((e7) => ({ id: e7.id, type: `function`, function: { name: e7.name, arguments: JSON.stringify(e7.arguments) } })), t5 = r4.content.filter((e7) => e7.type === `text`).filter((e7) => e7.text.trim().length > 0).map((e7) => x5(e7.text)).join(``);
58612
- if (!t5 && e6.length === 0) continue;
58613
- n4.push({ role: `assistant`, content: t5 || null, ...e6.length > 0 ? { tool_calls: e6 } : {} });
58614
- } else r4.role === `tool_result` ? n4.push({ role: `tool`, tool_call_id: r4.toolCallId, content: x5(r4.content.map((e6) => e6.type === `text` ? e6.text : ``).join(``)) }) : r4.role === `system_notification` && n4.push({ role: `user`, content: x5(v(r4.content)) });
58615
- return n4;
58616
- }
58617
- function ne(e6) {
58618
- switch (e6) {
58300
+ else if (r3.role === `assistant`) {
58301
+ let e4 = r3.content.filter((e5) => e5.type === `tool_call`).map((e5) => ({ id: e5.id, type: `function`, function: { name: e5.name, arguments: JSON.stringify(e5.arguments) } })), t4 = r3.content.filter((e5) => e5.type === `text`).filter((e5) => e5.text.trim().length > 0).map((e5) => x4(e5.text)).join(``);
58302
+ if (!t4 && e4.length === 0) continue;
58303
+ n3.push({ role: `assistant`, content: t4 || null, ...e4.length > 0 ? { tool_calls: e4 } : {} });
58304
+ } else r3.role === `tool_result` ? n3.push({ role: `tool`, tool_call_id: r3.toolCallId, content: x4(r3.content.map((e4) => e4.type === `text` ? e4.text : ``).join(``)) }) : r3.role === `system_notification` && n3.push({ role: `user`, content: x4(v(r3.content)) });
58305
+ return n3;
58306
+ }
58307
+ function ne(e4) {
58308
+ switch (e4) {
58619
58309
  case `low`:
58620
58310
  case `medium`:
58621
58311
  case `high`:
@@ -58627,100 +58317,100 @@ function ne(e6) {
58627
58317
  return `high`;
58628
58318
  }
58629
58319
  }
58630
- function re(e6, t4, n4 = {}) {
58631
- let r4 = { model: n4.modelName ?? e6.name, messages: w4(t4), max_tokens: t4.maxTokens ?? e6.maxOutputTokens, stream: true, stream_options: { include_usage: true } };
58632
- return t4.temperature !== void 0 && !e6.reasoning && (r4.temperature = t4.temperature), e6.reasoning && t4.thinkingLevel && (r4.reasoning_effort = ne(C3(t4.thinkingLevel, e6.thinkingLevels))), t4.tools && t4.tools.length > 0 ? r4.tools = t4.tools.map((e7) => ({ type: `function`, function: { name: e7.name, description: e7.description, parameters: ee(e7.parameters) } })) : te3(t4.messages) && (r4.tools = []), r4;
58633
- }
58634
- var T4 = Be(`@x-otto/provider:openai-usage`);
58635
- function ie2(e6) {
58636
- let t4 = (t5) => {
58637
- let n5 = e6.get(t5);
58638
- if (n5 === null) return;
58639
- let r5 = Number(n5);
58640
- return Number.isFinite(r5) ? r5 : void 0;
58641
- }, n4 = (t5) => {
58642
- let n5 = e6.get(t5);
58643
- if (!n5) return;
58644
- let r5 = n5.match(/^(\d+(?:\.\d+)?)(m|s|ms)$/);
58645
- if (!r5) return;
58646
- let i2 = Number(r5[1]), a4 = r5[2];
58647
- if (a4 === `ms`) return i2;
58648
- if (a4 === `s`) return i2 * 1e3;
58649
- if (a4 === `m`) return i2 * 60 * 1e3;
58650
- }, r4 = { remainingRequests: t4(`x-ratelimit-remaining-requests`), remainingTokens: t4(`x-ratelimit-remaining-tokens`), limitRequests: t4(`x-ratelimit-limit-requests`), limitTokens: t4(`x-ratelimit-limit-tokens`), resetRequestsMs: n4(`x-ratelimit-reset-requests`), resetTokensMs: n4(`x-ratelimit-reset-tokens`) };
58651
- if (!Object.values(r4).every((e7) => e7 === void 0)) return r4;
58652
- }
58653
- function E5(e6) {
58654
- if (!e6) return null;
58655
- let t4 = ie2(e6);
58656
- if (T4.isLevelEnabled(`trace`)) {
58657
- let t5 = [];
58658
- e6.forEach((e7, n4) => {
58659
- let r4 = n4.startsWith(`x-ratelimit-`) || e7.length < 40 ? e7 : e7.slice(0, 20) + `\u2026`;
58660
- t5.push(` ${n4}: ${r4}`);
58661
- }), T4.trace(`OpenAI Codex response headers (%d):
58662
- %s`, t5.length, t5.sort().join(`
58320
+ function re(e4, t3, n3 = {}) {
58321
+ let r3 = { model: n3.modelName ?? e4.name, messages: w3(t3), max_tokens: t3.maxTokens ?? e4.maxOutputTokens, stream: true, stream_options: { include_usage: true } };
58322
+ return t3.temperature !== void 0 && !e4.reasoning && (r3.temperature = t3.temperature), e4.reasoning && t3.thinkingLevel && (r3.reasoning_effort = ne(C2(t3.thinkingLevel, e4.thinkingLevels))), t3.tools && t3.tools.length > 0 ? r3.tools = t3.tools.map((e5) => ({ type: `function`, function: { name: e5.name, description: e5.description, parameters: ee(e5.parameters) } })) : te2(t3.messages) && (r3.tools = []), r3;
58323
+ }
58324
+ var T3 = Be(`@x-otto/provider:openai-usage`);
58325
+ function ie2(e4) {
58326
+ let t3 = (t4) => {
58327
+ let n4 = e4.get(t4);
58328
+ if (n4 === null) return;
58329
+ let r4 = Number(n4);
58330
+ return Number.isFinite(r4) ? r4 : void 0;
58331
+ }, n3 = (t4) => {
58332
+ let n4 = e4.get(t4);
58333
+ if (!n4) return;
58334
+ let r4 = n4.match(/^(\d+(?:\.\d+)?)(m|s|ms)$/);
58335
+ if (!r4) return;
58336
+ let i2 = Number(r4[1]), a3 = r4[2];
58337
+ if (a3 === `ms`) return i2;
58338
+ if (a3 === `s`) return i2 * 1e3;
58339
+ if (a3 === `m`) return i2 * 60 * 1e3;
58340
+ }, r3 = { remainingRequests: t3(`x-ratelimit-remaining-requests`), remainingTokens: t3(`x-ratelimit-remaining-tokens`), limitRequests: t3(`x-ratelimit-limit-requests`), limitTokens: t3(`x-ratelimit-limit-tokens`), resetRequestsMs: n3(`x-ratelimit-reset-requests`), resetTokensMs: n3(`x-ratelimit-reset-tokens`) };
58341
+ if (!Object.values(r3).every((e5) => e5 === void 0)) return r3;
58342
+ }
58343
+ function E4(e4) {
58344
+ if (!e4) return null;
58345
+ let t3 = ie2(e4);
58346
+ if (T3.isLevelEnabled(`trace`)) {
58347
+ let t4 = [];
58348
+ e4.forEach((e5, n3) => {
58349
+ let r3 = n3.startsWith(`x-ratelimit-`) || e5.length < 40 ? e5 : e5.slice(0, 20) + `\u2026`;
58350
+ t4.push(` ${n3}: ${r3}`);
58351
+ }), T3.trace(`OpenAI Codex response headers (%d):
58352
+ %s`, t4.length, t4.sort().join(`
58663
58353
  `));
58664
58354
  }
58665
- return t4 ? { status: `unknown`, standardLimits: t4 } : null;
58355
+ return t3 ? { status: `unknown`, standardLimits: t3 } : null;
58666
58356
  }
58667
- var oe4 = Be(`@x-otto/provider:stream-state`);
58668
- function D4() {
58357
+ var oe3 = Be(`@x-otto/provider:stream-state`);
58358
+ function D3() {
58669
58359
  return { inputTokens: 0, outputTokens: 0, cacheReadTokens: 0, cacheWriteTokens: 0 };
58670
58360
  }
58671
- function O4(e6, t4) {
58361
+ function O3(e4, t3) {
58672
58362
  try {
58673
- return { args: JSON.parse(e6), parseFailed: false };
58363
+ return { args: JSON.parse(e4), parseFailed: false };
58674
58364
  } catch {
58675
- return oe4.debug({ toolName: t4 }, `Failed to parse tool arguments JSON`), { args: {}, parseFailed: true };
58676
- }
58677
- }
58678
- function ce2(e6) {
58679
- return new Set(e6?.map((e7) => e7.name) ?? []);
58680
- }
58681
- function k5(e6, t4, n4) {
58682
- let { args: r4, parseFailed: i2 } = O4(n4, t4);
58683
- return { type: `tool_call`, id: e6, name: t4, arguments: r4, ...i2 ? { argumentsParseFailed: true } : {} };
58684
- }
58685
- function A4(e6, t4) {
58686
- if (e6.content.some((e7) => e7.type === `tool_call`)) return e6;
58687
- let n4 = e6.content.findLastIndex((e7) => e7.type === `text`);
58688
- if (n4 < 0) return e6;
58689
- let r4 = e6.content[n4], i2 = M3(r4.text, t4);
58690
- if (!i2) return e6;
58691
- let a4 = [...e6.content], o4 = r4.text.slice(0, i2.matchStart).trimEnd();
58692
- return o4.length > 0 ? a4[n4] = { ...r4, text: o4 } : a4.splice(n4, 1), a4.push(k5(`recovered_${n4}`, i2.name, i2.argumentsJson)), { ...e6, content: a4 };
58693
- }
58694
- var le4 = /<invoke name="([^"]+)">((?:(?!<invoke name=")[\s\S])*?)<\/invoke>\s*$/;
58695
- var j5 = /<parameter name="([^"]+)">([\s\S]*?)<\/parameter>/g;
58696
- function M3(e6, t4) {
58697
- let n4 = e6.trimEnd(), r4 = le4.exec(n4);
58698
- if (!r4) return null;
58699
- let i2 = r4[1];
58700
- if (!t4.has(i2)) return null;
58701
- let a4 = {}, o4 = r4[2], s4;
58702
- for (j5.lastIndex = 0; (s4 = j5.exec(o4)) !== null; ) a4[s4[1]] = s4[2];
58703
- return { name: i2, argumentsJson: JSON.stringify(a4), matchStart: r4.index };
58365
+ return oe3.debug({ toolName: t3 }, `Failed to parse tool arguments JSON`), { args: {}, parseFailed: true };
58366
+ }
58367
+ }
58368
+ function ce2(e4) {
58369
+ return new Set(e4?.map((e5) => e5.name) ?? []);
58370
+ }
58371
+ function k4(e4, t3, n3) {
58372
+ let { args: r3, parseFailed: i2 } = O3(n3, t3);
58373
+ return { type: `tool_call`, id: e4, name: t3, arguments: r3, ...i2 ? { argumentsParseFailed: true } : {} };
58374
+ }
58375
+ function A3(e4, t3) {
58376
+ if (e4.content.some((e5) => e5.type === `tool_call`)) return e4;
58377
+ let n3 = e4.content.findLastIndex((e5) => e5.type === `text`);
58378
+ if (n3 < 0) return e4;
58379
+ let r3 = e4.content[n3], i2 = M3(r3.text, t3);
58380
+ if (!i2) return e4;
58381
+ let a3 = [...e4.content], o3 = r3.text.slice(0, i2.matchStart).trimEnd();
58382
+ return o3.length > 0 ? a3[n3] = { ...r3, text: o3 } : a3.splice(n3, 1), a3.push(k4(`recovered_${n3}`, i2.name, i2.argumentsJson)), { ...e4, content: a3 };
58383
+ }
58384
+ var le3 = /<invoke name="([^"]+)">((?:(?!<invoke name=")[\s\S])*?)<\/invoke>\s*$/;
58385
+ var j4 = /<parameter name="([^"]+)">([\s\S]*?)<\/parameter>/g;
58386
+ function M3(e4, t3) {
58387
+ let n3 = e4.trimEnd(), r3 = le3.exec(n3);
58388
+ if (!r3) return null;
58389
+ let i2 = r3[1];
58390
+ if (!t3.has(i2)) return null;
58391
+ let a3 = {}, o3 = r3[2], s3;
58392
+ for (j4.lastIndex = 0; (s3 = j4.exec(o3)) !== null; ) a3[s3[1]] = s3[2];
58393
+ return { name: i2, argumentsJson: JSON.stringify(a3), matchStart: r3.index };
58704
58394
  }
58705
58395
  function N2() {
58706
- return { ...D4(), textContent: ``, thinkingText: ``, toolCalls: /* @__PURE__ */ new Map(), stopReason: `end_turn` };
58396
+ return { ...D3(), textContent: ``, thinkingText: ``, toolCalls: /* @__PURE__ */ new Map(), stopReason: `end_turn` };
58707
58397
  }
58708
- function P3(e6, t4 = true) {
58709
- let n4 = [];
58710
- if (e6.thinkingText && n4.push({ type: `thinking`, text: e6.thinkingText }), e6.textContent && n4.push({ type: `text`, text: e6.textContent }), t4) for (let [, t5] of e6.toolCalls) n4.push(k5(t5.id, t5.name, t5.argumentsJson));
58711
- return n4;
58398
+ function P3(e4, t3 = true) {
58399
+ let n3 = [];
58400
+ if (e4.thinkingText && n3.push({ type: `thinking`, text: e4.thinkingText }), e4.textContent && n3.push({ type: `text`, text: e4.textContent }), t3) for (let [, t4] of e4.toolCalls) n3.push(k4(t4.id, t4.name, t4.argumentsJson));
58401
+ return n3;
58712
58402
  }
58713
- function de3(e6, t4 = true) {
58714
- let n4 = [], r4 = [...e6.entries()].sort(([e7], [t5]) => e7 - t5);
58715
- for (let [, e7] of r4) e7.kind === `thinking` ? e7.text && n4.push({ type: `thinking`, text: e7.text, ...e7.signature === void 0 ? {} : { signature: e7.signature } }) : e7.kind === `text` ? e7.text && n4.push({ type: `text`, text: e7.text }) : t4 && n4.push(k5(e7.id, e7.name, e7.argumentsJson));
58716
- return n4;
58403
+ function de2(e4, t3 = true) {
58404
+ let n3 = [], r3 = [...e4.entries()].sort(([e5], [t4]) => e5 - t4);
58405
+ for (let [, e5] of r3) e5.kind === `thinking` ? e5.text && n3.push({ type: `thinking`, text: e5.text, ...e5.signature === void 0 ? {} : { signature: e5.signature } }) : e5.kind === `text` ? e5.text && n3.push({ type: `text`, text: e5.text }) : t3 && n3.push(k4(e5.id, e5.name, e5.argumentsJson));
58406
+ return n3;
58717
58407
  }
58718
- function F2(e6, t4, n4, r4) {
58719
- return { role: `assistant`, content: t4, api: e6.api, provider: e6.provider, model: e6.model, usage: { inputTokens: n4.inputTokens, outputTokens: n4.outputTokens, cacheReadTokens: n4.cacheReadTokens, cacheWriteTokens: n4.cacheWriteTokens }, stopReason: r4 };
58408
+ function F2(e4, t3, n3, r3) {
58409
+ return { role: `assistant`, content: t3, api: e4.api, provider: e4.provider, model: e4.model, usage: { inputTokens: n3.inputTokens, outputTokens: n3.outputTokens, cacheReadTokens: n3.cacheReadTokens, cacheWriteTokens: n3.cacheWriteTokens }, stopReason: r3 };
58720
58410
  }
58721
- var fe3 = Be(`@x-otto/provider:chat-completions-stream`);
58722
- function I4(e6) {
58723
- switch (e6) {
58411
+ var fe2 = Be(`@x-otto/provider:chat-completions-stream`);
58412
+ function I3(e4) {
58413
+ switch (e4) {
58724
58414
  case `stop`:
58725
58415
  return `end_turn`;
58726
58416
  case `length`:
@@ -58730,68 +58420,68 @@ function I4(e6) {
58730
58420
  case `content_filter`:
58731
58421
  return `refusal`;
58732
58422
  default:
58733
- return fe3.warn(`Unknown chat-completions finish_reason: ${e6}`), `end_turn`;
58423
+ return fe2.warn(`Unknown chat-completions finish_reason: ${e4}`), `end_turn`;
58734
58424
  }
58735
58425
  }
58736
- async function* pe2(e6) {
58737
- let { url: t4, headers: r4, body: i2, identity: a4, signal: o4, timeout: s4, idleTimeout: c2, onResponse: l4, registeredToolNames: d } = e6, f = N2(), p = (e7 = false) => F2(a4, P3(f, e7), f, f.stopReason), m = false, h2 = false, g2 = false, _2, v2 = gt({ url: t4, body: i2, headers: r4, signal: o4, timeout: s4 ?? 3e5, idleTimeout: c2, onResponse: (e7) => {
58738
- _2 = e7, l4?.(e7);
58426
+ async function* pe2(e4) {
58427
+ let { url: t3, headers: r3, body: i2, identity: a3, signal: o3, timeout: s3, idleTimeout: c2, onResponse: l3, registeredToolNames: d } = e4, f = N2(), p = (e5 = false) => F2(a3, P3(f, e5), f, f.stopReason), m = false, h2 = false, g2 = false, _2, v2 = gt({ url: t3, body: i2, headers: r3, signal: o3, timeout: s3 ?? 3e5, idleTimeout: c2, onResponse: (e5) => {
58428
+ _2 = e5, l3?.(e5);
58739
58429
  } });
58740
58430
  try {
58741
- for await (let e7 of v2) {
58742
- if (e7.data === `[DONE]`) break;
58743
- let t5;
58431
+ for await (let e5 of v2) {
58432
+ if (e5.data === `[DONE]`) break;
58433
+ let t4;
58744
58434
  try {
58745
- t5 = JSON.parse(e7.data);
58435
+ t4 = JSON.parse(e5.data);
58746
58436
  } catch {
58747
58437
  continue;
58748
58438
  }
58749
- if (t5.error) {
58750
- let e8 = t5.error, r6 = typeof e8.message == `string` ? e8.message : JSON.stringify(e8), i4 = e8.code, a6 = typeof i4 == `number` ? i4 : typeof i4 == `string` && /^\d+/.test(i4) ? Number(i4.match(/^\d+/)?.[0]) : void 0;
58751
- throw new Ce(`Chat Completions stream error: ${r6}`, { code: `PROVIDER_API_ERROR`, status: a6 });
58439
+ if (t4.error) {
58440
+ let e6 = t4.error, r5 = typeof e6.message == `string` ? e6.message : JSON.stringify(e6), i4 = e6.code, a5 = typeof i4 == `number` ? i4 : typeof i4 == `string` && /^\d+/.test(i4) ? Number(i4.match(/^\d+/)?.[0]) : void 0;
58441
+ throw new Ce(`Chat Completions stream error: ${r5}`, { code: `PROVIDER_API_ERROR`, status: a5 });
58752
58442
  }
58753
- if (t5.usage) {
58754
- let e8 = t5.usage, n4 = e8.prompt_tokens ?? 0, r6 = e8.completion_tokens ?? 0, i4 = e8.prompt_tokens_details?.cached_tokens ?? e8.prompt_cache_hit_tokens ?? 0;
58755
- f.inputTokens = n4 - i4, f.cacheReadTokens = i4, f.outputTokens = r6;
58443
+ if (t4.usage) {
58444
+ let e6 = t4.usage, n3 = e6.prompt_tokens ?? 0, r5 = e6.completion_tokens ?? 0, i4 = e6.prompt_tokens_details?.cached_tokens ?? e6.prompt_cache_hit_tokens ?? 0;
58445
+ f.inputTokens = n3 - i4, f.cacheReadTokens = i4, f.outputTokens = r5;
58756
58446
  }
58757
- let r5 = t5.choices?.[0];
58758
- if (!r5) continue;
58759
- let i3 = r5.delta;
58760
- if (m || (m = true, yield { type: `start`, partial: p() }), r5.finish_reason && (f.stopReason = I4(r5.finish_reason)), !i3) continue;
58447
+ let r4 = t4.choices?.[0];
58448
+ if (!r4) continue;
58449
+ let i3 = r4.delta;
58450
+ if (m || (m = true, yield { type: `start`, partial: p() }), r4.finish_reason && (f.stopReason = I3(r4.finish_reason)), !i3) continue;
58761
58451
  if (i3.content) {
58762
- let e8 = i3.content;
58763
- h2 || (h2 = true, yield { type: `text_start`, index: 0, partial: p() }), f.textContent += e8, yield { type: `text_delta`, index: 0, delta: e8, partial: p() };
58452
+ let e6 = i3.content;
58453
+ h2 || (h2 = true, yield { type: `text_start`, index: 0, partial: p() }), f.textContent += e6, yield { type: `text_delta`, index: 0, delta: e6, partial: p() };
58764
58454
  }
58765
- let a5 = i3.reasoning_content ?? i3.reasoning ?? i3.reasoning_text ?? null;
58766
- if (a5 && (g2 || (g2 = true, yield { type: `thinking_start`, index: 0, partial: p() }), f.thinkingText += a5, yield { type: `thinking_delta`, index: 0, delta: a5, partial: p() }), i3.tool_calls) for (let e8 of i3.tool_calls) {
58767
- let t6 = e8.index, n4 = e8.function;
58768
- f.toolCalls.has(t6) || (f.toolCalls.set(t6, { id: e8.id ?? `call_${t6}`, name: n4?.name ?? ``, argumentsJson: `` }), yield { type: `tool_call_start`, index: t6, partial: p() });
58769
- let r6 = f.toolCalls.get(t6);
58770
- if (n4?.arguments) {
58771
- let e9 = n4.arguments;
58772
- r6.argumentsJson += e9, yield { type: `tool_call_delta`, index: t6, delta: e9, partial: p() };
58455
+ let a4 = i3.reasoning_content ?? i3.reasoning ?? i3.reasoning_text ?? null;
58456
+ if (a4 && (g2 || (g2 = true, yield { type: `thinking_start`, index: 0, partial: p() }), f.thinkingText += a4, yield { type: `thinking_delta`, index: 0, delta: a4, partial: p() }), i3.tool_calls) for (let e6 of i3.tool_calls) {
58457
+ let t5 = e6.index, n3 = e6.function;
58458
+ f.toolCalls.has(t5) || (f.toolCalls.set(t5, { id: e6.id ?? `call_${t5}`, name: n3?.name ?? ``, argumentsJson: `` }), yield { type: `tool_call_start`, index: t5, partial: p() });
58459
+ let r5 = f.toolCalls.get(t5);
58460
+ if (n3?.arguments) {
58461
+ let e7 = n3.arguments;
58462
+ r5.argumentsJson += e7, yield { type: `tool_call_delta`, index: t5, delta: e7, partial: p() };
58773
58463
  }
58774
58464
  }
58775
58465
  }
58776
58466
  g2 && (yield { type: `thinking_end`, index: 0, content: f.thinkingText, partial: p() }), h2 && (yield { type: `text_end`, index: 0, content: f.textContent, partial: p() });
58777
- for (let [e7, t5] of f.toolCalls) yield { type: `tool_call_end`, index: e7, toolCall: k5(t5.id, t5.name, t5.argumentsJson), partial: p() };
58778
- yield { type: `done`, reason: f.stopReason, message: A4(p(true), d ?? /* @__PURE__ */ new Set()), providerUsage: E5(_2) };
58779
- } catch (e7) {
58780
- yield { type: `error`, error: e7 instanceof Error ? e7 : new Ce(`Unknown Chat Completions stream error`, { code: `PROVIDER_STREAM_ERROR` }) };
58781
- }
58782
- }
58783
- function L4(e6, t4, n4) {
58784
- for (let r4 of e6) {
58785
- if (!r4) continue;
58786
- let e7 = r4.split(`.`)[1];
58787
- if (e7) try {
58788
- let r5 = JSON.parse(Buffer.from(e7, `base64url`).toString(`utf-8`));
58789
- if (n4) {
58790
- let e8 = r5[n4]?.[t4] ?? r5[t4];
58791
- if (typeof e8 == `string`) return e8;
58467
+ for (let [e5, t4] of f.toolCalls) yield { type: `tool_call_end`, index: e5, toolCall: k4(t4.id, t4.name, t4.argumentsJson), partial: p() };
58468
+ yield { type: `done`, reason: f.stopReason, message: A3(p(true), d ?? /* @__PURE__ */ new Set()), providerUsage: E4(_2) };
58469
+ } catch (e5) {
58470
+ yield { type: `error`, error: e5 instanceof Error ? e5 : new Ce(`Unknown Chat Completions stream error`, { code: `PROVIDER_STREAM_ERROR` }) };
58471
+ }
58472
+ }
58473
+ function L3(e4, t3, n3) {
58474
+ for (let r3 of e4) {
58475
+ if (!r3) continue;
58476
+ let e5 = r3.split(`.`)[1];
58477
+ if (e5) try {
58478
+ let r4 = JSON.parse(Buffer.from(e5, `base64url`).toString(`utf-8`));
58479
+ if (n3) {
58480
+ let e6 = r4[n3]?.[t3] ?? r4[t3];
58481
+ if (typeof e6 == `string`) return e6;
58792
58482
  } else {
58793
- let e8 = r5[t4];
58794
- if (typeof e8 == `string`) return e8;
58483
+ let e6 = r4[t3];
58484
+ if (typeof e6 == `string`) return e6;
58795
58485
  }
58796
58486
  } catch {
58797
58487
  }
@@ -58800,53 +58490,53 @@ function L4(e6, t4, n4) {
58800
58490
  var me2 = /* @__PURE__ */ new Set([`authorization`, `x-api-key`]);
58801
58491
  var he2 = /^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/;
58802
58492
  var ge2 = /[\u0000-\u001f\u007f]/g;
58803
- function R2(e6, t4, n4, r4) {
58493
+ function R2(e4, t3, n3, r3) {
58804
58494
  let i2 = /* @__PURE__ */ new Map();
58805
- if (!e6) return i2;
58806
- for (let [a4, o4] of Object.entries(e6)) {
58807
- let e7 = a4.trim();
58808
- if (!he2.test(e7)) {
58809
- n4?.warn({ provider: r4, source: t4, header: a4 }, `dropped request header with invalid name (RFC 7230 token expected)`);
58495
+ if (!e4) return i2;
58496
+ for (let [a3, o3] of Object.entries(e4)) {
58497
+ let e5 = a3.trim();
58498
+ if (!he2.test(e5)) {
58499
+ n3?.warn({ provider: r3, source: t3, header: a3 }, `dropped request header with invalid name (RFC 7230 token expected)`);
58810
58500
  continue;
58811
58501
  }
58812
- if (typeof o4 != `string`) continue;
58813
- let s4 = o4.replace(ge2, ``).trim();
58814
- s4 && i2.set(e7.toLowerCase(), { name: e7, value: s4 });
58502
+ if (typeof o3 != `string`) continue;
58503
+ let s3 = o3.replace(ge2, ``).trim();
58504
+ s3 && i2.set(e5.toLowerCase(), { name: e5, value: s3 });
58815
58505
  }
58816
58506
  return i2;
58817
58507
  }
58818
- function _e2(e6) {
58819
- if (!e6?.headers.length) return;
58820
- let t4 = {};
58821
- for (let n4 of e6.headers) {
58822
- if (n4.source.kind !== `jwt-claim`) continue;
58823
- let r4 = L4(n4.source.tokenSources?.length ? n4.source.tokenSources.map((t5) => t5 === `access_token` ? e6.token : void 0) : [e6.token], n4.source.claim, n4.source.namespace);
58824
- r4 && (t4[n4.header] = r4);
58825
- }
58826
- return Object.keys(t4).length > 0 ? t4 : void 0;
58827
- }
58828
- function ve2(e6) {
58829
- let { logger: t4, diagnosticLabel: n4, allowAuthHeaderOverride: r4 } = e6, i2 = [{ label: `protocolDefaults`, entries: R2(e6.protocolDefaults, `protocolDefaults`, t4, n4) }, { label: `staticHeaders`, entries: R2(e6.staticHeaders, `staticHeaders`, t4, n4) }, { label: `tokenDerived`, entries: R2(_e2(e6.tokenDerived), `tokenDerived`, t4, n4) }, { label: `customized`, entries: R2(e6.customized, `customized`, t4, n4) }], a4 = /* @__PURE__ */ new Set([`staticHeaders`, `tokenDerived`, `customized`]), o4 = /* @__PURE__ */ new Map();
58830
- for (let { label: e7, entries: s5 } of i2) for (let [i3, c2] of s5) {
58831
- if (!r4 && a4.has(e7) && me2.has(i3)) {
58832
- t4?.warn({ provider: n4, source: e7, header: c2.name }, `dropped attempt to override auth header (declare allowAuthHeaderOverride to permit)`);
58508
+ function _e2(e4) {
58509
+ if (!e4?.headers.length) return;
58510
+ let t3 = {};
58511
+ for (let n3 of e4.headers) {
58512
+ if (n3.source.kind !== `jwt-claim`) continue;
58513
+ let r3 = L3(n3.source.tokenSources?.length ? n3.source.tokenSources.map((t4) => t4 === `access_token` ? e4.token : void 0) : [e4.token], n3.source.claim, n3.source.namespace);
58514
+ r3 && (t3[n3.header] = r3);
58515
+ }
58516
+ return Object.keys(t3).length > 0 ? t3 : void 0;
58517
+ }
58518
+ function ve2(e4) {
58519
+ let { logger: t3, diagnosticLabel: n3, allowAuthHeaderOverride: r3 } = e4, i2 = [{ label: `protocolDefaults`, entries: R2(e4.protocolDefaults, `protocolDefaults`, t3, n3) }, { label: `staticHeaders`, entries: R2(e4.staticHeaders, `staticHeaders`, t3, n3) }, { label: `tokenDerived`, entries: R2(_e2(e4.tokenDerived), `tokenDerived`, t3, n3) }, { label: `customized`, entries: R2(e4.customized, `customized`, t3, n3) }], a3 = /* @__PURE__ */ new Set([`staticHeaders`, `tokenDerived`, `customized`]), o3 = /* @__PURE__ */ new Map();
58520
+ for (let { label: e5, entries: s4 } of i2) for (let [i3, c2] of s4) {
58521
+ if (!r3 && a3.has(e5) && me2.has(i3)) {
58522
+ t3?.warn({ provider: n3, source: e5, header: c2.name }, `dropped attempt to override auth header (declare allowAuthHeaderOverride to permit)`);
58833
58523
  continue;
58834
58524
  }
58835
- let s6 = o4.get(i3);
58836
- s6 && e7 === `customized` && s6.value !== c2.value && t4?.debug({ provider: n4, header: c2.name }, `customizeRequest overrode a previously declared request header`), o4.set(i3, c2);
58525
+ let s5 = o3.get(i3);
58526
+ s5 && e5 === `customized` && s5.value !== c2.value && t3?.debug({ provider: n3, header: c2.name }, `customizeRequest overrode a previously declared request header`), o3.set(i3, c2);
58837
58527
  }
58838
- for (let [i3, a5] of R2(e6.auth, `auth`, t4, n4)) {
58839
- if (r4 && o4.has(i3)) {
58840
- t4?.debug({ provider: n4, header: a5.name }, `provider-declared auth header kept (allowAuthHeaderOverride); otto-resolved credential not applied`);
58528
+ for (let [i3, a4] of R2(e4.auth, `auth`, t3, n3)) {
58529
+ if (r3 && o3.has(i3)) {
58530
+ t3?.debug({ provider: n3, header: a4.name }, `provider-declared auth header kept (allowAuthHeaderOverride); otto-resolved credential not applied`);
58841
58531
  continue;
58842
58532
  }
58843
- o4.set(i3, a5);
58533
+ o3.set(i3, a4);
58844
58534
  }
58845
- let s4 = {};
58846
- for (let { name: e7, value: t5 } of o4.values()) s4[e7] = t5;
58847
- return s4;
58535
+ let s3 = {};
58536
+ for (let { name: e5, value: t4 } of o3.values()) s3[e5] = t4;
58537
+ return s3;
58848
58538
  }
58849
- var z6 = Be(`@x-otto/provider:oauth:templates`);
58539
+ var z5 = Be(`@x-otto/provider:oauth:templates`);
58850
58540
 
58851
58541
  // ../../extensions/plugin-otto-wire-protocols/src/anthropic-usage.ts
58852
58542
  var LIMIT_TYPE_ABBREVIATION = {
@@ -58862,9 +58552,9 @@ function readBucketUtilization(headers, limitType) {
58862
58552
  if (!abbr) return void 0;
58863
58553
  const raw = _t(headers, `anthropic-ratelimit-unified-${abbr}-utilization`);
58864
58554
  if (raw === void 0) return void 0;
58865
- const n4 = Number(raw);
58866
- if (!Number.isFinite(n4)) return void 0;
58867
- return Math.round(n4 * 100);
58555
+ const n3 = Number(raw);
58556
+ if (!Number.isFinite(n3)) return void 0;
58557
+ return Math.round(n3 * 100);
58868
58558
  }
58869
58559
  function extractProviderUsageFromHeaders(headers) {
58870
58560
  if (!headers) return null;
@@ -58984,7 +58674,7 @@ function withMessageCacheBreakpoint(messages, cacheControl = CACHE_CONTROL) {
58984
58674
  }
58985
58675
  function buildSystemBlocks(systemPrompt, segments, cacheControl = CACHE_CONTROL) {
58986
58676
  const source = segments && segments.length > 0 ? segments : systemPrompt ? [{ text: systemPrompt }] : [];
58987
- const blocks = source.filter((s4) => s4.text.length > 0);
58677
+ const blocks = source.filter((s3) => s3.text.length > 0);
58988
58678
  if (blocks.length === 0) {
58989
58679
  return void 0;
58990
58680
  }
@@ -59016,7 +58706,7 @@ function buildAnthropicMessages(messages, model) {
59016
58706
  const result = [];
59017
58707
  const nativeSystemMessageSupported = model ? supportsMidConversationSystemMessage(model) : false;
59018
58708
  const normalized = nativeSystemMessageSupported ? y(messages) : messages;
59019
- b5(normalized);
58709
+ b4(normalized);
59020
58710
  for (const msg of g(normalized)) {
59021
58711
  if (msg.role === "user") {
59022
58712
  if (typeof msg.content === "string") {
@@ -59029,7 +58719,7 @@ function buildAnthropicMessages(messages, model) {
59029
58719
  content.push({ type: "text", text: part.text });
59030
58720
  }
59031
58721
  } else if (part.type === "image") {
59032
- const { base64: base643, mediaType, valid } = o3(part.source, part.mime);
58722
+ const { base64: base643, mediaType, valid } = o2(part.source, part.mime);
59033
58723
  if (valid) {
59034
58724
  content.push({
59035
58725
  type: "image",
@@ -59081,7 +58771,7 @@ function buildAnthropicMessages(messages, model) {
59081
58771
  toolContent.push({ type: "text", text: c2.text });
59082
58772
  }
59083
58773
  } else if (c2.type === "image") {
59084
- const { base64: base643, mediaType, valid } = o3(c2.source, c2.mime);
58774
+ const { base64: base643, mediaType, valid } = o2(c2.source, c2.mime);
59085
58775
  if (valid) {
59086
58776
  toolContent.push({
59087
58777
  type: "image",
@@ -59146,7 +58836,7 @@ function mapStopReason(reason) {
59146
58836
  }
59147
58837
  function initStreamState(modelId) {
59148
58838
  return {
59149
- ...D4(),
58839
+ ...D3(),
59150
58840
  model: modelId,
59151
58841
  blocks: /* @__PURE__ */ new Map(),
59152
58842
  stopReason: "end_turn"
@@ -59155,7 +58845,7 @@ function initStreamState(modelId) {
59155
58845
  function buildAssistantMessage(state, final = false) {
59156
58846
  return F2(
59157
58847
  { api: "anthropic-messages", provider: "anthropic", model: state.model },
59158
- de3(state.blocks, final),
58848
+ de2(state.blocks, final),
59159
58849
  state,
59160
58850
  state.stopReason
59161
58851
  );
@@ -59249,7 +58939,7 @@ function dispatchStreamEvent(event, state) {
59249
58939
  return [{
59250
58940
  type: "tool_call_end",
59251
58941
  index,
59252
- toolCall: k5(block.id, block.name, block.argumentsJson),
58942
+ toolCall: k4(block.id, block.name, block.argumentsJson),
59253
58943
  partial: buildAssistantMessage(state)
59254
58944
  }];
59255
58945
  }
@@ -59320,7 +59010,7 @@ var AnthropicStream = class {
59320
59010
  if (envKey) {
59321
59011
  return { token: envKey, mode: "api_key" };
59322
59012
  }
59323
- throw new Ce3(
59013
+ throw new Ce(
59324
59014
  "Missing Anthropic API key. Set ANTHROPIC_API_KEY or configure via auth file.",
59325
59015
  { code: "PROVIDER_AUTH_MISSING" }
59326
59016
  );
@@ -59350,10 +59040,10 @@ var AnthropicStream = class {
59350
59040
  ...headerOptions
59351
59041
  });
59352
59042
  const cacheControl = cacheControlFor(context.cacheRetention);
59353
- const tools = context.tools ? context.tools.map((t4) => ({
59354
- name: t4.name,
59355
- description: t4.description,
59356
- input_schema: t4.parameters.toJSONSchema?.() ?? {}
59043
+ const tools = context.tools ? context.tools.map((t3) => ({
59044
+ name: t3.name,
59045
+ description: t3.description,
59046
+ input_schema: t3.parameters.toJSONSchema?.() ?? {}
59357
59047
  })) : [];
59358
59048
  const lastTool = tools[tools.length - 1];
59359
59049
  if (lastTool && cacheControl) {
@@ -59362,7 +59052,7 @@ var AnthropicStream = class {
59362
59052
  const effectiveMaxTokens = context.maxTokens ?? model.maxOutputTokens;
59363
59053
  const thinkingConfig = buildThinkingConfig(
59364
59054
  // RFC-235:按模型声明的 thinkingLevels 降级后再算预算(clamp 单一真源)。
59365
- context.thinkingLevel ? C3(context.thinkingLevel, model.thinkingLevels) : void 0,
59055
+ context.thinkingLevel ? C2(context.thinkingLevel, model.thinkingLevels) : void 0,
59366
59056
  model.reasoning,
59367
59057
  effectiveMaxTokens,
59368
59058
  model.thinkingMode
@@ -59384,7 +59074,7 @@ var AnthropicStream = class {
59384
59074
  ...context.temperature !== void 0 && !model.reasoning ? { temperature: context.temperature } : {},
59385
59075
  ...thinkingConfig ? { thinking: thinkingConfig } : {},
59386
59076
  // adaptive 模式:网关要求顶层 output_config.effort 控制推理投入(与 thinking.type.adaptive 配对)。
59387
- ...thinkingConfig?.type === "adaptive" && context.thinkingLevel ? { output_config: { effort: toAdaptiveEffort(C3(context.thinkingLevel, model.thinkingLevels)) } } : {},
59077
+ ...thinkingConfig?.type === "adaptive" && context.thinkingLevel ? { output_config: { effort: toAdaptiveEffort(C2(context.thinkingLevel, model.thinkingLevels)) } } : {},
59388
59078
  ...customization?.metadata ? { metadata: customization.metadata } : {}
59389
59079
  };
59390
59080
  return { client, requestParams, baseURL };
@@ -59415,14 +59105,14 @@ var AnthropicStream = class {
59415
59105
  // RFC-232(终局修正):跨 wire 协议救回"模型把工具调用写成字面文本 XML"违约响应
59416
59106
  // (见 stream-state.ts recoverLiteralInvokeToolCalls 头注释)。判据内部短路,
59417
59107
  // 无违约态时零开销(引用相等,不构造新对象)。
59418
- message: A4(doneMessage, ce2(context.tools)),
59108
+ message: A3(doneMessage, ce2(context.tools)),
59419
59109
  providerUsage
59420
59110
  };
59421
59111
  } catch (error48) {
59422
59112
  if (error48 instanceof Anthropic.APIError) {
59423
59113
  yield {
59424
59114
  type: "error",
59425
- error: new Ce3(`Anthropic API error ${error48.status}: ${error48.message}`, {
59115
+ error: new Ce(`Anthropic API error ${error48.status}: ${error48.message}`, {
59426
59116
  code: "PROVIDER_API_ERROR",
59427
59117
  cause: error48,
59428
59118
  // 把 SDK 的 HTTP status/headers 转成 ProviderError 的 typed 字段
@@ -59440,7 +59130,7 @@ var AnthropicStream = class {
59440
59130
  } else {
59441
59131
  yield {
59442
59132
  type: "error",
59443
- error: new Ce3("Unknown Anthropic stream error", {
59133
+ error: new Ce("Unknown Anthropic stream error", {
59444
59134
  code: "PROVIDER_STREAM_ERROR"
59445
59135
  })
59446
59136
  };
@@ -59489,17 +59179,17 @@ function buildResponsesInput(context) {
59489
59179
  if (typeof msg.content === "string") {
59490
59180
  input.push({
59491
59181
  role: "user",
59492
- content: [{ type: "input_text", text: x5(msg.content) }]
59182
+ content: [{ type: "input_text", text: x4(msg.content) }]
59493
59183
  });
59494
59184
  } else {
59495
59185
  input.push({
59496
59186
  role: "user",
59497
59187
  content: msg.content.map((part) => {
59498
59188
  if (part.type === "text") {
59499
- return { type: "input_text", text: x5(part.text) };
59189
+ return { type: "input_text", text: x4(part.text) };
59500
59190
  }
59501
59191
  if (part.type === "image") {
59502
- const { base64: base643, mediaType, valid } = o3(part.source, part.mime);
59192
+ const { base64: base643, mediaType, valid } = o2(part.source, part.mime);
59503
59193
  if (!valid) {
59504
59194
  return { type: "input_text", text: "[image omitted: corrupted or empty data]" };
59505
59195
  }
@@ -59513,7 +59203,7 @@ function buildResponsesInput(context) {
59513
59203
  });
59514
59204
  }
59515
59205
  } else if (msg.role === "assistant") {
59516
- const textParts = msg.content.filter((c2) => c2.type === "text").filter((c2) => c2.text.trim().length > 0).map((c2) => x5(c2.text)).join("");
59206
+ const textParts = msg.content.filter((c2) => c2.type === "text").filter((c2) => c2.text.trim().length > 0).map((c2) => x4(c2.text)).join("");
59517
59207
  if (textParts) {
59518
59208
  input.push({
59519
59209
  role: "assistant",
@@ -59534,7 +59224,7 @@ function buildResponsesInput(context) {
59534
59224
  input.push({
59535
59225
  type: "function_call_output",
59536
59226
  call_id: msg.toolCallId,
59537
- output: x5(
59227
+ output: x4(
59538
59228
  msg.content.map((c2) => c2.type === "text" ? c2.text : "").join("")
59539
59229
  )
59540
59230
  });
@@ -59542,7 +59232,7 @@ function buildResponsesInput(context) {
59542
59232
  input.push({
59543
59233
  role: "user",
59544
59234
  content: [
59545
- { type: "input_text", text: x5(v(msg.content)) }
59235
+ { type: "input_text", text: x4(v(msg.content)) }
59546
59236
  ]
59547
59237
  });
59548
59238
  }
@@ -59564,13 +59254,13 @@ function buildResponsesBody(model, context) {
59564
59254
  body.max_output_tokens = context.maxTokens ?? model.maxOutputTokens;
59565
59255
  }
59566
59256
  if (context.systemPrompt) {
59567
- body.instructions = x5(context.systemPrompt);
59257
+ body.instructions = x4(context.systemPrompt);
59568
59258
  }
59569
59259
  if (context.temperature !== void 0 && !model.reasoning) {
59570
59260
  body.temperature = context.temperature;
59571
59261
  }
59572
59262
  if (model.reasoning && context.thinkingLevel) {
59573
- body.reasoning = { effort: toReasoningEffort(C3(context.thinkingLevel, model.thinkingLevels)) };
59263
+ body.reasoning = { effort: toReasoningEffort(C2(context.thinkingLevel, model.thinkingLevels)) };
59574
59264
  }
59575
59265
  if (context.tools && context.tools.length > 0) {
59576
59266
  body.tools = context.tools.map((tool) => ({
@@ -59592,7 +59282,7 @@ function ensureBlock(blocks, index, kind) {
59592
59282
  }
59593
59283
  function initStreamState2(model) {
59594
59284
  return {
59595
- ...D4(),
59285
+ ...D3(),
59596
59286
  model,
59597
59287
  blocks: /* @__PURE__ */ new Map(),
59598
59288
  stopReason: "end_turn"
@@ -59601,7 +59291,7 @@ function initStreamState2(model) {
59601
59291
  function buildAssistantMessage2(state, final = false) {
59602
59292
  return F2(
59603
59293
  { api: state.model.api, provider: state.model.provider, model: state.model.id },
59604
- de3(state.blocks, final),
59294
+ de2(state.blocks, final),
59605
59295
  state,
59606
59296
  state.stopReason
59607
59297
  );
@@ -59671,7 +59361,7 @@ function dispatchResponsesSSEEvent(type, data, state) {
59671
59361
  state.outputTokens = outputTokens;
59672
59362
  state.cacheReadTokens = cached2;
59673
59363
  }
59674
- const hasTool = [...state.blocks.values()].some((b6) => b6.kind === "tool_call");
59364
+ const hasTool = [...state.blocks.values()].some((b5) => b5.kind === "tool_call");
59675
59365
  if (type === "response.incomplete") {
59676
59366
  state.stopReason = "max_tokens";
59677
59367
  } else {
@@ -59688,7 +59378,7 @@ function dispatchResponsesSSEEvent(type, data, state) {
59688
59378
  return {
59689
59379
  events: [{
59690
59380
  type: "error",
59691
- error: new Ce3(`OpenAI Responses API error: ${message}`, {
59381
+ error: new Ce(`OpenAI Responses API error: ${message}`, {
59692
59382
  code: "PROVIDER_API_ERROR",
59693
59383
  errorType
59694
59384
  })
@@ -59736,7 +59426,7 @@ var OpenAIResponsesStream = class {
59736
59426
  if (envKey) {
59737
59427
  return { token: envKey, mode: "api_key" };
59738
59428
  }
59739
- throw new Ce3("Missing OpenAI credential. Set OPENAI_API_KEY or login via OAuth.", {
59429
+ throw new Ce("Missing OpenAI credential. Set OPENAI_API_KEY or login via OAuth.", {
59740
59430
  code: "PROVIDER_AUTH_MISSING"
59741
59431
  });
59742
59432
  }
@@ -59783,7 +59473,7 @@ var OpenAIResponsesStream = class {
59783
59473
  let started = false;
59784
59474
  try {
59785
59475
  let responseHeaders;
59786
- const sse = gt2({
59476
+ const sse = gt({
59787
59477
  url: url2,
59788
59478
  body,
59789
59479
  headers: this.buildHeaders(auth, model.provider),
@@ -59813,13 +59503,13 @@ var OpenAIResponsesStream = class {
59813
59503
  yield* result.events;
59814
59504
  if (result.fatal) return;
59815
59505
  }
59816
- const orderedTools = [...state.blocks.entries()].sort(([a4], [b6]) => a4 - b6);
59506
+ const orderedTools = [...state.blocks.entries()].sort(([a3], [b5]) => a3 - b5);
59817
59507
  for (const [index, block] of orderedTools) {
59818
59508
  if (block.kind === "tool_call") {
59819
59509
  yield {
59820
59510
  type: "tool_call_end",
59821
59511
  index,
59822
- toolCall: k5(block.id, block.name, block.argumentsJson),
59512
+ toolCall: k4(block.id, block.name, block.argumentsJson),
59823
59513
  partial: buildAssistantMessage2(state)
59824
59514
  };
59825
59515
  } else if (block.kind === "text") {
@@ -59837,8 +59527,8 @@ var OpenAIResponsesStream = class {
59837
59527
  type: "done",
59838
59528
  reason: state.stopReason,
59839
59529
  // RFC-232(终局修正):跨 wire 协议救回违约响应,见 @x-otto/provider stream-state.ts。
59840
- message: A4(buildAssistantMessage2(state, true), ce2(context.tools)),
59841
- providerUsage: E5(responseHeaders)
59530
+ message: A3(buildAssistantMessage2(state, true), ce2(context.tools)),
59531
+ providerUsage: E4(responseHeaders)
59842
59532
  };
59843
59533
  } catch (error48) {
59844
59534
  if (error48 instanceof Error) {
@@ -59846,7 +59536,7 @@ var OpenAIResponsesStream = class {
59846
59536
  } else {
59847
59537
  yield {
59848
59538
  type: "error",
59849
- error: new Ce3("Unknown OpenAI Responses stream error", {
59539
+ error: new Ce("Unknown OpenAI Responses stream error", {
59850
59540
  code: "PROVIDER_STREAM_ERROR"
59851
59541
  })
59852
59542
  };
@@ -59903,7 +59593,7 @@ var OpenAICompletionsStream = class {
59903
59593
  return { token: key, mode: "api_key" };
59904
59594
  }
59905
59595
  }
59906
- throw new Ce3(
59596
+ throw new Ce(
59907
59597
  `Missing credential for provider '${model.provider}' (openai-completions).`,
59908
59598
  { code: "PROVIDER_AUTH_MISSING" }
59909
59599
  );
@@ -59956,7 +59646,7 @@ function createOpenAICompletionsProvider(options = {}) {
59956
59646
  // ../../extensions/plugin-otto-wire-protocols/plugin.ts
59957
59647
  function adaptToOpenAICompletions(input) {
59958
59648
  return createOpenAICompletionsProvider({
59959
- resolveKey: () => input.resolveAuth().then((a4) => a4?.token),
59649
+ resolveKey: () => input.resolveAuth().then((a3) => a3?.token),
59960
59650
  headers: input.headers,
59961
59651
  tokenDerivedHeaders: input.tokenDerivedHeaders,
59962
59652
  logger: input.logger,
@@ -59967,7 +59657,7 @@ function adaptToOpenAICompletions(input) {
59967
59657
  }
59968
59658
  function adaptToOpenAIResponses(input) {
59969
59659
  return createOpenAIResponsesProvider({
59970
- resolveKey: () => input.resolveAuth().then((a4) => a4?.token),
59660
+ resolveKey: () => input.resolveAuth().then((a3) => a3?.token),
59971
59661
  resolveBaseUrl: input.resolveBaseUrl,
59972
59662
  tokenDerivedHeaders: input.tokenDerivedHeaders,
59973
59663
  headers: input.headers,