@compass-labs/api-sdk 0.5.36 → 0.5.38

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 (76) hide show
  1. package/README.md +1 -1
  2. package/bin/mcp-server.js +404 -379
  3. package/bin/mcp-server.js.map +15 -16
  4. package/dist/commonjs/funcs/morphoVault.js +2 -0
  5. package/dist/commonjs/funcs/morphoVault.js.map +1 -1
  6. package/dist/commonjs/funcs/tokenPrice.js +1 -0
  7. package/dist/commonjs/funcs/tokenPrice.js.map +1 -1
  8. package/dist/commonjs/lib/config.d.ts +3 -3
  9. package/dist/commonjs/lib/config.js +3 -3
  10. package/dist/commonjs/mcp-server/cli/start/command.d.ts.map +1 -1
  11. package/dist/commonjs/mcp-server/cli/start/command.js +0 -12
  12. package/dist/commonjs/mcp-server/cli/start/command.js.map +1 -1
  13. package/dist/commonjs/mcp-server/cli/start/impl.d.ts +0 -2
  14. package/dist/commonjs/mcp-server/cli/start/impl.d.ts.map +1 -1
  15. package/dist/commonjs/mcp-server/cli/start/impl.js +0 -2
  16. package/dist/commonjs/mcp-server/cli/start/impl.js.map +1 -1
  17. package/dist/commonjs/mcp-server/mcp-server.js +1 -1
  18. package/dist/commonjs/mcp-server/server.js +1 -1
  19. package/dist/commonjs/models/components/apy.d.ts +2 -0
  20. package/dist/commonjs/models/components/apy.d.ts.map +1 -1
  21. package/dist/commonjs/models/components/apy.js +2 -0
  22. package/dist/commonjs/models/components/apy.js.map +1 -1
  23. package/dist/commonjs/models/errors/apierror.d.ts.map +1 -1
  24. package/dist/commonjs/models/errors/apierror.js +8 -2
  25. package/dist/commonjs/models/errors/apierror.js.map +1 -1
  26. package/dist/commonjs/models/operations/morphovault.d.ts +26 -4
  27. package/dist/commonjs/models/operations/morphovault.d.ts.map +1 -1
  28. package/dist/commonjs/models/operations/morphovault.js +15 -5
  29. package/dist/commonjs/models/operations/morphovault.js.map +1 -1
  30. package/dist/commonjs/models/operations/tokenprice.d.ts +5 -0
  31. package/dist/commonjs/models/operations/tokenprice.d.ts.map +1 -1
  32. package/dist/commonjs/models/operations/tokenprice.js +2 -0
  33. package/dist/commonjs/models/operations/tokenprice.js.map +1 -1
  34. package/dist/esm/funcs/morphoVault.js +2 -0
  35. package/dist/esm/funcs/morphoVault.js.map +1 -1
  36. package/dist/esm/funcs/tokenPrice.js +1 -0
  37. package/dist/esm/funcs/tokenPrice.js.map +1 -1
  38. package/dist/esm/lib/config.d.ts +3 -3
  39. package/dist/esm/lib/config.js +3 -3
  40. package/dist/esm/mcp-server/cli/start/command.d.ts.map +1 -1
  41. package/dist/esm/mcp-server/cli/start/command.js +0 -12
  42. package/dist/esm/mcp-server/cli/start/command.js.map +1 -1
  43. package/dist/esm/mcp-server/cli/start/impl.d.ts +0 -2
  44. package/dist/esm/mcp-server/cli/start/impl.d.ts.map +1 -1
  45. package/dist/esm/mcp-server/cli/start/impl.js +0 -2
  46. package/dist/esm/mcp-server/cli/start/impl.js.map +1 -1
  47. package/dist/esm/mcp-server/mcp-server.js +1 -1
  48. package/dist/esm/mcp-server/server.js +1 -1
  49. package/dist/esm/models/components/apy.d.ts +2 -0
  50. package/dist/esm/models/components/apy.d.ts.map +1 -1
  51. package/dist/esm/models/components/apy.js +2 -0
  52. package/dist/esm/models/components/apy.js.map +1 -1
  53. package/dist/esm/models/errors/apierror.d.ts.map +1 -1
  54. package/dist/esm/models/errors/apierror.js +8 -2
  55. package/dist/esm/models/errors/apierror.js.map +1 -1
  56. package/dist/esm/models/operations/morphovault.d.ts +26 -4
  57. package/dist/esm/models/operations/morphovault.d.ts.map +1 -1
  58. package/dist/esm/models/operations/morphovault.js +15 -5
  59. package/dist/esm/models/operations/morphovault.js.map +1 -1
  60. package/dist/esm/models/operations/tokenprice.d.ts +5 -0
  61. package/dist/esm/models/operations/tokenprice.d.ts.map +1 -1
  62. package/dist/esm/models/operations/tokenprice.js +2 -0
  63. package/dist/esm/models/operations/tokenprice.js.map +1 -1
  64. package/jsr.json +1 -1
  65. package/package.json +1 -1
  66. package/src/funcs/morphoVault.ts +2 -0
  67. package/src/funcs/tokenPrice.ts +1 -0
  68. package/src/lib/config.ts +3 -3
  69. package/src/mcp-server/cli/start/command.ts +0 -13
  70. package/src/mcp-server/cli/start/impl.ts +0 -4
  71. package/src/mcp-server/mcp-server.ts +1 -1
  72. package/src/mcp-server/server.ts +1 -1
  73. package/src/models/components/apy.ts +4 -0
  74. package/src/models/errors/apierror.ts +8 -2
  75. package/src/models/operations/morphovault.ts +32 -6
  76. package/src/models/operations/tokenprice.ts +7 -0
package/bin/mcp-server.js CHANGED
@@ -410,7 +410,7 @@ function addIssueToContext(ctx, issueData) {
410
410
  ctx.schemaErrorMap,
411
411
  overrideMap,
412
412
  overrideMap === en_default ? undefined : en_default
413
- ].filter((x2) => !!x2)
413
+ ].filter((x) => !!x)
414
414
  });
415
415
  ctx.common.issues.push(issue);
416
416
  }
@@ -493,7 +493,7 @@ var makeIssue = (params) => {
493
493
  path: fullPath,
494
494
  message: errorMessage
495
495
  };
496
- }, EMPTY_PATH, INVALID, DIRTY = (value) => ({ status: "dirty", value }), OK = (value) => ({ status: "valid", value }), isAborted = (x2) => x2.status === "aborted", isDirty = (x2) => x2.status === "dirty", isValid = (x2) => x2.status === "valid", isAsync = (x2) => typeof Promise !== "undefined" && x2 instanceof Promise;
496
+ }, EMPTY_PATH, INVALID, DIRTY = (value) => ({ status: "dirty", value }), OK = (value) => ({ status: "valid", value }), isAborted = (x) => x.status === "aborted", isDirty = (x) => x.status === "dirty", isValid = (x) => x.status === "valid", isAsync = (x) => typeof Promise !== "undefined" && x instanceof Promise;
497
497
  var init_parseUtil = __esm(() => {
498
498
  init_errors();
499
499
  init_en();
@@ -936,17 +936,17 @@ function deepPartialify(schema) {
936
936
  return schema;
937
937
  }
938
938
  }
939
- function mergeValues(a, b2) {
939
+ function mergeValues(a, b) {
940
940
  const aType = getParsedType(a);
941
- const bType = getParsedType(b2);
942
- if (a === b2) {
941
+ const bType = getParsedType(b);
942
+ if (a === b) {
943
943
  return { valid: true, data: a };
944
944
  } else if (aType === ZodParsedType.object && bType === ZodParsedType.object) {
945
- const bKeys = util.objectKeys(b2);
945
+ const bKeys = util.objectKeys(b);
946
946
  const sharedKeys = util.objectKeys(a).filter((key) => bKeys.indexOf(key) !== -1);
947
- const newObj = { ...a, ...b2 };
947
+ const newObj = { ...a, ...b };
948
948
  for (const key of sharedKeys) {
949
- const sharedValue = mergeValues(a[key], b2[key]);
949
+ const sharedValue = mergeValues(a[key], b[key]);
950
950
  if (!sharedValue.valid) {
951
951
  return { valid: false };
952
952
  }
@@ -954,13 +954,13 @@ function mergeValues(a, b2) {
954
954
  }
955
955
  return { valid: true, data: newObj };
956
956
  } else if (aType === ZodParsedType.array && bType === ZodParsedType.array) {
957
- if (a.length !== b2.length) {
957
+ if (a.length !== b.length) {
958
958
  return { valid: false };
959
959
  }
960
960
  const newArray = [];
961
961
  for (let index = 0;index < a.length; index++) {
962
962
  const itemA = a[index];
963
- const itemB = b2[index];
963
+ const itemB = b[index];
964
964
  const sharedValue = mergeValues(itemA, itemB);
965
965
  if (!sharedValue.valid) {
966
966
  return { valid: false };
@@ -968,7 +968,7 @@ function mergeValues(a, b2) {
968
968
  newArray.push(sharedValue.data);
969
969
  }
970
970
  return { valid: true, data: newArray };
971
- } else if (aType === ZodParsedType.date && bType === ZodParsedType.date && +a === +b2) {
971
+ } else if (aType === ZodParsedType.date && bType === ZodParsedType.date && +a === +b) {
972
972
  return { valid: true, data: a };
973
973
  } else {
974
974
  return { valid: false };
@@ -2895,7 +2895,7 @@ var init_types = __esm(() => {
2895
2895
  if (!schema)
2896
2896
  return null;
2897
2897
  return schema._parse(new ParseInputLazyPath(ctx, item, ctx.path, itemIndex));
2898
- }).filter((x2) => !!x2);
2898
+ }).filter((x) => !!x);
2899
2899
  if (ctx.common.async) {
2900
2900
  return Promise.all(items).then((results) => {
2901
2901
  return ParseStatus.mergeArray(status, results);
@@ -3148,7 +3148,7 @@ var init_types = __esm(() => {
3148
3148
  return makeIssue({
3149
3149
  data: args,
3150
3150
  path: ctx.path,
3151
- errorMaps: [ctx.common.contextualErrorMap, ctx.schemaErrorMap, getErrorMap(), en_default].filter((x2) => !!x2),
3151
+ errorMaps: [ctx.common.contextualErrorMap, ctx.schemaErrorMap, getErrorMap(), en_default].filter((x) => !!x),
3152
3152
  issueData: {
3153
3153
  code: ZodIssueCode.invalid_arguments,
3154
3154
  argumentsError: error
@@ -3159,7 +3159,7 @@ var init_types = __esm(() => {
3159
3159
  return makeIssue({
3160
3160
  data: returns,
3161
3161
  path: ctx.path,
3162
- errorMaps: [ctx.common.contextualErrorMap, ctx.schemaErrorMap, getErrorMap(), en_default].filter((x2) => !!x2),
3162
+ errorMaps: [ctx.common.contextualErrorMap, ctx.schemaErrorMap, getErrorMap(), en_default].filter((x) => !!x),
3163
3163
  issueData: {
3164
3164
  code: ZodIssueCode.invalid_return_type,
3165
3165
  returnTypeError: error
@@ -3746,10 +3746,10 @@ var init_types = __esm(() => {
3746
3746
  }
3747
3747
  }
3748
3748
  }
3749
- static create(a, b2) {
3749
+ static create(a, b) {
3750
3750
  return new ZodPipeline({
3751
3751
  in: a,
3752
- out: b2,
3752
+ out: b,
3753
3753
  typeName: ZodFirstPartyTypeKind.ZodPipeline
3754
3754
  });
3755
3755
  }
@@ -5713,7 +5713,7 @@ var require_utf32 = __commonJS((exports) => {
5713
5713
  return this.decoder.end();
5714
5714
  };
5715
5715
  function detectEncoding(bufs, defaultEncoding) {
5716
- var b2 = [];
5716
+ var b = [];
5717
5717
  var charsProcessed = 0;
5718
5718
  var invalidLE = 0, invalidBE = 0;
5719
5719
  var bmpCharsLE = 0, bmpCharsBE = 0;
@@ -5721,25 +5721,25 @@ var require_utf32 = __commonJS((exports) => {
5721
5721
  for (var i = 0;i < bufs.length; i++) {
5722
5722
  var buf = bufs[i];
5723
5723
  for (var j2 = 0;j2 < buf.length; j2++) {
5724
- b2.push(buf[j2]);
5725
- if (b2.length === 4) {
5724
+ b.push(buf[j2]);
5725
+ if (b.length === 4) {
5726
5726
  if (charsProcessed === 0) {
5727
- if (b2[0] === 255 && b2[1] === 254 && b2[2] === 0 && b2[3] === 0) {
5727
+ if (b[0] === 255 && b[1] === 254 && b[2] === 0 && b[3] === 0) {
5728
5728
  return "utf-32le";
5729
5729
  }
5730
- if (b2[0] === 0 && b2[1] === 0 && b2[2] === 254 && b2[3] === 255) {
5730
+ if (b[0] === 0 && b[1] === 0 && b[2] === 254 && b[3] === 255) {
5731
5731
  return "utf-32be";
5732
5732
  }
5733
5733
  }
5734
- if (b2[0] !== 0 || b2[1] > 16)
5734
+ if (b[0] !== 0 || b[1] > 16)
5735
5735
  invalidBE++;
5736
- if (b2[3] !== 0 || b2[2] > 16)
5736
+ if (b[3] !== 0 || b[2] > 16)
5737
5737
  invalidLE++;
5738
- if (b2[0] === 0 && b2[1] === 0 && (b2[2] !== 0 || b2[3] !== 0))
5738
+ if (b[0] === 0 && b[1] === 0 && (b[2] !== 0 || b[3] !== 0))
5739
5739
  bmpCharsBE++;
5740
- if ((b2[0] !== 0 || b2[1] !== 0) && b2[2] === 0 && b2[3] === 0)
5740
+ if ((b[0] !== 0 || b[1] !== 0) && b[2] === 0 && b[3] === 0)
5741
5741
  bmpCharsLE++;
5742
- b2.length = 0;
5742
+ b.length = 0;
5743
5743
  charsProcessed++;
5744
5744
  if (charsProcessed >= 100) {
5745
5745
  break outer_loop;
@@ -5854,26 +5854,26 @@ var require_utf16 = __commonJS((exports) => {
5854
5854
  return this.decoder.end();
5855
5855
  };
5856
5856
  function detectEncoding(bufs, defaultEncoding) {
5857
- var b2 = [];
5857
+ var b = [];
5858
5858
  var charsProcessed = 0;
5859
5859
  var asciiCharsLE = 0, asciiCharsBE = 0;
5860
5860
  outer_loop:
5861
5861
  for (var i = 0;i < bufs.length; i++) {
5862
5862
  var buf = bufs[i];
5863
5863
  for (var j2 = 0;j2 < buf.length; j2++) {
5864
- b2.push(buf[j2]);
5865
- if (b2.length === 2) {
5864
+ b.push(buf[j2]);
5865
+ if (b.length === 2) {
5866
5866
  if (charsProcessed === 0) {
5867
- if (b2[0] === 255 && b2[1] === 254)
5867
+ if (b[0] === 255 && b[1] === 254)
5868
5868
  return "utf-16le";
5869
- if (b2[0] === 254 && b2[1] === 255)
5869
+ if (b[0] === 254 && b[1] === 255)
5870
5870
  return "utf-16be";
5871
5871
  }
5872
- if (b2[0] === 0 && b2[1] !== 0)
5872
+ if (b[0] === 0 && b[1] !== 0)
5873
5873
  asciiCharsBE++;
5874
- if (b2[0] !== 0 && b2[1] === 0)
5874
+ if (b[0] !== 0 && b[1] === 0)
5875
5875
  asciiCharsLE++;
5876
- b2.length = 0;
5876
+ b.length = 0;
5877
5877
  charsProcessed++;
5878
5878
  if (charsProcessed >= 100) {
5879
5879
  break outer_loop;
@@ -9338,8 +9338,8 @@ var init_stdio2 = __esm(() => {
9338
9338
  var require_ms = __commonJS((exports, module) => {
9339
9339
  var s = 1000;
9340
9340
  var m = s * 60;
9341
- var h2 = m * 60;
9342
- var d = h2 * 24;
9341
+ var h = m * 60;
9342
+ var d = h * 24;
9343
9343
  var y = d * 365.25;
9344
9344
  module.exports = function(val, options) {
9345
9345
  options = options || {};
@@ -9378,7 +9378,7 @@ var require_ms = __commonJS((exports, module) => {
9378
9378
  case "hrs":
9379
9379
  case "hr":
9380
9380
  case "h":
9381
- return n * h2;
9381
+ return n * h;
9382
9382
  case "minutes":
9383
9383
  case "minute":
9384
9384
  case "mins":
@@ -9405,8 +9405,8 @@ var require_ms = __commonJS((exports, module) => {
9405
9405
  if (ms >= d) {
9406
9406
  return Math.round(ms / d) + "d";
9407
9407
  }
9408
- if (ms >= h2) {
9409
- return Math.round(ms / h2) + "h";
9408
+ if (ms >= h) {
9409
+ return Math.round(ms / h) + "h";
9410
9410
  }
9411
9411
  if (ms >= m) {
9412
9412
  return Math.round(ms / m) + "m";
@@ -9417,7 +9417,7 @@ var require_ms = __commonJS((exports, module) => {
9417
9417
  return ms + "ms";
9418
9418
  }
9419
9419
  function fmtLong(ms) {
9420
- return plural(ms, d, "day") || plural(ms, h2, "hour") || plural(ms, m, "minute") || plural(ms, s, "second") || ms + " ms";
9420
+ return plural(ms, d, "day") || plural(ms, h, "hour") || plural(ms, m, "minute") || plural(ms, s, "second") || ms + " ms";
9421
9421
  }
9422
9422
  function plural(ms, n, name) {
9423
9423
  if (ms < n) {
@@ -13309,10 +13309,10 @@ var require_ee_first = __commonJS((exports, module) => {
13309
13309
  done.apply(null, arguments);
13310
13310
  }
13311
13311
  function cleanup() {
13312
- var x2;
13312
+ var x;
13313
13313
  for (var i2 = 0;i2 < cleanups.length; i2++) {
13314
- x2 = cleanups[i2];
13315
- x2.ee.removeListener(x2.event, x2.fn);
13314
+ x = cleanups[i2];
13315
+ x.ee.removeListener(x.event, x.fn);
13316
13316
  }
13317
13317
  }
13318
13318
  function thunk(fn2) {
@@ -23036,95 +23036,95 @@ var require_object_inspect = __commonJS((exports, module) => {
23036
23036
  }
23037
23037
  return null;
23038
23038
  }
23039
- function indexOf(xs, x2) {
23039
+ function indexOf(xs, x) {
23040
23040
  if (xs.indexOf) {
23041
- return xs.indexOf(x2);
23041
+ return xs.indexOf(x);
23042
23042
  }
23043
23043
  for (var i = 0, l = xs.length;i < l; i++) {
23044
- if (xs[i] === x2) {
23044
+ if (xs[i] === x) {
23045
23045
  return i;
23046
23046
  }
23047
23047
  }
23048
23048
  return -1;
23049
23049
  }
23050
- function isMap(x2) {
23051
- if (!mapSize || !x2 || typeof x2 !== "object") {
23050
+ function isMap(x) {
23051
+ if (!mapSize || !x || typeof x !== "object") {
23052
23052
  return false;
23053
23053
  }
23054
23054
  try {
23055
- mapSize.call(x2);
23055
+ mapSize.call(x);
23056
23056
  try {
23057
- setSize.call(x2);
23057
+ setSize.call(x);
23058
23058
  } catch (s) {
23059
23059
  return true;
23060
23060
  }
23061
- return x2 instanceof Map;
23061
+ return x instanceof Map;
23062
23062
  } catch (e) {}
23063
23063
  return false;
23064
23064
  }
23065
- function isWeakMap(x2) {
23066
- if (!weakMapHas || !x2 || typeof x2 !== "object") {
23065
+ function isWeakMap(x) {
23066
+ if (!weakMapHas || !x || typeof x !== "object") {
23067
23067
  return false;
23068
23068
  }
23069
23069
  try {
23070
- weakMapHas.call(x2, weakMapHas);
23070
+ weakMapHas.call(x, weakMapHas);
23071
23071
  try {
23072
- weakSetHas.call(x2, weakSetHas);
23072
+ weakSetHas.call(x, weakSetHas);
23073
23073
  } catch (s) {
23074
23074
  return true;
23075
23075
  }
23076
- return x2 instanceof WeakMap;
23076
+ return x instanceof WeakMap;
23077
23077
  } catch (e) {}
23078
23078
  return false;
23079
23079
  }
23080
- function isWeakRef(x2) {
23081
- if (!weakRefDeref || !x2 || typeof x2 !== "object") {
23080
+ function isWeakRef(x) {
23081
+ if (!weakRefDeref || !x || typeof x !== "object") {
23082
23082
  return false;
23083
23083
  }
23084
23084
  try {
23085
- weakRefDeref.call(x2);
23085
+ weakRefDeref.call(x);
23086
23086
  return true;
23087
23087
  } catch (e) {}
23088
23088
  return false;
23089
23089
  }
23090
- function isSet(x2) {
23091
- if (!setSize || !x2 || typeof x2 !== "object") {
23090
+ function isSet(x) {
23091
+ if (!setSize || !x || typeof x !== "object") {
23092
23092
  return false;
23093
23093
  }
23094
23094
  try {
23095
- setSize.call(x2);
23095
+ setSize.call(x);
23096
23096
  try {
23097
- mapSize.call(x2);
23097
+ mapSize.call(x);
23098
23098
  } catch (m) {
23099
23099
  return true;
23100
23100
  }
23101
- return x2 instanceof Set;
23101
+ return x instanceof Set;
23102
23102
  } catch (e) {}
23103
23103
  return false;
23104
23104
  }
23105
- function isWeakSet(x2) {
23106
- if (!weakSetHas || !x2 || typeof x2 !== "object") {
23105
+ function isWeakSet(x) {
23106
+ if (!weakSetHas || !x || typeof x !== "object") {
23107
23107
  return false;
23108
23108
  }
23109
23109
  try {
23110
- weakSetHas.call(x2, weakSetHas);
23110
+ weakSetHas.call(x, weakSetHas);
23111
23111
  try {
23112
- weakMapHas.call(x2, weakMapHas);
23112
+ weakMapHas.call(x, weakMapHas);
23113
23113
  } catch (s) {
23114
23114
  return true;
23115
23115
  }
23116
- return x2 instanceof WeakSet;
23116
+ return x instanceof WeakSet;
23117
23117
  } catch (e) {}
23118
23118
  return false;
23119
23119
  }
23120
- function isElement(x2) {
23121
- if (!x2 || typeof x2 !== "object") {
23120
+ function isElement(x) {
23121
+ if (!x || typeof x !== "object") {
23122
23122
  return false;
23123
23123
  }
23124
- if (typeof HTMLElement !== "undefined" && x2 instanceof HTMLElement) {
23124
+ if (typeof HTMLElement !== "undefined" && x instanceof HTMLElement) {
23125
23125
  return true;
23126
23126
  }
23127
- return typeof x2.nodeName === "string" && typeof x2.getAttribute === "function";
23127
+ return typeof x.nodeName === "string" && typeof x.getAttribute === "function";
23128
23128
  }
23129
23129
  function inspectString(str, opts) {
23130
23130
  if (str.length > opts.maxStringLength) {
@@ -23139,15 +23139,15 @@ var require_object_inspect = __commonJS((exports, module) => {
23139
23139
  }
23140
23140
  function lowbyte(c) {
23141
23141
  var n = c.charCodeAt(0);
23142
- var x2 = {
23142
+ var x = {
23143
23143
  8: "b",
23144
23144
  9: "t",
23145
23145
  10: "n",
23146
23146
  12: "f",
23147
23147
  13: "r"
23148
23148
  }[n];
23149
- if (x2) {
23150
- return "\\" + x2;
23149
+ if (x) {
23150
+ return "\\" + x;
23151
23151
  }
23152
23152
  return "\\x" + (n < 16 ? "0" : "") + $toUpperCase.call(n.toString(16));
23153
23153
  }
@@ -23520,13 +23520,13 @@ var require_implementation = __commonJS((exports, module) => {
23520
23520
  var toStr = Object.prototype.toString;
23521
23521
  var max = Math.max;
23522
23522
  var funcType = "[object Function]";
23523
- var concatty = function concatty(a, b2) {
23523
+ var concatty = function concatty(a, b) {
23524
23524
  var arr = [];
23525
23525
  for (var i = 0;i < a.length; i += 1) {
23526
23526
  arr[i] = a[i];
23527
23527
  }
23528
- for (var j2 = 0;j2 < b2.length; j2 += 1) {
23529
- arr[j2 + a.length] = b2[j2];
23528
+ for (var j2 = 0;j2 < b.length; j2 += 1) {
23529
+ arr[j2 + a.length] = b[j2];
23530
23530
  }
23531
23531
  return arr;
23532
23532
  };
@@ -24362,8 +24362,8 @@ var require_utils = __commonJS((exports, module) => {
24362
24362
  }
24363
24363
  return !!(obj.constructor && obj.constructor.isBuffer && obj.constructor.isBuffer(obj));
24364
24364
  };
24365
- var combine = function combine(a, b2) {
24366
- return [].concat(a, b2);
24365
+ var combine = function combine(a, b) {
24366
+ return [].concat(a, b);
24367
24367
  };
24368
24368
  var maybeMap = function maybeMap(val, fn) {
24369
24369
  if (isArray(val)) {
@@ -25149,8 +25149,8 @@ var require_merge_descriptors = __commonJS((exports, module) => {
25149
25149
  var require_ms2 = __commonJS((exports, module) => {
25150
25150
  var s = 1000;
25151
25151
  var m = s * 60;
25152
- var h2 = m * 60;
25153
- var d = h2 * 24;
25152
+ var h = m * 60;
25153
+ var d = h * 24;
25154
25154
  var y = d * 365.25;
25155
25155
  module.exports = function(val, options) {
25156
25156
  options = options || {};
@@ -25189,7 +25189,7 @@ var require_ms2 = __commonJS((exports, module) => {
25189
25189
  case "hrs":
25190
25190
  case "hr":
25191
25191
  case "h":
25192
- return n * h2;
25192
+ return n * h;
25193
25193
  case "minutes":
25194
25194
  case "minute":
25195
25195
  case "mins":
@@ -25216,8 +25216,8 @@ var require_ms2 = __commonJS((exports, module) => {
25216
25216
  if (ms >= d) {
25217
25217
  return Math.round(ms / d) + "d";
25218
25218
  }
25219
- if (ms >= h2) {
25220
- return Math.round(ms / h2) + "h";
25219
+ if (ms >= h) {
25220
+ return Math.round(ms / h) + "h";
25221
25221
  }
25222
25222
  if (ms >= m) {
25223
25223
  return Math.round(ms / m) + "m";
@@ -25228,7 +25228,7 @@ var require_ms2 = __commonJS((exports, module) => {
25228
25228
  return ms + "ms";
25229
25229
  }
25230
25230
  function fmtLong(ms) {
25231
- return plural(ms, d, "day") || plural(ms, h2, "hour") || plural(ms, m, "minute") || plural(ms, s, "second") || ms + " ms";
25231
+ return plural(ms, d, "day") || plural(ms, h, "hour") || plural(ms, m, "minute") || plural(ms, s, "second") || ms + " ms";
25232
25232
  }
25233
25233
  function plural(ms, n, name) {
25234
25234
  if (ms < n) {
@@ -25875,8 +25875,8 @@ var require_finalhandler = __commonJS((exports, module) => {
25875
25875
  var require_ms3 = __commonJS((exports, module) => {
25876
25876
  var s = 1000;
25877
25877
  var m = s * 60;
25878
- var h2 = m * 60;
25879
- var d = h2 * 24;
25878
+ var h = m * 60;
25879
+ var d = h * 24;
25880
25880
  var y = d * 365.25;
25881
25881
  module.exports = function(val, options) {
25882
25882
  options = options || {};
@@ -25915,7 +25915,7 @@ var require_ms3 = __commonJS((exports, module) => {
25915
25915
  case "hrs":
25916
25916
  case "hr":
25917
25917
  case "h":
25918
- return n * h2;
25918
+ return n * h;
25919
25919
  case "minutes":
25920
25920
  case "minute":
25921
25921
  case "mins":
@@ -25942,8 +25942,8 @@ var require_ms3 = __commonJS((exports, module) => {
25942
25942
  if (ms >= d) {
25943
25943
  return Math.round(ms / d) + "d";
25944
25944
  }
25945
- if (ms >= h2) {
25946
- return Math.round(ms / h2) + "h";
25945
+ if (ms >= h) {
25946
+ return Math.round(ms / h) + "h";
25947
25947
  }
25948
25948
  if (ms >= m) {
25949
25949
  return Math.round(ms / m) + "m";
@@ -25954,7 +25954,7 @@ var require_ms3 = __commonJS((exports, module) => {
25954
25954
  return ms + "ms";
25955
25955
  }
25956
25956
  function fmtLong(ms) {
25957
- return plural(ms, d, "day") || plural(ms, h2, "hour") || plural(ms, m, "minute") || plural(ms, s, "second") || ms + " ms";
25957
+ return plural(ms, d, "day") || plural(ms, h, "hour") || plural(ms, m, "minute") || plural(ms, s, "second") || ms + " ms";
25958
25958
  }
25959
25959
  function plural(ms, n, name) {
25960
25960
  if (ms < n) {
@@ -26687,10 +26687,10 @@ var require_route = __commonJS((exports, module) => {
26687
26687
 
26688
26688
  // node_modules/utils-merge/index.js
26689
26689
  var require_utils_merge = __commonJS((exports, module) => {
26690
- exports = module.exports = function(a, b2) {
26691
- if (a && b2) {
26692
- for (var key in b2) {
26693
- a[key] = b2[key];
26690
+ exports = module.exports = function(a, b) {
26691
+ if (a && b) {
26692
+ for (var key in b) {
26693
+ a[key] = b[key];
26694
26694
  }
26695
26695
  }
26696
26696
  return a;
@@ -27454,8 +27454,8 @@ var require_content_disposition = __commonJS((exports, module) => {
27454
27454
  var require_ms4 = __commonJS((exports, module) => {
27455
27455
  var s = 1000;
27456
27456
  var m = s * 60;
27457
- var h2 = m * 60;
27458
- var d = h2 * 24;
27457
+ var h = m * 60;
27458
+ var d = h * 24;
27459
27459
  var y = d * 365.25;
27460
27460
  module.exports = function(val, options) {
27461
27461
  options = options || {};
@@ -27494,7 +27494,7 @@ var require_ms4 = __commonJS((exports, module) => {
27494
27494
  case "hrs":
27495
27495
  case "hr":
27496
27496
  case "h":
27497
- return n * h2;
27497
+ return n * h;
27498
27498
  case "minutes":
27499
27499
  case "minute":
27500
27500
  case "mins":
@@ -27521,8 +27521,8 @@ var require_ms4 = __commonJS((exports, module) => {
27521
27521
  if (ms >= d) {
27522
27522
  return Math.round(ms / d) + "d";
27523
27523
  }
27524
- if (ms >= h2) {
27525
- return Math.round(ms / h2) + "h";
27524
+ if (ms >= h) {
27525
+ return Math.round(ms / h) + "h";
27526
27526
  }
27527
27527
  if (ms >= m) {
27528
27528
  return Math.round(ms / m) + "m";
@@ -27533,7 +27533,7 @@ var require_ms4 = __commonJS((exports, module) => {
27533
27533
  return ms + "ms";
27534
27534
  }
27535
27535
  function fmtLong(ms) {
27536
- return plural(ms, d, "day") || plural(ms, h2, "hour") || plural(ms, m, "minute") || plural(ms, s, "second") || ms + " ms";
27536
+ return plural(ms, d, "day") || plural(ms, h, "hour") || plural(ms, m, "minute") || plural(ms, s, "second") || ms + " ms";
27537
27537
  }
27538
27538
  function plural(ms, n, name) {
27539
27539
  if (ms < n) {
@@ -28063,9 +28063,9 @@ var require_mime = __commonJS((exports, module) => {
28063
28063
  var require_ms5 = __commonJS((exports, module) => {
28064
28064
  var s = 1000;
28065
28065
  var m = s * 60;
28066
- var h2 = m * 60;
28067
- var d = h2 * 24;
28068
- var w = d * 7;
28066
+ var h = m * 60;
28067
+ var d = h * 24;
28068
+ var w2 = d * 7;
28069
28069
  var y = d * 365.25;
28070
28070
  module.exports = function(val, options) {
28071
28071
  options = options || {};
@@ -28098,7 +28098,7 @@ var require_ms5 = __commonJS((exports, module) => {
28098
28098
  case "weeks":
28099
28099
  case "week":
28100
28100
  case "w":
28101
- return n * w;
28101
+ return n * w2;
28102
28102
  case "days":
28103
28103
  case "day":
28104
28104
  case "d":
@@ -28108,7 +28108,7 @@ var require_ms5 = __commonJS((exports, module) => {
28108
28108
  case "hrs":
28109
28109
  case "hr":
28110
28110
  case "h":
28111
- return n * h2;
28111
+ return n * h;
28112
28112
  case "minutes":
28113
28113
  case "minute":
28114
28114
  case "mins":
@@ -28136,8 +28136,8 @@ var require_ms5 = __commonJS((exports, module) => {
28136
28136
  if (msAbs >= d) {
28137
28137
  return Math.round(ms / d) + "d";
28138
28138
  }
28139
- if (msAbs >= h2) {
28140
- return Math.round(ms / h2) + "h";
28139
+ if (msAbs >= h) {
28140
+ return Math.round(ms / h) + "h";
28141
28141
  }
28142
28142
  if (msAbs >= m) {
28143
28143
  return Math.round(ms / m) + "m";
@@ -28152,8 +28152,8 @@ var require_ms5 = __commonJS((exports, module) => {
28152
28152
  if (msAbs >= d) {
28153
28153
  return plural(ms, msAbs, d, "day");
28154
28154
  }
28155
- if (msAbs >= h2) {
28156
- return plural(ms, msAbs, h2, "hour");
28155
+ if (msAbs >= h) {
28156
+ return plural(ms, msAbs, h, "hour");
28157
28157
  }
28158
28158
  if (msAbs >= m) {
28159
28159
  return plural(ms, msAbs, m, "minute");
@@ -28245,11 +28245,11 @@ var require_range_parser = __commonJS((exports, module) => {
28245
28245
  end: range.end
28246
28246
  };
28247
28247
  }
28248
- function sortByRangeIndex(a, b2) {
28249
- return a.index - b2.index;
28248
+ function sortByRangeIndex(a, b) {
28249
+ return a.index - b.index;
28250
28250
  }
28251
- function sortByRangeStart(a, b2) {
28252
- return a.start - b2.start;
28251
+ function sortByRangeStart(a, b) {
28252
+ return a.start - b.start;
28253
28253
  }
28254
28254
  });
28255
28255
 
@@ -30141,8 +30141,8 @@ var require_charset = __commonJS((exports, module) => {
30141
30141
  return provided[priorities.indexOf(priority)];
30142
30142
  });
30143
30143
  }
30144
- function compareSpecs(a, b2) {
30145
- return b2.q - a.q || b2.s - a.s || a.o - b2.o || a.i - b2.i || 0;
30144
+ function compareSpecs(a, b) {
30145
+ return b.q - a.q || b.s - a.s || a.o - b.o || a.i - b.i || 0;
30146
30146
  }
30147
30147
  function getFullCharset(spec) {
30148
30148
  return spec.charset;
@@ -30237,8 +30237,8 @@ var require_encoding = __commonJS((exports, module) => {
30237
30237
  return provided[priorities.indexOf(priority)];
30238
30238
  });
30239
30239
  }
30240
- function compareSpecs(a, b2) {
30241
- return b2.q - a.q || b2.s - a.s || a.o - b2.o || a.i - b2.i || 0;
30240
+ function compareSpecs(a, b) {
30241
+ return b.q - a.q || b.s - a.s || a.o - b.o || a.i - b.i || 0;
30242
30242
  }
30243
30243
  function getFullEncoding(spec) {
30244
30244
  return spec.encoding;
@@ -30333,8 +30333,8 @@ var require_language = __commonJS((exports, module) => {
30333
30333
  return provided[priorities.indexOf(priority)];
30334
30334
  });
30335
30335
  }
30336
- function compareSpecs(a, b2) {
30337
- return b2.q - a.q || b2.s - a.s || a.o - b2.o || a.i - b2.i || 0;
30336
+ function compareSpecs(a, b) {
30337
+ return b.q - a.q || b.s - a.s || a.o - b.o || a.i - b.i || 0;
30338
30338
  }
30339
30339
  function getFullLanguage(spec) {
30340
30340
  return spec.full;
@@ -30445,8 +30445,8 @@ var require_mediaType = __commonJS((exports, module) => {
30445
30445
  return provided[priorities.indexOf(priority)];
30446
30446
  });
30447
30447
  }
30448
- function compareSpecs(a, b2) {
30449
- return b2.q - a.q || b2.s - a.s || a.o - b2.o || a.i - b2.i || 0;
30448
+ function compareSpecs(a, b) {
30449
+ return b.q - a.q || b.s - a.s || a.o - b.o || a.i - b.i || 0;
30450
30450
  }
30451
30451
  function getFullType(spec) {
30452
30452
  return spec.type + "/" + spec.subtype;
@@ -32030,7 +32030,7 @@ class Protocol {
32030
32030
  }
32031
32031
  request(request, resultSchema, options) {
32032
32032
  return new Promise((resolve, reject) => {
32033
- var _a, _b, _c, _d, _e;
32033
+ var _a, _b, _c, _d, _e2;
32034
32034
  if (!this._transport) {
32035
32035
  reject(new Error("Not connected"));
32036
32036
  return;
@@ -32088,7 +32088,7 @@ class Protocol {
32088
32088
  });
32089
32089
  const timeout = (_d = options === null || options === undefined ? undefined : options.timeout) !== null && _d !== undefined ? _d : DEFAULT_REQUEST_TIMEOUT_MSEC;
32090
32090
  const timeoutHandler = () => cancel(new McpError(ErrorCode.RequestTimeout, "Request timed out", { timeout }));
32091
- this._setupTimeout(messageId, timeout, options === null || options === undefined ? undefined : options.maxTotalTimeout, timeoutHandler, (_e = options === null || options === undefined ? undefined : options.resetTimeoutOnProgress) !== null && _e !== undefined ? _e : false);
32091
+ this._setupTimeout(messageId, timeout, options === null || options === undefined ? undefined : options.maxTotalTimeout, timeoutHandler, (_e2 = options === null || options === undefined ? undefined : options.resetTimeoutOnProgress) !== null && _e2 !== undefined ? _e2 : false);
32092
32092
  this._transport.send(jsonrpcRequest).catch((error) => {
32093
32093
  this._cleanupTimeout(messageId);
32094
32094
  reject(error);
@@ -32584,7 +32584,7 @@ function parseIntersectionDef(def, refs) {
32584
32584
  ...refs,
32585
32585
  currentPath: [...refs.currentPath, "allOf", "1"]
32586
32586
  })
32587
- ].filter((x2) => !!x2);
32587
+ ].filter((x) => !!x);
32588
32588
  let unevaluatedProperties = refs.target === "jsonSchema2019-09" ? { unevaluatedProperties: false } : undefined;
32589
32589
  const mergedAllOf = [];
32590
32590
  allOf.forEach((schema) => {
@@ -32782,7 +32782,7 @@ function escapeNonAlphaNumeric(source) {
32782
32782
  return result;
32783
32783
  }
32784
32784
  function addFormat(schema, value, message, refs) {
32785
- if (schema.format || schema.anyOf?.some((x2) => x2.format)) {
32785
+ if (schema.format || schema.anyOf?.some((x) => x.format)) {
32786
32786
  if (!schema.anyOf) {
32787
32787
  schema.anyOf = [];
32788
32788
  }
@@ -32810,7 +32810,7 @@ function addFormat(schema, value, message, refs) {
32810
32810
  }
32811
32811
  }
32812
32812
  function addPattern(schema, regex, message, refs) {
32813
- if (schema.pattern || schema.allOf?.some((x2) => x2.pattern)) {
32813
+ if (schema.pattern || schema.allOf?.some((x) => x.pattern)) {
32814
32814
  if (!schema.allOf) {
32815
32815
  schema.allOf = [];
32816
32816
  }
@@ -33068,17 +33068,17 @@ function parseUnionDef(def, refs) {
33068
33068
  if (refs.target === "openApi3")
33069
33069
  return asAnyOf(def, refs);
33070
33070
  const options = def.options instanceof Map ? Array.from(def.options.values()) : def.options;
33071
- if (options.every((x2) => (x2._def.typeName in primitiveMappings) && (!x2._def.checks || !x2._def.checks.length))) {
33072
- const types2 = options.reduce((types3, x2) => {
33073
- const type = primitiveMappings[x2._def.typeName];
33071
+ if (options.every((x) => (x._def.typeName in primitiveMappings) && (!x._def.checks || !x._def.checks.length))) {
33072
+ const types2 = options.reduce((types3, x) => {
33073
+ const type = primitiveMappings[x._def.typeName];
33074
33074
  return type && !types3.includes(type) ? [...types3, type] : types3;
33075
33075
  }, []);
33076
33076
  return {
33077
33077
  type: types2.length > 1 ? types2 : types2[0]
33078
33078
  };
33079
- } else if (options.every((x2) => x2._def.typeName === "ZodLiteral" && !x2.description)) {
33080
- const types2 = options.reduce((acc, x2) => {
33081
- const type = typeof x2._def.value;
33079
+ } else if (options.every((x) => x._def.typeName === "ZodLiteral" && !x.description)) {
33080
+ const types2 = options.reduce((acc, x) => {
33081
+ const type = typeof x._def.value;
33082
33082
  switch (type) {
33083
33083
  case "string":
33084
33084
  case "number":
@@ -33087,7 +33087,7 @@ function parseUnionDef(def, refs) {
33087
33087
  case "bigint":
33088
33088
  return [...acc, "integer"];
33089
33089
  case "object":
33090
- if (x2._def.value === null)
33090
+ if (x._def.value === null)
33091
33091
  return [...acc, "null"];
33092
33092
  case "symbol":
33093
33093
  case "undefined":
@@ -33097,30 +33097,30 @@ function parseUnionDef(def, refs) {
33097
33097
  }
33098
33098
  }, []);
33099
33099
  if (types2.length === options.length) {
33100
- const uniqueTypes = types2.filter((x2, i, a) => a.indexOf(x2) === i);
33100
+ const uniqueTypes = types2.filter((x, i, a) => a.indexOf(x) === i);
33101
33101
  return {
33102
33102
  type: uniqueTypes.length > 1 ? uniqueTypes : uniqueTypes[0],
33103
- enum: options.reduce((acc, x2) => {
33104
- return acc.includes(x2._def.value) ? acc : [...acc, x2._def.value];
33103
+ enum: options.reduce((acc, x) => {
33104
+ return acc.includes(x._def.value) ? acc : [...acc, x._def.value];
33105
33105
  }, [])
33106
33106
  };
33107
33107
  }
33108
- } else if (options.every((x2) => x2._def.typeName === "ZodEnum")) {
33108
+ } else if (options.every((x) => x._def.typeName === "ZodEnum")) {
33109
33109
  return {
33110
33110
  type: "string",
33111
- enum: options.reduce((acc, x2) => [
33111
+ enum: options.reduce((acc, x) => [
33112
33112
  ...acc,
33113
- ...x2._def.values.filter((x3) => !acc.includes(x3))
33113
+ ...x._def.values.filter((x2) => !acc.includes(x2))
33114
33114
  ], [])
33115
33115
  };
33116
33116
  }
33117
33117
  return asAnyOf(def, refs);
33118
33118
  }
33119
33119
  var primitiveMappings, asAnyOf = (def, refs) => {
33120
- const anyOf = (def.options instanceof Map ? Array.from(def.options.values()) : def.options).map((x2, i) => parseDef(x2._def, {
33120
+ const anyOf = (def.options instanceof Map ? Array.from(def.options.values()) : def.options).map((x, i) => parseDef(x._def, {
33121
33121
  ...refs,
33122
33122
  currentPath: [...refs.currentPath, "anyOf", `${i}`]
33123
- })).filter((x2) => !!x2 && (!refs.strictUnions || typeof x2 === "object" && Object.keys(x2).length > 0));
33123
+ })).filter((x) => !!x && (!refs.strictUnions || typeof x === "object" && Object.keys(x).length > 0));
33124
33124
  return anyOf.length ? { anyOf } : undefined;
33125
33125
  };
33126
33126
  var init_union = __esm(() => {
@@ -33327,12 +33327,12 @@ var parsePipelineDef = (def, refs) => {
33327
33327
  ...refs,
33328
33328
  currentPath: [...refs.currentPath, "allOf", "0"]
33329
33329
  });
33330
- const b2 = parseDef(def.out._def, {
33330
+ const b = parseDef(def.out._def, {
33331
33331
  ...refs,
33332
33332
  currentPath: [...refs.currentPath, "allOf", a ? "1" : "0"]
33333
33333
  });
33334
33334
  return {
33335
- allOf: [a, b2].filter((x2) => x2 !== undefined)
33335
+ allOf: [a, b].filter((x) => x !== undefined)
33336
33336
  };
33337
33337
  };
33338
33338
  var init_pipeline = __esm(() => {
@@ -33376,10 +33376,10 @@ function parseTupleDef(def, refs) {
33376
33376
  return {
33377
33377
  type: "array",
33378
33378
  minItems: def.items.length,
33379
- items: def.items.map((x2, i) => parseDef(x2._def, {
33379
+ items: def.items.map((x, i) => parseDef(x._def, {
33380
33380
  ...refs,
33381
33381
  currentPath: [...refs.currentPath, "items", `${i}`]
33382
- })).reduce((acc, x2) => x2 === undefined ? acc : [...acc, x2], []),
33382
+ })).reduce((acc, x) => x === undefined ? acc : [...acc, x], []),
33383
33383
  additionalItems: parseDef(def.rest._def, {
33384
33384
  ...refs,
33385
33385
  currentPath: [...refs.currentPath, "additionalItems"]
@@ -33390,10 +33390,10 @@ function parseTupleDef(def, refs) {
33390
33390
  type: "array",
33391
33391
  minItems: def.items.length,
33392
33392
  maxItems: def.items.length,
33393
- items: def.items.map((x2, i) => parseDef(x2._def, {
33393
+ items: def.items.map((x, i) => parseDef(x._def, {
33394
33394
  ...refs,
33395
33395
  currentPath: [...refs.currentPath, "items", `${i}`]
33396
- })).reduce((acc, x2) => x2 === undefined ? acc : [...acc, x2], [])
33396
+ })).reduce((acc, x) => x === undefined ? acc : [...acc, x], [])
33397
33397
  };
33398
33398
  }
33399
33399
  }
@@ -34264,9 +34264,9 @@ var init_config = __esm(() => {
34264
34264
  SDK_METADATA = {
34265
34265
  language: "typescript",
34266
34266
  openapiDocVersion: "0.0.1",
34267
- sdkVersion: "0.5.36",
34268
- genVersion: "2.640.2",
34269
- userAgent: "speakeasy-sdk/typescript 0.5.36 2.640.2 0.0.1 @compass-labs/api-sdk"
34267
+ sdkVersion: "0.5.38",
34268
+ genVersion: "2.647.2",
34269
+ userAgent: "speakeasy-sdk/typescript 0.5.38 2.647.2 0.0.1 @compass-labs/api-sdk"
34270
34270
  };
34271
34271
  });
34272
34272
 
@@ -34678,7 +34678,7 @@ function isRetryableResponse(res, statusCodes) {
34678
34678
  async function retryBackoff(fn, strategy) {
34679
34679
  const { maxElapsedTime, initialInterval, exponent, maxInterval } = strategy;
34680
34680
  const start = Date.now();
34681
- let x2 = 0;
34681
+ let x = 0;
34682
34682
  while (true) {
34683
34683
  try {
34684
34684
  const res = await fn();
@@ -34699,11 +34699,11 @@ async function retryBackoff(fn, strategy) {
34699
34699
  retryInterval = retryIntervalFromResponse(err.response);
34700
34700
  }
34701
34701
  if (retryInterval <= 0) {
34702
- retryInterval = initialInterval * Math.pow(x2, exponent) + Math.random() * 1000;
34702
+ retryInterval = initialInterval * Math.pow(x, exponent) + Math.random() * 1000;
34703
34703
  }
34704
34704
  const d = Math.min(retryInterval, maxInterval);
34705
34705
  await delay(d);
34706
- x2++;
34706
+ x++;
34707
34707
  }
34708
34708
  }
34709
34709
  }
@@ -35222,8 +35222,14 @@ var init_apierror = __esm(() => {
35222
35222
  }
35223
35223
  const body = httpMeta.body || `""`;
35224
35224
  message += body.length > 100 ? `
35225
- ` : " ";
35226
- message += `Body ${body}`;
35225
+ ` : ". ";
35226
+ let bodyDisplay = body;
35227
+ if (body.length > 1e4) {
35228
+ const truncated = body.substring(0, 1e4);
35229
+ const remaining = body.length - 1e4;
35230
+ bodyDisplay = `${truncated}...and ${remaining} more chars`;
35231
+ }
35232
+ message += `Body: ${bodyDisplay}`;
35227
35233
  message = message.trim();
35228
35234
  super(message, httpMeta);
35229
35235
  this.name = "APIError";
@@ -37728,6 +37734,7 @@ var init_apy = __esm(() => {
37728
37734
  init_esm();
37729
37735
  init_primitives();
37730
37736
  Apy$inboundSchema = objectType({
37737
+ current: stringType(),
37731
37738
  apy_1_day: stringType(),
37732
37739
  apy_7_day: stringType(),
37733
37740
  apy_30_day: stringType()
@@ -37739,6 +37746,7 @@ var init_apy = __esm(() => {
37739
37746
  });
37740
37747
  });
37741
37748
  Apy$outboundSchema = objectType({
37749
+ current: stringType(),
37742
37750
  apy1Day: stringType(),
37743
37751
  apy7Day: stringType(),
37744
37752
  apy30Day: stringType()
@@ -44199,8 +44207,9 @@ var init_morphovault2 = __esm(() => {
44199
44207
  init_esm();
44200
44208
  init_primitives();
44201
44209
  MorphoVaultChain = {
44210
+ BaseMainnet: "base:mainnet",
44202
44211
  EthereumMainnet: "ethereum:mainnet",
44203
- BaseMainnet: "base:mainnet"
44212
+ ArbitrumMainnet: "arbitrum:mainnet"
44204
44213
  };
44205
44214
  MorphoVaultChain$inboundSchema = nativeEnumType(MorphoVaultChain);
44206
44215
  MorphoVaultChain$outboundSchema = MorphoVaultChain$inboundSchema;
@@ -44209,19 +44218,25 @@ var init_morphovault2 = __esm(() => {
44209
44218
  MorphoVaultChain$.outboundSchema = MorphoVaultChain$outboundSchema;
44210
44219
  })(MorphoVaultChain$ ||= {});
44211
44220
  MorphoVaultRequest$inboundSchema = objectType({
44212
- chain: MorphoVaultChain$inboundSchema.default("base:mainnet"),
44213
- vault_address: stringType().default("0xc1256Ae5FF1cf2719D4937adb3bbCCab2E00A2Ca")
44221
+ chain: MorphoVaultChain$inboundSchema.default("ethereum:mainnet"),
44222
+ block: nullableType(numberType().int()).optional(),
44223
+ vault_address: stringType().default("0x182863131F9a4630fF9E27830d945B1413e347E8"),
44224
+ user_address: nullableType(stringType()).optional()
44214
44225
  }).transform((v2) => {
44215
44226
  return remap(v2, {
44216
- vault_address: "vaultAddress"
44227
+ vault_address: "vaultAddress",
44228
+ user_address: "userAddress"
44217
44229
  });
44218
44230
  });
44219
44231
  MorphoVaultRequest$outboundSchema = objectType({
44220
- chain: MorphoVaultChain$outboundSchema.default("base:mainnet"),
44221
- vaultAddress: stringType().default("0xc1256Ae5FF1cf2719D4937adb3bbCCab2E00A2Ca")
44232
+ chain: MorphoVaultChain$outboundSchema.default("ethereum:mainnet"),
44233
+ block: nullableType(numberType().int()).optional(),
44234
+ vaultAddress: stringType().default("0x182863131F9a4630fF9E27830d945B1413e347E8"),
44235
+ userAddress: nullableType(stringType()).optional()
44222
44236
  }).transform((v2) => {
44223
44237
  return remap(v2, {
44224
- vaultAddress: "vault_address"
44238
+ vaultAddress: "vault_address",
44239
+ userAddress: "user_address"
44225
44240
  });
44226
44241
  });
44227
44242
  ((MorphoVaultRequest$) => {
@@ -44672,10 +44687,12 @@ var init_tokenprice = __esm(() => {
44672
44687
  })(TokenPriceToken$ ||= {});
44673
44688
  TokenPriceRequest$inboundSchema = objectType({
44674
44689
  chain: TokenPriceChain$inboundSchema.default("ethereum:mainnet"),
44690
+ block: nullableType(numberType().int()).optional(),
44675
44691
  token: TokenPriceToken$inboundSchema.default("AAVE")
44676
44692
  });
44677
44693
  TokenPriceRequest$outboundSchema = objectType({
44678
44694
  chain: TokenPriceChain$outboundSchema.default("ethereum:mainnet"),
44695
+ block: nullableType(numberType().int()).optional(),
44679
44696
  token: TokenPriceToken$outboundSchema.default("AAVE")
44680
44697
  });
44681
44698
  ((TokenPriceRequest$) => {
@@ -48858,7 +48875,9 @@ async function $do32(client, request, options) {
48858
48875
  const body = null;
48859
48876
  const path = pathToFunc("/v0/morpho/vault")();
48860
48877
  const query = encodeFormQuery({
48878
+ block: payload.block,
48861
48879
  chain: payload.chain,
48880
+ user_address: payload.user_address,
48862
48881
  vault_address: payload.vault_address
48863
48882
  });
48864
48883
  const headers = new Headers(compactMap({
@@ -51432,6 +51451,7 @@ async function $do56(client, request, options) {
51432
51451
  const body = null;
51433
51452
  const path = pathToFunc("/v0/token/price/get")();
51434
51453
  const query = encodeFormQuery({
51454
+ block: payload.block,
51435
51455
  chain: payload.chain,
51436
51456
  token: payload.token
51437
51457
  });
@@ -53966,7 +53986,7 @@ it to be traded on DeFi protocols.`,
53966
53986
  function createMCPServer(deps) {
53967
53987
  const server = new McpServer({
53968
53988
  name: "CompassApiSDK",
53969
- version: "0.5.36"
53989
+ version: "0.5.38"
53970
53990
  });
53971
53991
  const client = new CompassApiSDKCore({
53972
53992
  apiKeyAuth: deps.apiKeyAuth,
@@ -54171,7 +54191,6 @@ async function startStdio(flags) {
54171
54191
  const server = createMCPServer({
54172
54192
  logger,
54173
54193
  allowedTools: flags.tool,
54174
- scopes: flags.scope,
54175
54194
  ...{ apiKeyAuth: flags["api-key-auth"] ?? "" },
54176
54195
  serverURL: flags["server-url"],
54177
54196
  serverIdx: flags["server-index"]
@@ -54190,7 +54209,6 @@ async function startSSE(flags) {
54190
54209
  const mcpServer = createMCPServer({
54191
54210
  logger,
54192
54211
  allowedTools: flags.tool,
54193
- scopes: flags.scope,
54194
54212
  ...{ apiKeyAuth: flags["api-key-auth"] ?? "" },
54195
54213
  serverURL: flags["server-url"],
54196
54214
  serverIdx: flags["server-index"]
@@ -54253,17 +54271,17 @@ function K(e, t) {
54253
54271
  let n = e.env?.[t];
54254
54272
  return typeof n == "string" && n !== "0";
54255
54273
  }
54256
- var b = { UnknownCommand: -5, InvalidArgument: -4, ContextLoadError: -3, CommandLoadError: -2, InternalError: -1, Success: 0, CommandRunError: 1 };
54274
+ var N = { UnknownCommand: -5, InvalidArgument: -4, ContextLoadError: -3, CommandLoadError: -2, InternalError: -1, Success: 0, CommandRunError: 1 };
54257
54275
  function I(e) {
54258
54276
  return e.replace(/-./g, (t) => t[1].toUpperCase());
54259
54277
  }
54260
- function A(e) {
54278
+ function F(e) {
54261
54279
  return Array.from(e).map((t, n) => {
54262
54280
  let a = t.toUpperCase(), r = t.toLowerCase();
54263
54281
  return n === 0 || a !== t || a === r ? t : `-${r}`;
54264
54282
  }).join("");
54265
54283
  }
54266
- function ve(e) {
54284
+ function we(e) {
54267
54285
  let t = new Map;
54268
54286
  return { get: (...n) => t.get(n.join(",")) ?? e, set: (n, ...a) => {
54269
54287
  t.set(a.join(","), n);
@@ -54276,7 +54294,7 @@ function Xe(e, t, n) {
54276
54294
  let i = Math.abs(e.length - t.length);
54277
54295
  if (typeof a == "number" && i > a)
54278
54296
  return 1 / 0;
54279
- let o = ve(1 / 0);
54297
+ let o = we(1 / 0);
54280
54298
  o.set(0, -1, -1);
54281
54299
  for (let s = 0;s < t.length; ++s)
54282
54300
  o.set((s + 1) * r.insertion, -1, s);
@@ -54301,23 +54319,23 @@ function Xe(e, t, n) {
54301
54319
  let m = o.get(e.length - 1, t.length - 1);
54302
54320
  return m > a ? 1 / 0 : m;
54303
54321
  }
54304
- function we(e, t, n) {
54322
+ function $e(e, t, n) {
54305
54323
  let a = e[1] - t[1];
54306
54324
  if (a !== 0)
54307
54325
  return a;
54308
54326
  let r = e[0].startsWith(n), i = t[0].startsWith(n);
54309
54327
  return r && !i ? -1 : !r && i ? 1 : e[0].localeCompare(t[0]);
54310
54328
  }
54311
- function D(e, t, n) {
54329
+ function M(e, t, n) {
54312
54330
  let a = t.map((i) => [i, Xe(e, i, n)]).filter(([, i]) => i <= n.threshold), r = Math.min(...a.map(([, i]) => i));
54313
- return a.filter(([, i]) => i === r).sort((i, o) => we(i, o, e)).map(([i]) => i);
54331
+ return a.filter(([, i]) => i === r).sort((i, o) => $e(i, o, e)).map(([i]) => i);
54314
54332
  }
54315
- var x = class extends Error {
54333
+ var C = class extends Error {
54316
54334
  };
54317
54335
  function q(e) {
54318
54336
  return e instanceof Error ? e.stack ?? String(e) : String(e);
54319
54337
  }
54320
- function $e(e, t) {
54338
+ function Le(e, t) {
54321
54339
  let n = [], a = Math.max(e.length, t.length);
54322
54340
  for (let r = 0;r < a; ++r)
54323
54341
  n[r] = Math.max(e[r], t[r]);
@@ -54328,7 +54346,7 @@ function $(e, t) {
54328
54346
  return [];
54329
54347
  let n = Array(Math.max(...e.map((r) => r.length))).fill(0, 0), a = e.reduce((r, i) => {
54330
54348
  let o = i.map((d) => d.length);
54331
- return $e(r, o);
54349
+ return Le(r, o);
54332
54350
  }, n);
54333
54351
  return e.map((r) => {
54334
54352
  let i = (r[0] ?? "").padEnd(a[0]);
@@ -54346,24 +54364,24 @@ function V(e, t) {
54346
54364
  let n = e.slice(0, e.length - 1).join(", ");
54347
54365
  return t.serialComma && (n += ","), [n, t.conjunction, e[e.length - 1]].join(" ");
54348
54366
  }
54349
- function Le(e, t) {
54367
+ function ke(e, t) {
54350
54368
  return e.reduce((n, a) => {
54351
54369
  let r = t(a), i = n[r] ?? [];
54352
54370
  return i.push(a), n[r] = i, n;
54353
54371
  }, {});
54354
54372
  }
54355
54373
  function me(e, t) {
54356
- return Le(e, (n) => n[t]);
54374
+ return ke(e, (n) => n[t]);
54357
54375
  }
54358
54376
  async function z(e) {
54359
54377
  let t = await Promise.allSettled(e), n = me(t, "status");
54360
54378
  return n.rejected && n.rejected.length > 0 ? { status: "rejected", reasons: n.rejected.map((a) => a.reason) } : { status: "fulfilled", value: n.fulfilled?.map((a) => a.value) ?? [] };
54361
54379
  }
54362
- var Ie = new Set(["true", "t", "yes", "y", "on", "1"]);
54380
+ var Me = new Set(["true", "t", "yes", "y", "on", "1"]);
54363
54381
  var De = new Set(["false", "f", "no", "n", "off", "0"]);
54364
54382
  var re = (e) => {
54365
54383
  let t = e.toLowerCase();
54366
- if (Ie.has(t))
54384
+ if (Me.has(t))
54367
54385
  return true;
54368
54386
  if (De.has(t))
54369
54387
  return false;
@@ -54375,24 +54393,24 @@ var oe = (e) => {
54375
54393
  throw new SyntaxError(`Cannot convert ${e} to a number`);
54376
54394
  return t;
54377
54395
  };
54378
- var h = class extends x {
54396
+ var A = class extends C {
54379
54397
  _brand;
54380
54398
  };
54381
54399
  function se(e, t) {
54382
54400
  let n = e.constructor.name, a = t[n];
54383
54401
  return a ? a(e) : e.message;
54384
54402
  }
54385
- function Me(e, t, n) {
54403
+ function Ge(e, t, n) {
54386
54404
  return Object.fromEntries(Object.entries(t).map(([a, r]) => {
54387
54405
  let i = r, o = e[i];
54388
54406
  if (!o) {
54389
- let d = v(i, n);
54407
+ let d = B(i, n);
54390
54408
  throw new L(d, [], a);
54391
54409
  }
54392
54410
  return [a, [i, o]];
54393
54411
  }));
54394
54412
  }
54395
- var L = class extends h {
54413
+ var L = class extends A {
54396
54414
  input;
54397
54415
  corrections;
54398
54416
  aliasName;
@@ -54407,7 +54425,7 @@ var L = class extends h {
54407
54425
  super(r), this.input = t, this.corrections = n, this.aliasName = a;
54408
54426
  }
54409
54427
  };
54410
- var G = class extends h {
54428
+ var G = class extends A {
54411
54429
  input;
54412
54430
  constructor(t) {
54413
54431
  super(`No alias registered for -${t}`), this.input = t;
@@ -54416,10 +54434,10 @@ var G = class extends h {
54416
54434
  function ae(e, t) {
54417
54435
  return e.placeholder ? e.placeholder : typeof t == "number" ? `arg${t}` : "args";
54418
54436
  }
54419
- function v(e, t) {
54420
- return t === "allow-kebab-for-camel" ? A(e) : e;
54437
+ function B(e, t) {
54438
+ return t === "allow-kebab-for-camel" ? F(e) : e;
54421
54439
  }
54422
- var j = class extends h {
54440
+ var j = class extends A {
54423
54441
  externalFlagNameOrPlaceholder;
54424
54442
  input;
54425
54443
  exception;
@@ -54427,14 +54445,14 @@ var j = class extends h {
54427
54445
  super(`Failed to parse "${n}" for ${t}: ${a instanceof Error ? a.message : String(a)}`), this.externalFlagNameOrPlaceholder = t, this.input = n, this.exception = a;
54428
54446
  }
54429
54447
  };
54430
- function M(e, t, n, a) {
54448
+ function D(e, t, n, a) {
54431
54449
  try {
54432
54450
  return t.parse.call(a, n);
54433
54451
  } catch (r) {
54434
54452
  throw new j(e, n, r);
54435
54453
  }
54436
54454
  }
54437
- var W = class extends h {
54455
+ var W = class extends A {
54438
54456
  externalFlagName;
54439
54457
  input;
54440
54458
  values;
@@ -54447,7 +54465,7 @@ var W = class extends h {
54447
54465
  super(i), this.externalFlagName = t, this.input = n, this.values = a;
54448
54466
  }
54449
54467
  };
54450
- var X = class extends h {
54468
+ var w = class extends A {
54451
54469
  externalFlagName;
54452
54470
  nextFlagName;
54453
54471
  constructor(t, n) {
@@ -54455,14 +54473,14 @@ var X = class extends h {
54455
54473
  n && (a += ` but encountered --${n} instead`), super(a), this.externalFlagName = t, this.nextFlagName = n;
54456
54474
  }
54457
54475
  };
54458
- var H = class extends h {
54476
+ var H = class extends A {
54459
54477
  expectedCount;
54460
54478
  input;
54461
54479
  constructor(t, n) {
54462
54480
  super(`Too many arguments, expected ${t} but encountered "${n}"`), this.expectedCount = t, this.input = n;
54463
54481
  }
54464
54482
  };
54465
- var _ = class extends h {
54483
+ var _ = class extends A {
54466
54484
  placeholder;
54467
54485
  limit;
54468
54486
  constructor(t, n) {
@@ -54496,10 +54514,10 @@ function pe(e, t, n) {
54496
54514
  if (!r) {
54497
54515
  if (i in t)
54498
54516
  throw new L(e, [i]);
54499
- let o = A(e);
54517
+ let o = F(e);
54500
54518
  if (o in t)
54501
54519
  throw new L(e, [o]);
54502
- let d = D(a, Object.keys(t), n.distanceOptions);
54520
+ let d = M(a, Object.keys(t), n.distanceOptions);
54503
54521
  throw new L(e, d);
54504
54522
  }
54505
54523
  return { namedFlag: [a, r] };
@@ -54508,8 +54526,8 @@ function ue(e) {
54508
54526
  return e.namedFlag[1].kind === "boolean" || e.namedFlag[1].kind === "counter";
54509
54527
  }
54510
54528
  var ce = /^-([a-z]+)$/i;
54511
- var Ge = /^--([a-z][a-z-]+)$/i;
54512
- function je(e, t, n, a) {
54529
+ var je = /^--([a-z][a-z-.\d_]+)$/i;
54530
+ function Ue(e, t, n, a) {
54513
54531
  let r = ce.exec(e);
54514
54532
  if (r) {
54515
54533
  let o = r[1];
@@ -54520,31 +54538,31 @@ function je(e, t, n, a) {
54520
54538
  return { namedFlag: s };
54521
54539
  });
54522
54540
  }
54523
- let i = Ge.exec(e);
54541
+ let i = je.exec(e);
54524
54542
  if (i) {
54525
54543
  let o = i[1];
54526
54544
  return [pe(o, t, a)];
54527
54545
  }
54528
54546
  return [];
54529
54547
  }
54530
- var Ue = /^--([a-z][a-z-.\d_]+)=(.+)$/i;
54531
- var qe = /^-([a-z])=(.+)$/i;
54532
- var J = class extends h {
54548
+ var qe = /^--([a-z][a-z-.\d_]+)=(.+)$/i;
54549
+ var Ve = /^-([a-z])=(.+)$/i;
54550
+ var J = class extends A {
54533
54551
  externalFlagName;
54534
54552
  valueText;
54535
54553
  constructor(t, n) {
54536
54554
  super(`Cannot negate flag --${t} and pass "${n}" as value`), this.externalFlagName = t, this.valueText = n;
54537
54555
  }
54538
54556
  };
54539
- function Ve(e, t, n, a) {
54540
- let r = Ue.exec(e);
54557
+ function We(e, t, n, a) {
54558
+ let r = qe.exec(e);
54541
54559
  if (r) {
54542
54560
  let o = r[1], { namedFlag: d, negated: m } = pe(o, t, a), s = r[2];
54543
54561
  if (m)
54544
54562
  throw new J(o, s);
54545
54563
  return [d, s];
54546
54564
  }
54547
- let i = qe.exec(e);
54565
+ let i = Ve.exec(e);
54548
54566
  if (i) {
54549
54567
  let o = i[1], d = n[o];
54550
54568
  if (!d)
@@ -54553,17 +54571,17 @@ function Ve(e, t, n, a) {
54553
54571
  return [d, m];
54554
54572
  }
54555
54573
  }
54556
- async function We(e, t, n, a, r) {
54574
+ async function He(e, t, n, a, r) {
54557
54575
  if (!n) {
54558
54576
  if ("default" in t && typeof t.default < "u")
54559
- return t.kind === "boolean" || t.kind === "enum" ? t.default : M(e, t, t.default, r);
54577
+ return t.kind === "boolean" || t.kind === "enum" ? t.default : D(e, t, t.default, r);
54560
54578
  if (t.optional)
54561
54579
  return;
54562
54580
  if (t.kind === "boolean")
54563
54581
  return false;
54564
54582
  if (t.kind === "counter")
54565
54583
  return 0;
54566
- throw new X(e);
54584
+ throw new w(e);
54567
54585
  }
54568
54586
  if (t.kind === "counter")
54569
54587
  return n.reduce((o, d) => {
@@ -54577,12 +54595,12 @@ async function We(e, t, n, a, r) {
54577
54595
  if (t.kind === "enum") {
54578
54596
  for (let o of n)
54579
54597
  if (!t.values.includes(o)) {
54580
- let d = D(o, t.values, a.distanceOptions);
54598
+ let d = M(o, t.values, a.distanceOptions);
54581
54599
  throw new W(e, o, t.values, d);
54582
54600
  }
54583
54601
  return n;
54584
54602
  }
54585
- return Promise.all(n.map((o) => M(e, t, o, r)));
54603
+ return Promise.all(n.map((o) => D(e, t, o, r)));
54586
54604
  }
54587
54605
  let i = n[0];
54588
54606
  if (t.kind === "boolean")
@@ -54593,14 +54611,14 @@ async function We(e, t, n, a, r) {
54593
54611
  }
54594
54612
  if (t.kind === "enum") {
54595
54613
  if (!t.values.includes(i)) {
54596
- let o = D(i, t.values, a.distanceOptions);
54614
+ let o = M(i, t.values, a.distanceOptions);
54597
54615
  throw new W(e, i, t.values, o);
54598
54616
  }
54599
54617
  return i;
54600
54618
  }
54601
- return M(e, t, i, r);
54619
+ return D(e, t, i, r);
54602
54620
  }
54603
- var Y = class extends h {
54621
+ var Y = class extends A {
54604
54622
  externalFlagName;
54605
54623
  previousInput;
54606
54624
  input;
@@ -54611,13 +54629,17 @@ var Y = class extends h {
54611
54629
  function fe(e) {
54612
54630
  return e.kind === "counter" ? true : ("variadic" in e) ? !!e.variadic : false;
54613
54631
  }
54614
- function B(e, t, n, a) {
54615
- let r = e.get(n[0]) ?? [];
54616
- if (r.length > 0 && !fe(n[1])) {
54617
- let i = v(n[0], t);
54618
- throw new Y(i, r[0], a);
54632
+ function v(e, t, [n, a], r) {
54633
+ let i = e.get(n) ?? [];
54634
+ if (i.length > 0 && !fe(a)) {
54635
+ let o = B(n, t);
54636
+ throw new Y(o, i[0], r);
54619
54637
  }
54620
- e.set(n[0], [...r, a]);
54638
+ if ("variadic" in a && typeof a.variadic == "string") {
54639
+ let o = r.split(a.variadic);
54640
+ e.set(n, [...i, ...o]);
54641
+ } else
54642
+ e.set(n, [...i, r]);
54621
54643
  }
54622
54644
  function ie(e, t, n) {
54623
54645
  if (t.get(n)) {
@@ -54627,54 +54649,54 @@ function ie(e, t, n) {
54627
54649
  return false;
54628
54650
  }
54629
54651
  function Q(e, t) {
54630
- let { flags: n = {}, aliases: a = {}, positional: r = { kind: "tuple", parameters: [] } } = e, i = Me(n, a, t.caseStyle), o = [], d = new Map, m = 0, s, u = false;
54652
+ let { flags: n = {}, aliases: a = {}, positional: r = { kind: "tuple", parameters: [] } } = e, i = Ge(n, a, t.caseStyle), o = [], d = new Map, m = 0, s, u = false;
54631
54653
  return { next: (l) => {
54632
54654
  if (!u && t.allowArgumentEscapeSequence && l === "--") {
54633
54655
  if (s)
54634
54656
  if (s[1].kind === "parsed" && s[1].inferEmpty)
54635
- B(d, t.caseStyle, s, ""), s = undefined;
54657
+ v(d, t.caseStyle, s, ""), s = undefined;
54636
54658
  else {
54637
- let p = v(s[0], t.caseStyle);
54638
- throw new X(p);
54659
+ let p = B(s[0], t.caseStyle);
54660
+ throw new w(p);
54639
54661
  }
54640
54662
  u = true;
54641
54663
  return;
54642
54664
  }
54643
54665
  if (!u) {
54644
- let p = Ve(l, n, i, t);
54666
+ let p = We(l, n, i, t);
54645
54667
  if (p) {
54646
54668
  if (s)
54647
54669
  if (s[1].kind === "parsed" && s[1].inferEmpty)
54648
- B(d, t.caseStyle, s, ""), s = undefined;
54670
+ v(d, t.caseStyle, s, ""), s = undefined;
54649
54671
  else {
54650
- let f = v(s[0], t.caseStyle), T = v(p[0][0], t.caseStyle);
54651
- throw new X(f, T);
54672
+ let f = B(s[0], t.caseStyle), T = B(p[0][0], t.caseStyle);
54673
+ throw new w(f, T);
54652
54674
  }
54653
- B(d, t.caseStyle, ...p);
54675
+ v(d, t.caseStyle, ...p);
54654
54676
  return;
54655
54677
  }
54656
- let c = je(l, n, i, t);
54678
+ let c = Ue(l, n, i, t);
54657
54679
  if (c.length > 0) {
54658
54680
  if (s)
54659
54681
  if (s[1].kind === "parsed" && s[1].inferEmpty)
54660
- B(d, t.caseStyle, s, ""), s = undefined;
54682
+ v(d, t.caseStyle, s, ""), s = undefined;
54661
54683
  else {
54662
- let f = v(s[0], t.caseStyle), T = v(c[0].namedFlag[0], t.caseStyle);
54663
- throw new X(f, T);
54684
+ let f = B(s[0], t.caseStyle), T = B(c[0].namedFlag[0], t.caseStyle);
54685
+ throw new w(f, T);
54664
54686
  }
54665
54687
  if (c.every(ue))
54666
54688
  for (let f of c)
54667
- f.namedFlag[1].kind === "boolean" ? B(d, t.caseStyle, f.namedFlag, f.negated ? "false" : "true") : B(d, t.caseStyle, f.namedFlag, "1");
54689
+ f.namedFlag[1].kind === "boolean" ? v(d, t.caseStyle, f.namedFlag, f.negated ? "false" : "true") : v(d, t.caseStyle, f.namedFlag, "1");
54668
54690
  else if (c.length > 1) {
54669
- let f = c.find((E) => !ue(E)), T = v(f.namedFlag[0], t.caseStyle);
54670
- throw new X(T);
54691
+ let f = c.find((E) => !ue(E)), T = B(f.namedFlag[0], t.caseStyle);
54692
+ throw new w(T);
54671
54693
  } else
54672
54694
  s = c[0].namedFlag;
54673
54695
  return;
54674
54696
  }
54675
54697
  }
54676
54698
  if (s)
54677
- B(d, t.caseStyle, s, l), s = undefined;
54699
+ v(d, t.caseStyle, s, l), s = undefined;
54678
54700
  else {
54679
54701
  if (r.kind === "tuple") {
54680
54702
  if (m >= r.parameters.length)
@@ -54685,26 +54707,26 @@ function Q(e, t) {
54685
54707
  }
54686
54708
  }, parseArguments: async (l) => {
54687
54709
  let p = [], c;
54688
- r.kind === "array" ? (typeof r.minimum == "number" && m < r.minimum && p.push(new _(ae(r.parameter), [r.minimum, m])), c = z(o.map(async (g, C) => {
54689
- let y = ae(r.parameter, C + 1);
54690
- return M(y, r.parameter, g, l);
54691
- }))) : c = z(r.parameters.map(async (g, C) => {
54692
- let y = ae(g, C + 1), N = o[C];
54693
- if (typeof N != "string") {
54710
+ r.kind === "array" ? (typeof r.minimum == "number" && m < r.minimum && p.push(new _(ae(r.parameter), [r.minimum, m])), c = z(o.map(async (g, x) => {
54711
+ let y = ae(r.parameter, x + 1);
54712
+ return D(y, r.parameter, g, l);
54713
+ }))) : c = z(r.parameters.map(async (g, x) => {
54714
+ let y = ae(g, x + 1), h = o[x];
54715
+ if (typeof h != "string") {
54694
54716
  if (typeof g.default == "string")
54695
- return M(y, g, g.default, l);
54717
+ return D(y, g, g.default, l);
54696
54718
  if (g.optional)
54697
54719
  return;
54698
54720
  throw new _(y);
54699
54721
  }
54700
- return M(y, g, N, l);
54701
- })), s && s[1].kind === "parsed" && s[1].inferEmpty && (B(d, t.caseStyle, s, ""), s = undefined);
54722
+ return D(y, g, h, l);
54723
+ })), s && s[1].kind === "parsed" && s[1].inferEmpty && (v(d, t.caseStyle, s, ""), s = undefined);
54702
54724
  let f = z(Object.entries(n).map(async (g) => {
54703
- let [C, y] = g, N = v(C, t.caseStyle);
54704
- if (s && s[0] === C)
54705
- throw new X(N);
54706
- let P = d.get(C), w = await We(N, y, P, t, l);
54707
- return [C, w];
54725
+ let [x, y] = g, h = B(x, t.caseStyle);
54726
+ if (s && s[0] === x)
54727
+ throw new w(h);
54728
+ let b = d.get(x), X = await He(h, y, b, t, l);
54729
+ return [x, X];
54708
54730
  })), [T, E] = await Promise.all([c, f]);
54709
54731
  if (T.status === "rejected")
54710
54732
  for (let g of T.reasons)
@@ -54715,96 +54737,100 @@ function Q(e, t) {
54715
54737
  if (p.length > 0)
54716
54738
  return { success: false, errors: p };
54717
54739
  if (T.status === "rejected")
54718
- throw new x("Unknown failure while scanning positional arguments");
54740
+ throw new C("Unknown failure while scanning positional arguments");
54719
54741
  if (E.status === "rejected")
54720
- throw new x("Unknown failure while scanning flag arguments");
54742
+ throw new C("Unknown failure while scanning flag arguments");
54721
54743
  return { success: true, arguments: [Object.fromEntries(E.value), ...T.value] };
54722
54744
  }, proposeCompletions: async ({ partial: l, completionConfig: p, text: c, context: f, includeVersionFlag: T }) => {
54723
- if (s) {
54724
- let F = s[1], g;
54725
- return F.kind === "enum" ? g = F.values : F.proposeCompletions ? g = await F.proposeCompletions.call(f, l) : g = [], g.map((C) => ({ kind: "argument:value", completion: C, brief: F.brief })).filter(({ completion: C }) => C.startsWith(l));
54726
- }
54745
+ if (s)
54746
+ return ge(s[1], f, l);
54727
54747
  let E = [];
54728
54748
  if (!u) {
54729
- let F = ce.exec(l);
54749
+ let S = ce.exec(l);
54730
54750
  if (p.includeAliases) {
54731
54751
  if (l === "" || l === "-") {
54732
- let g = Object.entries(a).filter((C) => !ie(n, d, C[1]));
54733
- for (let [C] of g) {
54734
- let y = i[C];
54735
- y && E.push({ kind: "argument:flag", completion: `-${C}`, brief: y[1].brief });
54752
+ let g = Object.entries(a).filter((x) => !ie(n, d, x[1]));
54753
+ for (let [x] of g) {
54754
+ let y = i[x];
54755
+ y && E.push({ kind: "argument:flag", completion: `-${x}`, brief: y[1].brief });
54736
54756
  }
54737
- } else if (F) {
54738
- let g = Array.from(F[1]);
54757
+ } else if (S) {
54758
+ let g = Array.from(S[1]);
54739
54759
  if (g.includes("h"))
54740
54760
  return [];
54741
54761
  if (T && g.includes("v"))
54742
54762
  return [];
54743
- let C = new Map(d);
54744
- for (let P of g) {
54745
- let w = i[P];
54746
- if (!w)
54747
- throw new G(P);
54748
- B(C, t.caseStyle, w, w[1].kind === "boolean" ? "true" : "1");
54763
+ let x = new Map(d);
54764
+ for (let b of g) {
54765
+ let X = i[b];
54766
+ if (!X)
54767
+ throw new G(b);
54768
+ v(x, t.caseStyle, X, X[1].kind === "boolean" ? "true" : "1");
54749
54769
  }
54750
54770
  let y = g[g.length - 1];
54751
54771
  if (y) {
54752
- let P = i[y];
54753
- P && E.push({ kind: "argument:flag", completion: l, brief: P[1].brief });
54772
+ let b = i[y];
54773
+ b && E.push({ kind: "argument:flag", completion: l, brief: b[1].brief });
54754
54774
  }
54755
- let N = Object.entries(a).filter((P) => !ie(n, C, P[1]));
54756
- for (let [P] of N) {
54757
- let w = i[P];
54758
- w && E.push({ kind: "argument:flag", completion: `${l}${P}`, brief: w[1].brief });
54775
+ let h = Object.entries(a).filter((b) => !ie(n, x, b[1]));
54776
+ for (let [b] of h) {
54777
+ let X = i[b];
54778
+ X && E.push({ kind: "argument:flag", completion: `${l}${b}`, brief: X[1].brief });
54759
54779
  }
54760
54780
  }
54761
54781
  }
54762
54782
  if (l === "" || l === "-" || l.startsWith("--")) {
54763
54783
  t.allowArgumentEscapeSequence && E.push({ kind: "argument:flag", completion: "--", brief: c.briefs.argumentEscapeSequence });
54764
54784
  let g = Object.entries(n).filter(([y]) => !ie(n, d, y));
54765
- t.caseStyle === "allow-kebab-for-camel" && (g = g.map(([y, N]) => [A(y), N]));
54766
- let C = g.map(([y, N]) => [`--${y}`, N]).filter(([y]) => y.startsWith(l));
54767
- E.push(...C.map(([y, N]) => ({ kind: "argument:flag", completion: y, brief: N.brief })));
54785
+ t.caseStyle === "allow-kebab-for-camel" && (g = g.map(([y, h]) => [F(y), h]));
54786
+ let x = g.map(([y, h]) => [`--${y}`, h]).filter(([y]) => y.startsWith(l));
54787
+ E.push(...x.map(([y, h]) => ({ kind: "argument:flag", completion: y, brief: h.brief })));
54768
54788
  }
54769
54789
  }
54770
54790
  if (r.kind === "array") {
54771
54791
  if (r.parameter.proposeCompletions && (typeof r.maximum != "number" || m < r.maximum)) {
54772
- let F = await r.parameter.proposeCompletions.call(f, l);
54773
- E.push(...F.map((g) => ({ kind: "argument:value", completion: g, brief: r.parameter.brief })));
54792
+ let S = await r.parameter.proposeCompletions.call(f, l);
54793
+ E.push(...S.map((g) => ({ kind: "argument:value", completion: g, brief: r.parameter.brief })));
54774
54794
  }
54775
54795
  } else {
54776
- let F = r.parameters[m];
54777
- if (F?.proposeCompletions) {
54778
- let g = await F.proposeCompletions.call(f, l);
54779
- E.push(...g.map((C) => ({ kind: "argument:value", completion: C, brief: F.brief })));
54796
+ let S = r.parameters[m];
54797
+ if (S?.proposeCompletions) {
54798
+ let g = await S.proposeCompletions.call(f, l);
54799
+ E.push(...g.map((x) => ({ kind: "argument:value", completion: x, brief: S.brief })));
54780
54800
  }
54781
54801
  }
54782
- return E.filter(({ completion: F }) => F.startsWith(l));
54802
+ return E.filter(({ completion: S }) => S.startsWith(l));
54783
54803
  } };
54784
54804
  }
54785
- function ge(e, t, n) {
54805
+ async function ge(e, t, n) {
54806
+ if (typeof e.variadic == "string" && n.endsWith(e.variadic))
54807
+ return ge(e, t, "");
54808
+ let a;
54809
+ return e.kind === "enum" ? a = e.values : e.proposeCompletions ? a = await e.proposeCompletions.call(t, n) : a = [], a.map((r) => ({ kind: "argument:value", completion: r, brief: e.brief })).filter(({ completion: r }) => r.startsWith(n));
54810
+ }
54811
+ function Ce(e, t, n) {
54786
54812
  let a = t === "allow-kebab-for-camel" ? "convert-camel-to-kebab" : t, r = e.getAllEntries();
54787
54813
  return n.includeHiddenRoutes || (r = r.filter((i) => !i.hidden)), r.flatMap((i) => {
54788
54814
  let o = i.name[a];
54789
54815
  return n.includeAliases ? [o, ...i.aliases] : [o];
54790
54816
  });
54791
54817
  }
54792
- var Ce = { headers: { usage: "USAGE", aliases: "ALIASES", commands: "COMMANDS", flags: "FLAGS", arguments: "ARGUMENTS" }, keywords: { default: "default =" }, briefs: { help: "Print help information and exit", helpAll: "Print help information (including hidden commands/flags) and exit", version: "Print version information and exit", argumentEscapeSequence: "All subsequent inputs should be interpreted as arguments" }, noCommandRegisteredForInput: ({ input: e, corrections: t }) => {
54818
+ var ye = { headers: { usage: "USAGE", aliases: "ALIASES", commands: "COMMANDS", flags: "FLAGS", arguments: "ARGUMENTS" }, keywords: { default: "default =", separator: "separator =" }, briefs: { help: "Print help information and exit", helpAll: "Print help information (including hidden commands/flags) and exit", version: "Print version information and exit", argumentEscapeSequence: "All subsequent inputs should be interpreted as arguments" }, noCommandRegisteredForInput: ({ input: e, corrections: t }) => {
54793
54819
  let n = `No command registered for \`${e}\``;
54794
54820
  if (t.length > 0) {
54795
54821
  let a = V(t, { kind: "conjunctive", conjunction: "or", serialComma: true });
54796
54822
  return `${n}, did you mean ${a}?`;
54797
54823
  } else
54798
54824
  return n;
54799
- }, noTextAvailableForLocale: ({ requestedLocale: e, defaultLocale: t }) => `Application does not support "${e}" locale, defaulting to "${t}"`, exceptionWhileParsingArguments: (e) => e instanceof h ? se(e, {}) : `Unable to parse arguments, ${q(e)}`, exceptionWhileLoadingCommandFunction: (e) => `Unable to load command function, ${q(e)}`, exceptionWhileLoadingCommandContext: (e) => `Unable to load command context, ${q(e)}`, exceptionWhileRunningCommand: (e) => `Command failed, ${q(e)}`, commandErrorResult: (e) => e.message, currentVersionIsNotLatest: ({ currentVersion: e, latestVersion: t, upgradeCommand: n }) => n ? `Latest available version is ${t} (currently running ${e}), upgrade with "${n}"` : `Latest available version is ${t} (currently running ${e})` };
54800
- function ye(e) {
54825
+ }, noTextAvailableForLocale: ({ requestedLocale: e, defaultLocale: t }) => `Application does not support "${e}" locale, defaulting to "${t}"`, exceptionWhileParsingArguments: (e) => e instanceof A ? se(e, {}) : `Unable to parse arguments, ${q(e)}`, exceptionWhileLoadingCommandFunction: (e) => `Unable to load command function, ${q(e)}`, exceptionWhileLoadingCommandContext: (e) => `Unable to load command context, ${q(e)}`, exceptionWhileRunningCommand: (e) => `Command failed, ${q(e)}`, commandErrorResult: (e) => e.message, currentVersionIsNotLatest: ({ currentVersion: e, latestVersion: t, upgradeCommand: n }) => n ? `Latest available version is ${t} (currently running ${e}), upgrade with "${n}"` : `Latest available version is ${t} (currently running ${e})` };
54826
+ function xe(e) {
54801
54827
  if (e.startsWith("en"))
54802
- return Ce;
54828
+ return ye;
54803
54829
  }
54804
- function S(e, t, n) {
54830
+ function P(e, t, n) {
54805
54831
  return !n.disableAnsiColor && !K(e, "STRICLI_NO_COLOR") && (t.getColorDepth?.(e.env) ?? 1) >= 4;
54806
54832
  }
54807
- async function xe({ loader: e, parameters: t }, { context: n, inputs: a, scannerConfig: r, errorFormatting: i, documentationConfig: o, determineExitCode: d }) {
54833
+ async function Te({ loader: e, parameters: t }, { context: n, inputs: a, scannerConfig: r, errorFormatting: i, documentationConfig: o, determineExitCode: d }) {
54808
54834
  let m = e(), s;
54809
54835
  try {
54810
54836
  let l = Q(t, r);
@@ -54814,46 +54840,46 @@ async function xe({ loader: e, parameters: t }, { context: n, inputs: a, scanner
54814
54840
  if (p.success)
54815
54841
  s = p.arguments;
54816
54842
  else {
54817
- let c = S(n.process, n.process.stderr, o);
54843
+ let c = P(n.process, n.process.stderr, o);
54818
54844
  for (let f of p.errors) {
54819
54845
  let T = i.exceptionWhileParsingArguments(f, c);
54820
54846
  n.process.stderr.write(c ? `\x1B[1m\x1B[31m${T}\x1B[39m\x1B[22m
54821
54847
  ` : `${T}
54822
54848
  `);
54823
54849
  }
54824
- return b.InvalidArgument;
54850
+ return N.InvalidArgument;
54825
54851
  }
54826
54852
  } catch (l) {
54827
- let p = S(n.process, n.process.stderr, o), c = i.exceptionWhileParsingArguments(l, p);
54853
+ let p = P(n.process, n.process.stderr, o), c = i.exceptionWhileParsingArguments(l, p);
54828
54854
  return n.process.stderr.write(p ? `\x1B[1m\x1B[31m${c}\x1B[39m\x1B[22m
54829
54855
  ` : `${c}
54830
- `), b.InvalidArgument;
54856
+ `), N.InvalidArgument;
54831
54857
  }
54832
54858
  let u;
54833
54859
  try {
54834
54860
  let l = await m;
54835
54861
  typeof l == "function" ? u = l : u = l.default;
54836
54862
  } catch (l) {
54837
- let p = S(n.process, n.process.stderr, o), c = i.exceptionWhileLoadingCommandFunction(l, p);
54863
+ let p = P(n.process, n.process.stderr, o), c = i.exceptionWhileLoadingCommandFunction(l, p);
54838
54864
  return n.process.stderr.write(p ? `\x1B[1m\x1B[31m${c}\x1B[39m\x1B[22m
54839
54865
  ` : `${c}
54840
- `), b.CommandLoadError;
54866
+ `), N.CommandLoadError;
54841
54867
  }
54842
54868
  try {
54843
54869
  let l = await u.call(n, ...s);
54844
54870
  if (l instanceof Error) {
54845
- let p = S(n.process, n.process.stderr, o), c = i.commandErrorResult(l, p);
54871
+ let p = P(n.process, n.process.stderr, o), c = i.commandErrorResult(l, p);
54846
54872
  return n.process.stderr.write(p ? `\x1B[1m\x1B[31m${c}\x1B[39m\x1B[22m
54847
54873
  ` : `${c}
54848
- `), d ? d(l) : b.CommandRunError;
54874
+ `), d ? d(l) : N.CommandRunError;
54849
54875
  }
54850
54876
  } catch (l) {
54851
- let p = S(n.process, n.process.stderr, o), c = i.exceptionWhileRunningCommand(l, p);
54877
+ let p = P(n.process, n.process.stderr, o), c = i.exceptionWhileRunningCommand(l, p);
54852
54878
  return n.process.stderr.write(p ? `\x1B[1m\x1B[31m${c}\x1B[39m\x1B[22m
54853
54879
  ` : `${c}
54854
- `), d ? d(l) : b.CommandRunError;
54880
+ `), d ? d(l) : N.CommandRunError;
54855
54881
  }
54856
- return b.Success;
54882
+ return N.Success;
54857
54883
  }
54858
54884
  var R = Symbol("RouteMap");
54859
54885
  var O = Symbol("Command");
@@ -54894,14 +54920,14 @@ function Z(e, t, n) {
54894
54920
  return { target: d, unprocessedInputs: r, helpRequested: s, prefix: a, rootLevel: m, aliases: u };
54895
54921
  } };
54896
54922
  }
54897
- async function Te({ root: e, defaultText: t, config: n }, a, r) {
54923
+ async function Fe({ root: e, defaultText: t, config: n }, a, r) {
54898
54924
  let i = t;
54899
54925
  if (r.locale) {
54900
54926
  let l = n.localization.loadText(r.locale);
54901
54927
  if (l)
54902
54928
  i = l;
54903
54929
  else {
54904
- let p = S(r.process, r.process.stderr, n.documentation), c = i.noTextAvailableForLocale({ requestedLocale: r.locale, defaultLocale: n.localization.defaultLocale, ansiColor: p });
54930
+ let p = P(r.process, r.process.stderr, n.documentation), c = i.noTextAvailableForLocale({ requestedLocale: r.locale, defaultLocale: n.localization.defaultLocale, ansiColor: p });
54905
54931
  r.process.stderr.write(p ? `\x1B[1m\x1B[33m${c}\x1B[39m\x1B[22m
54906
54932
  ` : `${c}
54907
54933
  `);
@@ -54912,7 +54938,7 @@ async function Te({ root: e, defaultText: t, config: n }, a, r) {
54912
54938
  "currentVersion" in n.versionInfo ? l = n.versionInfo.currentVersion : l = await n.versionInfo.getCurrentVersion.call(r);
54913
54939
  let p = await n.versionInfo.getLatestVersion.call(r, l);
54914
54940
  if (p && l !== p) {
54915
- let c = S(r.process, r.process.stderr, n.documentation), f = i.currentVersionIsNotLatest({ currentVersion: l, latestVersion: p, upgradeCommand: n.versionInfo.upgradeCommand, ansiColor: c });
54941
+ let c = P(r.process, r.process.stderr, n.documentation), f = i.currentVersionIsNotLatest({ currentVersion: l, latestVersion: p, upgradeCommand: n.versionInfo.upgradeCommand, ansiColor: c });
54916
54942
  r.process.stderr.write(c ? `\x1B[1m\x1B[33m${f}\x1B[39m\x1B[22m
54917
54943
  ` : `${f}
54918
54944
  `);
@@ -54922,7 +54948,7 @@ async function Te({ root: e, defaultText: t, config: n }, a, r) {
54922
54948
  if (n.versionInfo && (o[0] === "--version" || o[0] === "-v")) {
54923
54949
  let l;
54924
54950
  return "currentVersion" in n.versionInfo ? l = n.versionInfo.currentVersion : l = await n.versionInfo.getCurrentVersion.call(r), r.process.stdout.write(l + `
54925
- `), b.Success;
54951
+ `), N.Success;
54926
54952
  }
54927
54953
  let d = Z(e, n.scanner, [n.name]), m;
54928
54954
  for (;o.length > 0 && !m; ) {
@@ -54930,56 +54956,56 @@ async function Te({ root: e, defaultText: t, config: n }, a, r) {
54930
54956
  m = d.next(l);
54931
54957
  }
54932
54958
  if (m) {
54933
- let l = ge(m.routeMap, n.scanner.caseStyle, n.completion), p = D(m.input, l, n.scanner.distanceOptions).map((T) => `\`${T}\``), c = S(r.process, r.process.stderr, n.documentation), f = i.noCommandRegisteredForInput({ input: m.input, corrections: p, ansiColor: c });
54959
+ let l = Ce(m.routeMap, n.scanner.caseStyle, n.completion), p = M(m.input, l, n.scanner.distanceOptions).map((T) => `\`${T}\``), c = P(r.process, r.process.stderr, n.documentation), f = i.noCommandRegisteredForInput({ input: m.input, corrections: p, ansiColor: c });
54934
54960
  return r.process.stderr.write(c ? `\x1B[1m\x1B[31m${f}\x1B[39m\x1B[22m
54935
54961
  ` : `${f}
54936
- `), b.UnknownCommand;
54962
+ `), N.UnknownCommand;
54937
54963
  }
54938
54964
  let s = d.finish();
54939
54965
  if (s.helpRequested || s.target.kind === R) {
54940
- let l = S(r.process, r.process.stdout, n.documentation);
54941
- return r.process.stdout.write(s.target.formatHelp({ prefix: s.prefix, includeVersionFlag: !!n.versionInfo && s.rootLevel, includeArgumentEscapeSequenceFlag: n.scanner.allowArgumentEscapeSequence, includeHelpAllFlag: s.helpRequested === "all" || n.documentation.alwaysShowHelpAllFlag, includeHidden: s.helpRequested === "all", config: n.documentation, aliases: s.aliases[n.documentation.caseStyle], text: i, ansiColor: l })), b.Success;
54966
+ let l = P(r.process, r.process.stdout, n.documentation);
54967
+ return r.process.stdout.write(s.target.formatHelp({ prefix: s.prefix, includeVersionFlag: !!n.versionInfo && s.rootLevel, includeArgumentEscapeSequenceFlag: n.scanner.allowArgumentEscapeSequence, includeHelpAllFlag: s.helpRequested === "all" || n.documentation.alwaysShowHelpAllFlag, includeHidden: s.helpRequested === "all", config: n.documentation, aliases: s.aliases[n.documentation.caseStyle], text: i, ansiColor: l })), N.Success;
54942
54968
  }
54943
54969
  let u;
54944
54970
  if ("forCommand" in r)
54945
54971
  try {
54946
54972
  u = await r.forCommand({ prefix: s.prefix });
54947
54973
  } catch (l) {
54948
- let p = S(r.process, r.process.stderr, n.documentation), c = i.exceptionWhileLoadingCommandContext(l, p);
54949
- return r.process.stderr.write(p ? `\x1B[1m\x1B[31m${c}\x1B[39m\x1B[22m` : c), b.ContextLoadError;
54974
+ let p = P(r.process, r.process.stderr, n.documentation), c = i.exceptionWhileLoadingCommandContext(l, p);
54975
+ return r.process.stderr.write(p ? `\x1B[1m\x1B[31m${c}\x1B[39m\x1B[22m` : c), N.ContextLoadError;
54950
54976
  }
54951
54977
  else
54952
54978
  u = r;
54953
- return xe(s.target, { context: u, inputs: s.unprocessedInputs, scannerConfig: n.scanner, documentationConfig: n.documentation, errorFormatting: i, determineExitCode: n.determineExitCode });
54979
+ return Te(s.target, { context: u, inputs: s.unprocessedInputs, scannerConfig: n.scanner, documentationConfig: n.documentation, errorFormatting: i, determineExitCode: n.determineExitCode });
54954
54980
  }
54955
54981
  function U(e, t) {
54956
- return t === "convert-camel-to-kebab" ? A(e) : e;
54982
+ return t === "convert-camel-to-kebab" ? F(e) : e;
54957
54983
  }
54958
- function Fe(e, t) {
54959
- return t === "convert-camel-to-kebab" ? `no-${A(e)}` : `no${e[0].toUpperCase()}${e.slice(1)}`;
54984
+ function Ee(e, t) {
54985
+ return t === "convert-camel-to-kebab" ? `no-${F(e)}` : `no${e[0].toUpperCase()}${e.slice(1)}`;
54960
54986
  }
54961
54987
  function Ae(e) {
54962
54988
  let t = e.scanner?.caseStyle ?? "original", n;
54963
54989
  if (e.documentation?.caseStyle) {
54964
54990
  if (t === "original" && e.documentation.caseStyle === "convert-camel-to-kebab")
54965
- throw new x("Cannot convert route and flag names on display but scan as original");
54991
+ throw new C("Cannot convert route and flag names on display but scan as original");
54966
54992
  n = e.documentation.caseStyle;
54967
54993
  } else
54968
54994
  t === "allow-kebab-for-camel" ? n = "convert-camel-to-kebab" : n = t;
54969
54995
  let a = { caseStyle: t, allowArgumentEscapeSequence: e.scanner?.allowArgumentEscapeSequence ?? false, distanceOptions: e.scanner?.distanceOptions ?? { threshold: 7, weights: { insertion: 1, deletion: 3, substitution: 2, transposition: 0 } } }, r = { alwaysShowHelpAllFlag: e.documentation?.alwaysShowHelpAllFlag ?? false, useAliasInUsageLine: e.documentation?.useAliasInUsageLine ?? false, onlyRequiredInUsageLine: e.documentation?.onlyRequiredInUsageLine ?? false, caseStyle: n, disableAnsiColor: e.documentation?.disableAnsiColor ?? false }, i = { includeAliases: e.completion?.includeAliases ?? r.useAliasInUsageLine, includeHiddenRoutes: e.completion?.includeHiddenRoutes ?? false, ...e.completion };
54970
- return { ...e, scanner: a, completion: i, documentation: r, localization: { defaultLocale: "en", loadText: ye, ...e.localization } };
54996
+ return { ...e, scanner: a, completion: i, documentation: r, localization: { defaultLocale: "en", loadText: xe, ...e.localization } };
54971
54997
  }
54972
- function He(e, t) {
54998
+ function _e(e, t) {
54973
54999
  let n = Ae(t);
54974
55000
  if (e.kind === O && n.versionInfo) {
54975
55001
  if (e.usesFlag("version"))
54976
- throw new x("Unable to use command with flag --version as root when version info is supplied");
55002
+ throw new C("Unable to use command with flag --version as root when version info is supplied");
54977
55003
  if (e.usesFlag("v"))
54978
- throw new x("Unable to use command with alias -v as root when version info is supplied");
55004
+ throw new C("Unable to use command with alias -v as root when version info is supplied");
54979
55005
  }
54980
55006
  let a = n.localization.loadText(n.localization.defaultLocale);
54981
55007
  if (!a)
54982
- throw new x(`No text available for the default locale "${n.localization.defaultLocale}"`);
55008
+ throw new C(`No text available for the default locale "${n.localization.defaultLocale}"`);
54983
55009
  return { root: e, config: n, defaultText: a };
54984
55010
  }
54985
55011
  function le(e) {
@@ -54988,27 +55014,27 @@ function le(e) {
54988
55014
  function k(e) {
54989
55015
  return e.optional ?? le(e);
54990
55016
  }
54991
- function be(e) {
55017
+ function Pe(e) {
54992
55018
  return `(${e})`;
54993
55019
  }
54994
- function Pe(e) {
55020
+ function Se(e) {
54995
55021
  return `[${e}]`;
54996
55022
  }
54997
- function Se(e) {
55023
+ function Re(e) {
54998
55024
  return `${e}...`;
54999
55025
  }
55000
- function Ye(e) {
55026
+ function Qe(e) {
55001
55027
  return `<${e}>`;
55002
55028
  }
55003
- function Qe(e) {
55029
+ function Ze(e) {
55004
55030
  return `[<${e}>]`;
55005
55031
  }
55006
- function Ze(e) {
55032
+ function en(e) {
55007
55033
  return `<${e}>...`;
55008
55034
  }
55009
55035
  function ee(e, t) {
55010
55036
  let n = Object.entries(e.flags ?? {}).filter(([, i]) => !(i.hidden || t.config.onlyRequiredInUsageLine && k(i))).map(([i, o]) => {
55011
- let d = t.config.caseStyle === "convert-camel-to-kebab" ? `--${A(i)}` : `--${i}`;
55037
+ let d = t.config.caseStyle === "convert-camel-to-kebab" ? `--${F(i)}` : `--${i}`;
55012
55038
  if (e.aliases && t.config.useAliasInUsageLine) {
55013
55039
  let s = Object.entries(e.aliases).filter((u) => u[1] === i);
55014
55040
  s.length === 1 && s[0] && (d = `-${s[0][0]}`);
@@ -55019,15 +55045,15 @@ function ee(e, t) {
55019
55045
  return [o, `${d} ${o.values.join("|")}`];
55020
55046
  let m = o.placeholder ?? "value";
55021
55047
  return [o, `${d} ${m}`];
55022
- }).map(([i, o]) => i.kind === "parsed" && i.variadic ? k(i) ? Se(Pe(o)) : Se(be(o)) : k(i) ? Pe(o) : be(o)), a = [], r = e.positional;
55048
+ }).map(([i, o]) => i.kind === "parsed" && i.variadic ? k(i) ? Re(Se(o)) : Re(Pe(o)) : k(i) ? Se(o) : Pe(o)), a = [], r = e.positional;
55023
55049
  if (r)
55024
55050
  if (r.kind === "array")
55025
- a = [Ze(r.parameter.placeholder ?? "args")];
55051
+ a = [en(r.parameter.placeholder ?? "args")];
55026
55052
  else {
55027
55053
  let i = r.parameters;
55028
55054
  t.config.onlyRequiredInUsageLine && (i = i.filter((o) => !o.optional && typeof o.default > "u")), a = i.map((o, d) => {
55029
55055
  let m = o.placeholder ?? `arg${d + 1}`;
55030
- return o.optional || typeof o.default < "u" ? Qe(m) : Ye(m);
55056
+ return o.optional || typeof o.default < "u" ? Ze(m) : Qe(m);
55031
55057
  });
55032
55058
  }
55033
55059
  return [...t.prefix, ...n, ...a].join(" ");
@@ -55036,7 +55062,7 @@ function ne(e, t, n) {
55036
55062
  let { keywords: a, briefs: r } = n.text, i = Object.entries(e).filter(([, m]) => !(m.hidden && !n.includeHidden)), o = i.some(([, m]) => k(m)), d = i.map(([m, s]) => {
55037
55063
  let u = Object.entries(t).filter((f) => f[1] === m).map(([f]) => `-${f}`), l = "--" + U(m, n.config.caseStyle);
55038
55064
  if (s.kind === "boolean" && s.default !== false) {
55039
- let f = Fe(m, n.config.caseStyle);
55065
+ let f = Ee(m, n.config.caseStyle);
55040
55066
  l = `${l}/--${f}`;
55041
55067
  }
55042
55068
  k(s) ? l = `[${l}]` : o && (l = ` ${l}`), s.kind === "parsed" && s.variadic && (l = `${l}...`);
@@ -55049,6 +55075,10 @@ function ne(e, t, n) {
55049
55075
  let f = n.ansiColor ? `\x1B[90m${a.default}\x1B[39m` : a.default;
55050
55076
  p.push(`${f} ${s.default === "" ? '""' : String(s.default)}`);
55051
55077
  }
55078
+ if ("variadic" in s && typeof s.variadic == "string") {
55079
+ let f = n.ansiColor ? `\x1B[90m${a.separator}\x1B[39m` : a.separator;
55080
+ p.push(`${f} ${s.variadic}`);
55081
+ }
55052
55082
  let c = p.length > 0 ? `[${p.join(", ")}]` : undefined;
55053
55083
  return { aliases: u.join(" "), flagName: l, brief: s.brief, suffix: c, hidden: s.hidden };
55054
55084
  });
@@ -55065,7 +55095,7 @@ function* te(e) {
55065
55095
  }
55066
55096
  e.includeVersionFlag && (yield e.config.useAliasInUsageLine ? "-v" : "--version");
55067
55097
  }
55068
- function Re(e, t) {
55098
+ function Oe(e, t) {
55069
55099
  if (e.kind === "array") {
55070
55100
  let r = e.parameter.placeholder ?? "args", i = t.ansiColor ? `\x1B[97m${r}...\x1B[39m` : `${r}...`, o = t.ansiColor ? `\x1B[3m${e.parameter.brief}\x1B[23m` : e.parameter.brief;
55071
55101
  return $([[i, o]], [" "]);
@@ -55076,7 +55106,7 @@ function Re(e, t) {
55076
55106
  return r.optional ? o = `[${o}]` : a && (o = ` ${o}`), r.default && (d = `[${t.ansiColor ? `\x1B[90m${n.default}\x1B[39m` : n.default} ${r.default}]`), [t.ansiColor ? `\x1B[97m${o}\x1B[39m` : o, t.ansiColor ? `\x1B[3m${r.brief}\x1B[23m` : r.brief, d ?? ""];
55077
55107
  }), [" ", " "]);
55078
55108
  }
55079
- function* Oe(e, t, n) {
55109
+ function* ve(e, t, n) {
55080
55110
  let { brief: a, fullDescription: r, customUsage: i } = t, { headers: o } = n.text, d = n.prefix.join(" ");
55081
55111
  if (yield n.ansiColor ? `\x1B[1m${o.usage}\x1B[22m` : o.usage, i)
55082
55112
  for (let s of i)
@@ -55103,37 +55133,46 @@ function* Oe(e, t, n) {
55103
55133
  let m = e.positional ?? { kind: "tuple", parameters: [] };
55104
55134
  if (m.kind === "array" || m.parameters.length > 0) {
55105
55135
  yield "", yield n.ansiColor ? `\x1B[1m${o.arguments}\x1B[22m` : o.arguments;
55106
- for (let s of Re(m, n))
55136
+ for (let s of Oe(m, n))
55107
55137
  yield ` ${s}`;
55108
55138
  }
55109
55139
  }
55110
- function en(e, t) {
55140
+ function nn(e, t) {
55111
55141
  for (let n of t)
55112
55142
  if (n in e)
55113
- throw new x(`Unable to use reserved flag --${n}`);
55143
+ throw new C(`Unable to use reserved flag --${n}`);
55114
55144
  }
55115
- function nn(e, t) {
55145
+ function tn(e, t) {
55116
55146
  for (let n of t)
55117
55147
  if (n in e)
55118
- throw new x(`Unable to use reserved alias -${n}`);
55148
+ throw new C(`Unable to use reserved alias -${n}`);
55119
55149
  }
55120
- function* tn(e) {
55121
- yield `no-${A(e)}`, yield `no${e[0].toUpperCase()}${e.slice(1)}`;
55150
+ function* rn(e) {
55151
+ yield `no-${F(e)}`, yield `no${e[0].toUpperCase()}${e.slice(1)}`;
55122
55152
  }
55123
- function rn(e) {
55153
+ function on(e) {
55124
55154
  let t = Object.entries(e).filter(([, n]) => n.kind === "boolean" && !n.optional);
55125
55155
  for (let [n] of t)
55126
- for (let a of tn(n))
55156
+ for (let a of rn(n))
55127
55157
  if (a in e)
55128
- throw new x(`Unable to allow negation for --${n} as it conflicts with --${a}`);
55158
+ throw new C(`Unable to allow negation for --${n} as it conflicts with --${a}`);
55129
55159
  }
55130
- function on(e) {
55160
+ function an(e) {
55161
+ for (let [t, n] of Object.entries(e))
55162
+ if ("variadic" in n && typeof n.variadic == "string") {
55163
+ if (n.variadic.length < 1)
55164
+ throw new C(`Unable to use "" as variadic separator for --${t} as it is empty`);
55165
+ if (/\s/.test(n.variadic))
55166
+ throw new C(`Unable to use "${n.variadic}" as variadic separator for --${t} as it contains whitespace`);
55167
+ }
55168
+ }
55169
+ function sn(e) {
55131
55170
  let { flags: t = {}, aliases: n = {} } = e.parameters;
55132
- en(t, ["help", "helpAll", "help-all"]), nn(n, ["h", "H"]), rn(t);
55171
+ nn(t, ["help", "helpAll", "help-all"]), tn(n, ["h", "H"]), on(t), an(t);
55133
55172
  let a;
55134
55173
  return "func" in e ? a = async () => e.func : a = e.loader, { kind: O, loader: a, parameters: e.parameters, get brief() {
55135
55174
  return e.docs.brief;
55136
- }, formatUsageLine: (r) => ee(e.parameters, r), formatHelp: (r) => [...Oe(e.parameters, e.docs, r)].join(`
55175
+ }, formatUsageLine: (r) => ee(e.parameters, r), formatHelp: (r) => [...ve(e.parameters, e.docs, r)].join(`
55137
55176
  `) + `
55138
55177
  `, usesFlag: (r) => (r in t) || (r in n) };
55139
55178
  }
@@ -55142,7 +55181,7 @@ function* Be(e, t, n) {
55142
55181
  yield n.ansiColor ? `\x1B[1m${o.usage}\x1B[22m` : o.usage;
55143
55182
  for (let [l, p] of Object.entries(e))
55144
55183
  if (!i || !i[l] || n.includeHidden) {
55145
- let c = n.config.caseStyle === "convert-camel-to-kebab" ? A(l) : l;
55184
+ let c = n.config.caseStyle === "convert-camel-to-kebab" ? F(l) : l;
55146
55185
  yield ` ${p.formatUsageLine({ ...n, prefix: [...n.prefix, c] })}`;
55147
55186
  }
55148
55187
  let d = n.prefix.join(" ");
@@ -55162,19 +55201,19 @@ function* Be(e, t, n) {
55162
55201
  for (let l of u)
55163
55202
  yield ` ${l}`;
55164
55203
  }
55165
- function an({ routes: e, defaultCommand: t, docs: n, aliases: a }) {
55204
+ function ln({ routes: e, defaultCommand: t, docs: n, aliases: a }) {
55166
55205
  if (Object.entries(e).length === 0)
55167
- throw new x("Route map must contain at least one route");
55206
+ throw new C("Route map must contain at least one route");
55168
55207
  let r = a ?? {}, i = new Map;
55169
55208
  for (let [m, s] of Object.entries(r)) {
55170
55209
  if (m in e)
55171
- throw new x(`Cannot use "${m}" as an alias when a route with that name already exists`);
55210
+ throw new C(`Cannot use "${m}" as an alias when a route with that name already exists`);
55172
55211
  let u = i.get(s) ?? [];
55173
55212
  i.set(s, [...u, m]);
55174
55213
  }
55175
55214
  let o = t ? e[t] : undefined;
55176
55215
  if (o && o.kind === R)
55177
- throw new x(`Cannot use "${t}" as the default command because it is not a Command`);
55216
+ throw new C(`Cannot use "${t}" as the default command because it is not a Command`);
55178
55217
  let d = (m) => {
55179
55218
  if (m in r)
55180
55219
  return r[m];
@@ -55199,17 +55238,17 @@ function an({ routes: e, defaultCommand: t, docs: n, aliases: a }) {
55199
55238
  if (!l && s === "allow-kebab-for-camel" && (l = d(u)), !l)
55200
55239
  return { original: [], "convert-camel-to-kebab": [] };
55201
55240
  let p = [l, ...i.get(l) ?? []].filter((c) => c !== m && c !== u);
55202
- return { original: p, "convert-camel-to-kebab": p.map(A) };
55241
+ return { original: p, "convert-camel-to-kebab": p.map(F) };
55203
55242
  }, getRoutingTargetForInput: (m) => {
55204
55243
  let s = m in r ? r[m] : m;
55205
55244
  return e[s];
55206
55245
  }, getAllEntries() {
55207
55246
  let m = n.hideRoute;
55208
- return Object.entries(e).map(([s, u]) => ({ name: { original: s, "convert-camel-to-kebab": A(s) }, target: u, aliases: i.get(s) ?? [], hidden: m?.[s] ?? false }));
55247
+ return Object.entries(e).map(([s, u]) => ({ name: { original: s, "convert-camel-to-kebab": F(s) }, target: u, aliases: i.get(s) ?? [], hidden: m?.[s] ?? false }));
55209
55248
  } };
55210
55249
  }
55211
- async function zt(e, t, n) {
55212
- let a = await Te(e, t, n);
55250
+ async function Yt(e, t, n) {
55251
+ let a = await Fe(e, t, n);
55213
55252
  n.process.exitCode = a;
55214
55253
  }
55215
55254
 
@@ -55224,12 +55263,7 @@ function buildContext(process2) {
55224
55263
  // src/mcp-server/cli/start/command.ts
55225
55264
  init_esm();
55226
55265
  init_console_logger();
55227
-
55228
- // src/mcp-server/scopes.ts
55229
- var mcpScopes = [];
55230
-
55231
- // src/mcp-server/cli/start/command.ts
55232
- var startCommand = on({
55266
+ var startCommand = sn({
55233
55267
  loader: async () => {
55234
55268
  const { main: main2 } = await Promise.resolve().then(() => (init_impl(), exports_impl));
55235
55269
  return main2;
@@ -55257,15 +55291,6 @@ var startCommand = on({
55257
55291
  return stringType().parse(value);
55258
55292
  }
55259
55293
  },
55260
- ...mcpScopes.length ? {
55261
- scope: {
55262
- kind: "enum",
55263
- brief: "Mount tools/resources that match given scope (repeatable flag)",
55264
- values: mcpScopes,
55265
- variadic: true,
55266
- optional: true
55267
- }
55268
- } : {},
55269
55294
  "api-key-auth": {
55270
55295
  kind: "parsed",
55271
55296
  brief: "Sets the apiKeyAuth auth field for the API",
@@ -55322,7 +55347,7 @@ var startCommand = on({
55322
55347
  });
55323
55348
 
55324
55349
  // src/mcp-server/mcp-server.ts
55325
- var routes = an({
55350
+ var routes = ln({
55326
55351
  routes: {
55327
55352
  start: startCommand
55328
55353
  },
@@ -55330,16 +55355,16 @@ var routes = an({
55330
55355
  brief: "MCP server CLI"
55331
55356
  }
55332
55357
  });
55333
- var app = He(routes, {
55358
+ var app = _e(routes, {
55334
55359
  name: "mcp",
55335
55360
  versionInfo: {
55336
- currentVersion: "0.5.36"
55361
+ currentVersion: "0.5.38"
55337
55362
  }
55338
55363
  });
55339
- zt(app, process3.argv.slice(2), buildContext(process3));
55364
+ Yt(app, process3.argv.slice(2), buildContext(process3));
55340
55365
  export {
55341
55366
  app
55342
55367
  };
55343
55368
 
55344
- //# debugId=C149DCF5E5DD0D3C64756E2164756E21
55369
+ //# debugId=5B1589D61BE75D0C64756E2164756E21
55345
55370
  //# sourceMappingURL=mcp-server.js.map