@compass-labs/api-sdk 0.5.35 → 0.5.37

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 (62) hide show
  1. package/README.md +1 -1
  2. package/bin/mcp-server.js +401 -379
  3. package/bin/mcp-server.js.map +13 -14
  4. package/dist/commonjs/funcs/morphoVault.js +2 -0
  5. package/dist/commonjs/funcs/morphoVault.js.map +1 -1
  6. package/dist/commonjs/lib/config.d.ts +3 -3
  7. package/dist/commonjs/lib/config.js +3 -3
  8. package/dist/commonjs/mcp-server/cli/start/command.d.ts.map +1 -1
  9. package/dist/commonjs/mcp-server/cli/start/command.js +0 -12
  10. package/dist/commonjs/mcp-server/cli/start/command.js.map +1 -1
  11. package/dist/commonjs/mcp-server/cli/start/impl.d.ts +0 -2
  12. package/dist/commonjs/mcp-server/cli/start/impl.d.ts.map +1 -1
  13. package/dist/commonjs/mcp-server/cli/start/impl.js +0 -2
  14. package/dist/commonjs/mcp-server/cli/start/impl.js.map +1 -1
  15. package/dist/commonjs/mcp-server/mcp-server.js +1 -1
  16. package/dist/commonjs/mcp-server/server.js +1 -1
  17. package/dist/commonjs/models/components/apy.d.ts +2 -0
  18. package/dist/commonjs/models/components/apy.d.ts.map +1 -1
  19. package/dist/commonjs/models/components/apy.js +2 -0
  20. package/dist/commonjs/models/components/apy.js.map +1 -1
  21. package/dist/commonjs/models/errors/apierror.d.ts.map +1 -1
  22. package/dist/commonjs/models/errors/apierror.js +8 -2
  23. package/dist/commonjs/models/errors/apierror.js.map +1 -1
  24. package/dist/commonjs/models/operations/morphovault.d.ts +26 -4
  25. package/dist/commonjs/models/operations/morphovault.d.ts.map +1 -1
  26. package/dist/commonjs/models/operations/morphovault.js +15 -5
  27. package/dist/commonjs/models/operations/morphovault.js.map +1 -1
  28. package/dist/esm/funcs/morphoVault.js +2 -0
  29. package/dist/esm/funcs/morphoVault.js.map +1 -1
  30. package/dist/esm/lib/config.d.ts +3 -3
  31. package/dist/esm/lib/config.js +3 -3
  32. package/dist/esm/mcp-server/cli/start/command.d.ts.map +1 -1
  33. package/dist/esm/mcp-server/cli/start/command.js +0 -12
  34. package/dist/esm/mcp-server/cli/start/command.js.map +1 -1
  35. package/dist/esm/mcp-server/cli/start/impl.d.ts +0 -2
  36. package/dist/esm/mcp-server/cli/start/impl.d.ts.map +1 -1
  37. package/dist/esm/mcp-server/cli/start/impl.js +0 -2
  38. package/dist/esm/mcp-server/cli/start/impl.js.map +1 -1
  39. package/dist/esm/mcp-server/mcp-server.js +1 -1
  40. package/dist/esm/mcp-server/server.js +1 -1
  41. package/dist/esm/models/components/apy.d.ts +2 -0
  42. package/dist/esm/models/components/apy.d.ts.map +1 -1
  43. package/dist/esm/models/components/apy.js +2 -0
  44. package/dist/esm/models/components/apy.js.map +1 -1
  45. package/dist/esm/models/errors/apierror.d.ts.map +1 -1
  46. package/dist/esm/models/errors/apierror.js +8 -2
  47. package/dist/esm/models/errors/apierror.js.map +1 -1
  48. package/dist/esm/models/operations/morphovault.d.ts +26 -4
  49. package/dist/esm/models/operations/morphovault.d.ts.map +1 -1
  50. package/dist/esm/models/operations/morphovault.js +15 -5
  51. package/dist/esm/models/operations/morphovault.js.map +1 -1
  52. package/jsr.json +1 -1
  53. package/package.json +1 -1
  54. package/src/funcs/morphoVault.ts +2 -0
  55. package/src/lib/config.ts +3 -3
  56. package/src/mcp-server/cli/start/command.ts +0 -13
  57. package/src/mcp-server/cli/start/impl.ts +0 -4
  58. package/src/mcp-server/mcp-server.ts +1 -1
  59. package/src/mcp-server/server.ts +1 -1
  60. package/src/models/components/apy.ts +4 -0
  61. package/src/models/errors/apierror.ts +8 -2
  62. package/src/models/operations/morphovault.ts +32 -6
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.35",
34268
- genVersion: "2.640.2",
34269
- userAgent: "speakeasy-sdk/typescript 0.5.35 2.640.2 0.0.1 @compass-labs/api-sdk"
34267
+ sdkVersion: "0.5.37",
34268
+ genVersion: "2.647.2",
34269
+ userAgent: "speakeasy-sdk/typescript 0.5.37 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$) => {
@@ -48858,7 +48873,9 @@ async function $do32(client, request, options) {
48858
48873
  const body = null;
48859
48874
  const path = pathToFunc("/v0/morpho/vault")();
48860
48875
  const query = encodeFormQuery({
48876
+ block: payload.block,
48861
48877
  chain: payload.chain,
48878
+ user_address: payload.user_address,
48862
48879
  vault_address: payload.vault_address
48863
48880
  });
48864
48881
  const headers = new Headers(compactMap({
@@ -53966,7 +53983,7 @@ it to be traded on DeFi protocols.`,
53966
53983
  function createMCPServer(deps) {
53967
53984
  const server = new McpServer({
53968
53985
  name: "CompassApiSDK",
53969
- version: "0.5.35"
53986
+ version: "0.5.37"
53970
53987
  });
53971
53988
  const client = new CompassApiSDKCore({
53972
53989
  apiKeyAuth: deps.apiKeyAuth,
@@ -54171,7 +54188,6 @@ async function startStdio(flags) {
54171
54188
  const server = createMCPServer({
54172
54189
  logger,
54173
54190
  allowedTools: flags.tool,
54174
- scopes: flags.scope,
54175
54191
  ...{ apiKeyAuth: flags["api-key-auth"] ?? "" },
54176
54192
  serverURL: flags["server-url"],
54177
54193
  serverIdx: flags["server-index"]
@@ -54190,7 +54206,6 @@ async function startSSE(flags) {
54190
54206
  const mcpServer = createMCPServer({
54191
54207
  logger,
54192
54208
  allowedTools: flags.tool,
54193
- scopes: flags.scope,
54194
54209
  ...{ apiKeyAuth: flags["api-key-auth"] ?? "" },
54195
54210
  serverURL: flags["server-url"],
54196
54211
  serverIdx: flags["server-index"]
@@ -54253,17 +54268,17 @@ function K(e, t) {
54253
54268
  let n = e.env?.[t];
54254
54269
  return typeof n == "string" && n !== "0";
54255
54270
  }
54256
- var b = { UnknownCommand: -5, InvalidArgument: -4, ContextLoadError: -3, CommandLoadError: -2, InternalError: -1, Success: 0, CommandRunError: 1 };
54271
+ var N = { UnknownCommand: -5, InvalidArgument: -4, ContextLoadError: -3, CommandLoadError: -2, InternalError: -1, Success: 0, CommandRunError: 1 };
54257
54272
  function I(e) {
54258
54273
  return e.replace(/-./g, (t) => t[1].toUpperCase());
54259
54274
  }
54260
- function A(e) {
54275
+ function F(e) {
54261
54276
  return Array.from(e).map((t, n) => {
54262
54277
  let a = t.toUpperCase(), r = t.toLowerCase();
54263
54278
  return n === 0 || a !== t || a === r ? t : `-${r}`;
54264
54279
  }).join("");
54265
54280
  }
54266
- function ve(e) {
54281
+ function we(e) {
54267
54282
  let t = new Map;
54268
54283
  return { get: (...n) => t.get(n.join(",")) ?? e, set: (n, ...a) => {
54269
54284
  t.set(a.join(","), n);
@@ -54276,7 +54291,7 @@ function Xe(e, t, n) {
54276
54291
  let i = Math.abs(e.length - t.length);
54277
54292
  if (typeof a == "number" && i > a)
54278
54293
  return 1 / 0;
54279
- let o = ve(1 / 0);
54294
+ let o = we(1 / 0);
54280
54295
  o.set(0, -1, -1);
54281
54296
  for (let s = 0;s < t.length; ++s)
54282
54297
  o.set((s + 1) * r.insertion, -1, s);
@@ -54301,23 +54316,23 @@ function Xe(e, t, n) {
54301
54316
  let m = o.get(e.length - 1, t.length - 1);
54302
54317
  return m > a ? 1 / 0 : m;
54303
54318
  }
54304
- function we(e, t, n) {
54319
+ function $e(e, t, n) {
54305
54320
  let a = e[1] - t[1];
54306
54321
  if (a !== 0)
54307
54322
  return a;
54308
54323
  let r = e[0].startsWith(n), i = t[0].startsWith(n);
54309
54324
  return r && !i ? -1 : !r && i ? 1 : e[0].localeCompare(t[0]);
54310
54325
  }
54311
- function D(e, t, n) {
54326
+ function M(e, t, n) {
54312
54327
  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);
54328
+ return a.filter(([, i]) => i === r).sort((i, o) => $e(i, o, e)).map(([i]) => i);
54314
54329
  }
54315
- var x = class extends Error {
54330
+ var C = class extends Error {
54316
54331
  };
54317
54332
  function q(e) {
54318
54333
  return e instanceof Error ? e.stack ?? String(e) : String(e);
54319
54334
  }
54320
- function $e(e, t) {
54335
+ function Le(e, t) {
54321
54336
  let n = [], a = Math.max(e.length, t.length);
54322
54337
  for (let r = 0;r < a; ++r)
54323
54338
  n[r] = Math.max(e[r], t[r]);
@@ -54328,7 +54343,7 @@ function $(e, t) {
54328
54343
  return [];
54329
54344
  let n = Array(Math.max(...e.map((r) => r.length))).fill(0, 0), a = e.reduce((r, i) => {
54330
54345
  let o = i.map((d) => d.length);
54331
- return $e(r, o);
54346
+ return Le(r, o);
54332
54347
  }, n);
54333
54348
  return e.map((r) => {
54334
54349
  let i = (r[0] ?? "").padEnd(a[0]);
@@ -54346,24 +54361,24 @@ function V(e, t) {
54346
54361
  let n = e.slice(0, e.length - 1).join(", ");
54347
54362
  return t.serialComma && (n += ","), [n, t.conjunction, e[e.length - 1]].join(" ");
54348
54363
  }
54349
- function Le(e, t) {
54364
+ function ke(e, t) {
54350
54365
  return e.reduce((n, a) => {
54351
54366
  let r = t(a), i = n[r] ?? [];
54352
54367
  return i.push(a), n[r] = i, n;
54353
54368
  }, {});
54354
54369
  }
54355
54370
  function me(e, t) {
54356
- return Le(e, (n) => n[t]);
54371
+ return ke(e, (n) => n[t]);
54357
54372
  }
54358
54373
  async function z(e) {
54359
54374
  let t = await Promise.allSettled(e), n = me(t, "status");
54360
54375
  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
54376
  }
54362
- var Ie = new Set(["true", "t", "yes", "y", "on", "1"]);
54377
+ var Me = new Set(["true", "t", "yes", "y", "on", "1"]);
54363
54378
  var De = new Set(["false", "f", "no", "n", "off", "0"]);
54364
54379
  var re = (e) => {
54365
54380
  let t = e.toLowerCase();
54366
- if (Ie.has(t))
54381
+ if (Me.has(t))
54367
54382
  return true;
54368
54383
  if (De.has(t))
54369
54384
  return false;
@@ -54375,24 +54390,24 @@ var oe = (e) => {
54375
54390
  throw new SyntaxError(`Cannot convert ${e} to a number`);
54376
54391
  return t;
54377
54392
  };
54378
- var h = class extends x {
54393
+ var A = class extends C {
54379
54394
  _brand;
54380
54395
  };
54381
54396
  function se(e, t) {
54382
54397
  let n = e.constructor.name, a = t[n];
54383
54398
  return a ? a(e) : e.message;
54384
54399
  }
54385
- function Me(e, t, n) {
54400
+ function Ge(e, t, n) {
54386
54401
  return Object.fromEntries(Object.entries(t).map(([a, r]) => {
54387
54402
  let i = r, o = e[i];
54388
54403
  if (!o) {
54389
- let d = v(i, n);
54404
+ let d = B(i, n);
54390
54405
  throw new L(d, [], a);
54391
54406
  }
54392
54407
  return [a, [i, o]];
54393
54408
  }));
54394
54409
  }
54395
- var L = class extends h {
54410
+ var L = class extends A {
54396
54411
  input;
54397
54412
  corrections;
54398
54413
  aliasName;
@@ -54407,7 +54422,7 @@ var L = class extends h {
54407
54422
  super(r), this.input = t, this.corrections = n, this.aliasName = a;
54408
54423
  }
54409
54424
  };
54410
- var G = class extends h {
54425
+ var G = class extends A {
54411
54426
  input;
54412
54427
  constructor(t) {
54413
54428
  super(`No alias registered for -${t}`), this.input = t;
@@ -54416,10 +54431,10 @@ var G = class extends h {
54416
54431
  function ae(e, t) {
54417
54432
  return e.placeholder ? e.placeholder : typeof t == "number" ? `arg${t}` : "args";
54418
54433
  }
54419
- function v(e, t) {
54420
- return t === "allow-kebab-for-camel" ? A(e) : e;
54434
+ function B(e, t) {
54435
+ return t === "allow-kebab-for-camel" ? F(e) : e;
54421
54436
  }
54422
- var j = class extends h {
54437
+ var j = class extends A {
54423
54438
  externalFlagNameOrPlaceholder;
54424
54439
  input;
54425
54440
  exception;
@@ -54427,14 +54442,14 @@ var j = class extends h {
54427
54442
  super(`Failed to parse "${n}" for ${t}: ${a instanceof Error ? a.message : String(a)}`), this.externalFlagNameOrPlaceholder = t, this.input = n, this.exception = a;
54428
54443
  }
54429
54444
  };
54430
- function M(e, t, n, a) {
54445
+ function D(e, t, n, a) {
54431
54446
  try {
54432
54447
  return t.parse.call(a, n);
54433
54448
  } catch (r) {
54434
54449
  throw new j(e, n, r);
54435
54450
  }
54436
54451
  }
54437
- var W = class extends h {
54452
+ var W = class extends A {
54438
54453
  externalFlagName;
54439
54454
  input;
54440
54455
  values;
@@ -54447,7 +54462,7 @@ var W = class extends h {
54447
54462
  super(i), this.externalFlagName = t, this.input = n, this.values = a;
54448
54463
  }
54449
54464
  };
54450
- var X = class extends h {
54465
+ var w = class extends A {
54451
54466
  externalFlagName;
54452
54467
  nextFlagName;
54453
54468
  constructor(t, n) {
@@ -54455,14 +54470,14 @@ var X = class extends h {
54455
54470
  n && (a += ` but encountered --${n} instead`), super(a), this.externalFlagName = t, this.nextFlagName = n;
54456
54471
  }
54457
54472
  };
54458
- var H = class extends h {
54473
+ var H = class extends A {
54459
54474
  expectedCount;
54460
54475
  input;
54461
54476
  constructor(t, n) {
54462
54477
  super(`Too many arguments, expected ${t} but encountered "${n}"`), this.expectedCount = t, this.input = n;
54463
54478
  }
54464
54479
  };
54465
- var _ = class extends h {
54480
+ var _ = class extends A {
54466
54481
  placeholder;
54467
54482
  limit;
54468
54483
  constructor(t, n) {
@@ -54496,10 +54511,10 @@ function pe(e, t, n) {
54496
54511
  if (!r) {
54497
54512
  if (i in t)
54498
54513
  throw new L(e, [i]);
54499
- let o = A(e);
54514
+ let o = F(e);
54500
54515
  if (o in t)
54501
54516
  throw new L(e, [o]);
54502
- let d = D(a, Object.keys(t), n.distanceOptions);
54517
+ let d = M(a, Object.keys(t), n.distanceOptions);
54503
54518
  throw new L(e, d);
54504
54519
  }
54505
54520
  return { namedFlag: [a, r] };
@@ -54508,8 +54523,8 @@ function ue(e) {
54508
54523
  return e.namedFlag[1].kind === "boolean" || e.namedFlag[1].kind === "counter";
54509
54524
  }
54510
54525
  var ce = /^-([a-z]+)$/i;
54511
- var Ge = /^--([a-z][a-z-]+)$/i;
54512
- function je(e, t, n, a) {
54526
+ var je = /^--([a-z][a-z-.\d_]+)$/i;
54527
+ function Ue(e, t, n, a) {
54513
54528
  let r = ce.exec(e);
54514
54529
  if (r) {
54515
54530
  let o = r[1];
@@ -54520,31 +54535,31 @@ function je(e, t, n, a) {
54520
54535
  return { namedFlag: s };
54521
54536
  });
54522
54537
  }
54523
- let i = Ge.exec(e);
54538
+ let i = je.exec(e);
54524
54539
  if (i) {
54525
54540
  let o = i[1];
54526
54541
  return [pe(o, t, a)];
54527
54542
  }
54528
54543
  return [];
54529
54544
  }
54530
- var Ue = /^--([a-z][a-z-.\d_]+)=(.+)$/i;
54531
- var qe = /^-([a-z])=(.+)$/i;
54532
- var J = class extends h {
54545
+ var qe = /^--([a-z][a-z-.\d_]+)=(.+)$/i;
54546
+ var Ve = /^-([a-z])=(.+)$/i;
54547
+ var J = class extends A {
54533
54548
  externalFlagName;
54534
54549
  valueText;
54535
54550
  constructor(t, n) {
54536
54551
  super(`Cannot negate flag --${t} and pass "${n}" as value`), this.externalFlagName = t, this.valueText = n;
54537
54552
  }
54538
54553
  };
54539
- function Ve(e, t, n, a) {
54540
- let r = Ue.exec(e);
54554
+ function We(e, t, n, a) {
54555
+ let r = qe.exec(e);
54541
54556
  if (r) {
54542
54557
  let o = r[1], { namedFlag: d, negated: m } = pe(o, t, a), s = r[2];
54543
54558
  if (m)
54544
54559
  throw new J(o, s);
54545
54560
  return [d, s];
54546
54561
  }
54547
- let i = qe.exec(e);
54562
+ let i = Ve.exec(e);
54548
54563
  if (i) {
54549
54564
  let o = i[1], d = n[o];
54550
54565
  if (!d)
@@ -54553,17 +54568,17 @@ function Ve(e, t, n, a) {
54553
54568
  return [d, m];
54554
54569
  }
54555
54570
  }
54556
- async function We(e, t, n, a, r) {
54571
+ async function He(e, t, n, a, r) {
54557
54572
  if (!n) {
54558
54573
  if ("default" in t && typeof t.default < "u")
54559
- return t.kind === "boolean" || t.kind === "enum" ? t.default : M(e, t, t.default, r);
54574
+ return t.kind === "boolean" || t.kind === "enum" ? t.default : D(e, t, t.default, r);
54560
54575
  if (t.optional)
54561
54576
  return;
54562
54577
  if (t.kind === "boolean")
54563
54578
  return false;
54564
54579
  if (t.kind === "counter")
54565
54580
  return 0;
54566
- throw new X(e);
54581
+ throw new w(e);
54567
54582
  }
54568
54583
  if (t.kind === "counter")
54569
54584
  return n.reduce((o, d) => {
@@ -54577,12 +54592,12 @@ async function We(e, t, n, a, r) {
54577
54592
  if (t.kind === "enum") {
54578
54593
  for (let o of n)
54579
54594
  if (!t.values.includes(o)) {
54580
- let d = D(o, t.values, a.distanceOptions);
54595
+ let d = M(o, t.values, a.distanceOptions);
54581
54596
  throw new W(e, o, t.values, d);
54582
54597
  }
54583
54598
  return n;
54584
54599
  }
54585
- return Promise.all(n.map((o) => M(e, t, o, r)));
54600
+ return Promise.all(n.map((o) => D(e, t, o, r)));
54586
54601
  }
54587
54602
  let i = n[0];
54588
54603
  if (t.kind === "boolean")
@@ -54593,14 +54608,14 @@ async function We(e, t, n, a, r) {
54593
54608
  }
54594
54609
  if (t.kind === "enum") {
54595
54610
  if (!t.values.includes(i)) {
54596
- let o = D(i, t.values, a.distanceOptions);
54611
+ let o = M(i, t.values, a.distanceOptions);
54597
54612
  throw new W(e, i, t.values, o);
54598
54613
  }
54599
54614
  return i;
54600
54615
  }
54601
- return M(e, t, i, r);
54616
+ return D(e, t, i, r);
54602
54617
  }
54603
- var Y = class extends h {
54618
+ var Y = class extends A {
54604
54619
  externalFlagName;
54605
54620
  previousInput;
54606
54621
  input;
@@ -54611,13 +54626,17 @@ var Y = class extends h {
54611
54626
  function fe(e) {
54612
54627
  return e.kind === "counter" ? true : ("variadic" in e) ? !!e.variadic : false;
54613
54628
  }
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);
54629
+ function v(e, t, [n, a], r) {
54630
+ let i = e.get(n) ?? [];
54631
+ if (i.length > 0 && !fe(a)) {
54632
+ let o = B(n, t);
54633
+ throw new Y(o, i[0], r);
54619
54634
  }
54620
- e.set(n[0], [...r, a]);
54635
+ if ("variadic" in a && typeof a.variadic == "string") {
54636
+ let o = r.split(a.variadic);
54637
+ e.set(n, [...i, ...o]);
54638
+ } else
54639
+ e.set(n, [...i, r]);
54621
54640
  }
54622
54641
  function ie(e, t, n) {
54623
54642
  if (t.get(n)) {
@@ -54627,54 +54646,54 @@ function ie(e, t, n) {
54627
54646
  return false;
54628
54647
  }
54629
54648
  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;
54649
+ 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
54650
  return { next: (l) => {
54632
54651
  if (!u && t.allowArgumentEscapeSequence && l === "--") {
54633
54652
  if (s)
54634
54653
  if (s[1].kind === "parsed" && s[1].inferEmpty)
54635
- B(d, t.caseStyle, s, ""), s = undefined;
54654
+ v(d, t.caseStyle, s, ""), s = undefined;
54636
54655
  else {
54637
- let p = v(s[0], t.caseStyle);
54638
- throw new X(p);
54656
+ let p = B(s[0], t.caseStyle);
54657
+ throw new w(p);
54639
54658
  }
54640
54659
  u = true;
54641
54660
  return;
54642
54661
  }
54643
54662
  if (!u) {
54644
- let p = Ve(l, n, i, t);
54663
+ let p = We(l, n, i, t);
54645
54664
  if (p) {
54646
54665
  if (s)
54647
54666
  if (s[1].kind === "parsed" && s[1].inferEmpty)
54648
- B(d, t.caseStyle, s, ""), s = undefined;
54667
+ v(d, t.caseStyle, s, ""), s = undefined;
54649
54668
  else {
54650
- let f = v(s[0], t.caseStyle), T = v(p[0][0], t.caseStyle);
54651
- throw new X(f, T);
54669
+ let f = B(s[0], t.caseStyle), T = B(p[0][0], t.caseStyle);
54670
+ throw new w(f, T);
54652
54671
  }
54653
- B(d, t.caseStyle, ...p);
54672
+ v(d, t.caseStyle, ...p);
54654
54673
  return;
54655
54674
  }
54656
- let c = je(l, n, i, t);
54675
+ let c = Ue(l, n, i, t);
54657
54676
  if (c.length > 0) {
54658
54677
  if (s)
54659
54678
  if (s[1].kind === "parsed" && s[1].inferEmpty)
54660
- B(d, t.caseStyle, s, ""), s = undefined;
54679
+ v(d, t.caseStyle, s, ""), s = undefined;
54661
54680
  else {
54662
- let f = v(s[0], t.caseStyle), T = v(c[0].namedFlag[0], t.caseStyle);
54663
- throw new X(f, T);
54681
+ let f = B(s[0], t.caseStyle), T = B(c[0].namedFlag[0], t.caseStyle);
54682
+ throw new w(f, T);
54664
54683
  }
54665
54684
  if (c.every(ue))
54666
54685
  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");
54686
+ f.namedFlag[1].kind === "boolean" ? v(d, t.caseStyle, f.namedFlag, f.negated ? "false" : "true") : v(d, t.caseStyle, f.namedFlag, "1");
54668
54687
  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);
54688
+ let f = c.find((E) => !ue(E)), T = B(f.namedFlag[0], t.caseStyle);
54689
+ throw new w(T);
54671
54690
  } else
54672
54691
  s = c[0].namedFlag;
54673
54692
  return;
54674
54693
  }
54675
54694
  }
54676
54695
  if (s)
54677
- B(d, t.caseStyle, s, l), s = undefined;
54696
+ v(d, t.caseStyle, s, l), s = undefined;
54678
54697
  else {
54679
54698
  if (r.kind === "tuple") {
54680
54699
  if (m >= r.parameters.length)
@@ -54685,26 +54704,26 @@ function Q(e, t) {
54685
54704
  }
54686
54705
  }, parseArguments: async (l) => {
54687
54706
  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") {
54707
+ 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) => {
54708
+ let y = ae(r.parameter, x + 1);
54709
+ return D(y, r.parameter, g, l);
54710
+ }))) : c = z(r.parameters.map(async (g, x) => {
54711
+ let y = ae(g, x + 1), h = o[x];
54712
+ if (typeof h != "string") {
54694
54713
  if (typeof g.default == "string")
54695
- return M(y, g, g.default, l);
54714
+ return D(y, g, g.default, l);
54696
54715
  if (g.optional)
54697
54716
  return;
54698
54717
  throw new _(y);
54699
54718
  }
54700
- return M(y, g, N, l);
54701
- })), s && s[1].kind === "parsed" && s[1].inferEmpty && (B(d, t.caseStyle, s, ""), s = undefined);
54719
+ return D(y, g, h, l);
54720
+ })), s && s[1].kind === "parsed" && s[1].inferEmpty && (v(d, t.caseStyle, s, ""), s = undefined);
54702
54721
  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];
54722
+ let [x, y] = g, h = B(x, t.caseStyle);
54723
+ if (s && s[0] === x)
54724
+ throw new w(h);
54725
+ let b = d.get(x), X = await He(h, y, b, t, l);
54726
+ return [x, X];
54708
54727
  })), [T, E] = await Promise.all([c, f]);
54709
54728
  if (T.status === "rejected")
54710
54729
  for (let g of T.reasons)
@@ -54715,96 +54734,100 @@ function Q(e, t) {
54715
54734
  if (p.length > 0)
54716
54735
  return { success: false, errors: p };
54717
54736
  if (T.status === "rejected")
54718
- throw new x("Unknown failure while scanning positional arguments");
54737
+ throw new C("Unknown failure while scanning positional arguments");
54719
54738
  if (E.status === "rejected")
54720
- throw new x("Unknown failure while scanning flag arguments");
54739
+ throw new C("Unknown failure while scanning flag arguments");
54721
54740
  return { success: true, arguments: [Object.fromEntries(E.value), ...T.value] };
54722
54741
  }, 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
- }
54742
+ if (s)
54743
+ return ge(s[1], f, l);
54727
54744
  let E = [];
54728
54745
  if (!u) {
54729
- let F = ce.exec(l);
54746
+ let S = ce.exec(l);
54730
54747
  if (p.includeAliases) {
54731
54748
  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 });
54749
+ let g = Object.entries(a).filter((x) => !ie(n, d, x[1]));
54750
+ for (let [x] of g) {
54751
+ let y = i[x];
54752
+ y && E.push({ kind: "argument:flag", completion: `-${x}`, brief: y[1].brief });
54736
54753
  }
54737
- } else if (F) {
54738
- let g = Array.from(F[1]);
54754
+ } else if (S) {
54755
+ let g = Array.from(S[1]);
54739
54756
  if (g.includes("h"))
54740
54757
  return [];
54741
54758
  if (T && g.includes("v"))
54742
54759
  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");
54760
+ let x = new Map(d);
54761
+ for (let b of g) {
54762
+ let X = i[b];
54763
+ if (!X)
54764
+ throw new G(b);
54765
+ v(x, t.caseStyle, X, X[1].kind === "boolean" ? "true" : "1");
54749
54766
  }
54750
54767
  let y = g[g.length - 1];
54751
54768
  if (y) {
54752
- let P = i[y];
54753
- P && E.push({ kind: "argument:flag", completion: l, brief: P[1].brief });
54769
+ let b = i[y];
54770
+ b && E.push({ kind: "argument:flag", completion: l, brief: b[1].brief });
54754
54771
  }
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 });
54772
+ let h = Object.entries(a).filter((b) => !ie(n, x, b[1]));
54773
+ for (let [b] of h) {
54774
+ let X = i[b];
54775
+ X && E.push({ kind: "argument:flag", completion: `${l}${b}`, brief: X[1].brief });
54759
54776
  }
54760
54777
  }
54761
54778
  }
54762
54779
  if (l === "" || l === "-" || l.startsWith("--")) {
54763
54780
  t.allowArgumentEscapeSequence && E.push({ kind: "argument:flag", completion: "--", brief: c.briefs.argumentEscapeSequence });
54764
54781
  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 })));
54782
+ t.caseStyle === "allow-kebab-for-camel" && (g = g.map(([y, h]) => [F(y), h]));
54783
+ let x = g.map(([y, h]) => [`--${y}`, h]).filter(([y]) => y.startsWith(l));
54784
+ E.push(...x.map(([y, h]) => ({ kind: "argument:flag", completion: y, brief: h.brief })));
54768
54785
  }
54769
54786
  }
54770
54787
  if (r.kind === "array") {
54771
54788
  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 })));
54789
+ let S = await r.parameter.proposeCompletions.call(f, l);
54790
+ E.push(...S.map((g) => ({ kind: "argument:value", completion: g, brief: r.parameter.brief })));
54774
54791
  }
54775
54792
  } 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 })));
54793
+ let S = r.parameters[m];
54794
+ if (S?.proposeCompletions) {
54795
+ let g = await S.proposeCompletions.call(f, l);
54796
+ E.push(...g.map((x) => ({ kind: "argument:value", completion: x, brief: S.brief })));
54780
54797
  }
54781
54798
  }
54782
- return E.filter(({ completion: F }) => F.startsWith(l));
54799
+ return E.filter(({ completion: S }) => S.startsWith(l));
54783
54800
  } };
54784
54801
  }
54785
- function ge(e, t, n) {
54802
+ async function ge(e, t, n) {
54803
+ if (typeof e.variadic == "string" && n.endsWith(e.variadic))
54804
+ return ge(e, t, "");
54805
+ let a;
54806
+ 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));
54807
+ }
54808
+ function Ce(e, t, n) {
54786
54809
  let a = t === "allow-kebab-for-camel" ? "convert-camel-to-kebab" : t, r = e.getAllEntries();
54787
54810
  return n.includeHiddenRoutes || (r = r.filter((i) => !i.hidden)), r.flatMap((i) => {
54788
54811
  let o = i.name[a];
54789
54812
  return n.includeAliases ? [o, ...i.aliases] : [o];
54790
54813
  });
54791
54814
  }
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 }) => {
54815
+ 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
54816
  let n = `No command registered for \`${e}\``;
54794
54817
  if (t.length > 0) {
54795
54818
  let a = V(t, { kind: "conjunctive", conjunction: "or", serialComma: true });
54796
54819
  return `${n}, did you mean ${a}?`;
54797
54820
  } else
54798
54821
  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) {
54822
+ }, 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})` };
54823
+ function xe(e) {
54801
54824
  if (e.startsWith("en"))
54802
- return Ce;
54825
+ return ye;
54803
54826
  }
54804
- function S(e, t, n) {
54827
+ function P(e, t, n) {
54805
54828
  return !n.disableAnsiColor && !K(e, "STRICLI_NO_COLOR") && (t.getColorDepth?.(e.env) ?? 1) >= 4;
54806
54829
  }
54807
- async function xe({ loader: e, parameters: t }, { context: n, inputs: a, scannerConfig: r, errorFormatting: i, documentationConfig: o, determineExitCode: d }) {
54830
+ async function Te({ loader: e, parameters: t }, { context: n, inputs: a, scannerConfig: r, errorFormatting: i, documentationConfig: o, determineExitCode: d }) {
54808
54831
  let m = e(), s;
54809
54832
  try {
54810
54833
  let l = Q(t, r);
@@ -54814,46 +54837,46 @@ async function xe({ loader: e, parameters: t }, { context: n, inputs: a, scanner
54814
54837
  if (p.success)
54815
54838
  s = p.arguments;
54816
54839
  else {
54817
- let c = S(n.process, n.process.stderr, o);
54840
+ let c = P(n.process, n.process.stderr, o);
54818
54841
  for (let f of p.errors) {
54819
54842
  let T = i.exceptionWhileParsingArguments(f, c);
54820
54843
  n.process.stderr.write(c ? `\x1B[1m\x1B[31m${T}\x1B[39m\x1B[22m
54821
54844
  ` : `${T}
54822
54845
  `);
54823
54846
  }
54824
- return b.InvalidArgument;
54847
+ return N.InvalidArgument;
54825
54848
  }
54826
54849
  } catch (l) {
54827
- let p = S(n.process, n.process.stderr, o), c = i.exceptionWhileParsingArguments(l, p);
54850
+ let p = P(n.process, n.process.stderr, o), c = i.exceptionWhileParsingArguments(l, p);
54828
54851
  return n.process.stderr.write(p ? `\x1B[1m\x1B[31m${c}\x1B[39m\x1B[22m
54829
54852
  ` : `${c}
54830
- `), b.InvalidArgument;
54853
+ `), N.InvalidArgument;
54831
54854
  }
54832
54855
  let u;
54833
54856
  try {
54834
54857
  let l = await m;
54835
54858
  typeof l == "function" ? u = l : u = l.default;
54836
54859
  } catch (l) {
54837
- let p = S(n.process, n.process.stderr, o), c = i.exceptionWhileLoadingCommandFunction(l, p);
54860
+ let p = P(n.process, n.process.stderr, o), c = i.exceptionWhileLoadingCommandFunction(l, p);
54838
54861
  return n.process.stderr.write(p ? `\x1B[1m\x1B[31m${c}\x1B[39m\x1B[22m
54839
54862
  ` : `${c}
54840
- `), b.CommandLoadError;
54863
+ `), N.CommandLoadError;
54841
54864
  }
54842
54865
  try {
54843
54866
  let l = await u.call(n, ...s);
54844
54867
  if (l instanceof Error) {
54845
- let p = S(n.process, n.process.stderr, o), c = i.commandErrorResult(l, p);
54868
+ let p = P(n.process, n.process.stderr, o), c = i.commandErrorResult(l, p);
54846
54869
  return n.process.stderr.write(p ? `\x1B[1m\x1B[31m${c}\x1B[39m\x1B[22m
54847
54870
  ` : `${c}
54848
- `), d ? d(l) : b.CommandRunError;
54871
+ `), d ? d(l) : N.CommandRunError;
54849
54872
  }
54850
54873
  } catch (l) {
54851
- let p = S(n.process, n.process.stderr, o), c = i.exceptionWhileRunningCommand(l, p);
54874
+ let p = P(n.process, n.process.stderr, o), c = i.exceptionWhileRunningCommand(l, p);
54852
54875
  return n.process.stderr.write(p ? `\x1B[1m\x1B[31m${c}\x1B[39m\x1B[22m
54853
54876
  ` : `${c}
54854
- `), d ? d(l) : b.CommandRunError;
54877
+ `), d ? d(l) : N.CommandRunError;
54855
54878
  }
54856
- return b.Success;
54879
+ return N.Success;
54857
54880
  }
54858
54881
  var R = Symbol("RouteMap");
54859
54882
  var O = Symbol("Command");
@@ -54894,14 +54917,14 @@ function Z(e, t, n) {
54894
54917
  return { target: d, unprocessedInputs: r, helpRequested: s, prefix: a, rootLevel: m, aliases: u };
54895
54918
  } };
54896
54919
  }
54897
- async function Te({ root: e, defaultText: t, config: n }, a, r) {
54920
+ async function Fe({ root: e, defaultText: t, config: n }, a, r) {
54898
54921
  let i = t;
54899
54922
  if (r.locale) {
54900
54923
  let l = n.localization.loadText(r.locale);
54901
54924
  if (l)
54902
54925
  i = l;
54903
54926
  else {
54904
- let p = S(r.process, r.process.stderr, n.documentation), c = i.noTextAvailableForLocale({ requestedLocale: r.locale, defaultLocale: n.localization.defaultLocale, ansiColor: p });
54927
+ let p = P(r.process, r.process.stderr, n.documentation), c = i.noTextAvailableForLocale({ requestedLocale: r.locale, defaultLocale: n.localization.defaultLocale, ansiColor: p });
54905
54928
  r.process.stderr.write(p ? `\x1B[1m\x1B[33m${c}\x1B[39m\x1B[22m
54906
54929
  ` : `${c}
54907
54930
  `);
@@ -54912,7 +54935,7 @@ async function Te({ root: e, defaultText: t, config: n }, a, r) {
54912
54935
  "currentVersion" in n.versionInfo ? l = n.versionInfo.currentVersion : l = await n.versionInfo.getCurrentVersion.call(r);
54913
54936
  let p = await n.versionInfo.getLatestVersion.call(r, l);
54914
54937
  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 });
54938
+ let c = P(r.process, r.process.stderr, n.documentation), f = i.currentVersionIsNotLatest({ currentVersion: l, latestVersion: p, upgradeCommand: n.versionInfo.upgradeCommand, ansiColor: c });
54916
54939
  r.process.stderr.write(c ? `\x1B[1m\x1B[33m${f}\x1B[39m\x1B[22m
54917
54940
  ` : `${f}
54918
54941
  `);
@@ -54922,7 +54945,7 @@ async function Te({ root: e, defaultText: t, config: n }, a, r) {
54922
54945
  if (n.versionInfo && (o[0] === "--version" || o[0] === "-v")) {
54923
54946
  let l;
54924
54947
  return "currentVersion" in n.versionInfo ? l = n.versionInfo.currentVersion : l = await n.versionInfo.getCurrentVersion.call(r), r.process.stdout.write(l + `
54925
- `), b.Success;
54948
+ `), N.Success;
54926
54949
  }
54927
54950
  let d = Z(e, n.scanner, [n.name]), m;
54928
54951
  for (;o.length > 0 && !m; ) {
@@ -54930,56 +54953,56 @@ async function Te({ root: e, defaultText: t, config: n }, a, r) {
54930
54953
  m = d.next(l);
54931
54954
  }
54932
54955
  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 });
54956
+ 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
54957
  return r.process.stderr.write(c ? `\x1B[1m\x1B[31m${f}\x1B[39m\x1B[22m
54935
54958
  ` : `${f}
54936
- `), b.UnknownCommand;
54959
+ `), N.UnknownCommand;
54937
54960
  }
54938
54961
  let s = d.finish();
54939
54962
  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;
54963
+ let l = P(r.process, r.process.stdout, n.documentation);
54964
+ 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
54965
  }
54943
54966
  let u;
54944
54967
  if ("forCommand" in r)
54945
54968
  try {
54946
54969
  u = await r.forCommand({ prefix: s.prefix });
54947
54970
  } 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;
54971
+ let p = P(r.process, r.process.stderr, n.documentation), c = i.exceptionWhileLoadingCommandContext(l, p);
54972
+ return r.process.stderr.write(p ? `\x1B[1m\x1B[31m${c}\x1B[39m\x1B[22m` : c), N.ContextLoadError;
54950
54973
  }
54951
54974
  else
54952
54975
  u = r;
54953
- return xe(s.target, { context: u, inputs: s.unprocessedInputs, scannerConfig: n.scanner, documentationConfig: n.documentation, errorFormatting: i, determineExitCode: n.determineExitCode });
54976
+ return Te(s.target, { context: u, inputs: s.unprocessedInputs, scannerConfig: n.scanner, documentationConfig: n.documentation, errorFormatting: i, determineExitCode: n.determineExitCode });
54954
54977
  }
54955
54978
  function U(e, t) {
54956
- return t === "convert-camel-to-kebab" ? A(e) : e;
54979
+ return t === "convert-camel-to-kebab" ? F(e) : e;
54957
54980
  }
54958
- function Fe(e, t) {
54959
- return t === "convert-camel-to-kebab" ? `no-${A(e)}` : `no${e[0].toUpperCase()}${e.slice(1)}`;
54981
+ function Ee(e, t) {
54982
+ return t === "convert-camel-to-kebab" ? `no-${F(e)}` : `no${e[0].toUpperCase()}${e.slice(1)}`;
54960
54983
  }
54961
54984
  function Ae(e) {
54962
54985
  let t = e.scanner?.caseStyle ?? "original", n;
54963
54986
  if (e.documentation?.caseStyle) {
54964
54987
  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");
54988
+ throw new C("Cannot convert route and flag names on display but scan as original");
54966
54989
  n = e.documentation.caseStyle;
54967
54990
  } else
54968
54991
  t === "allow-kebab-for-camel" ? n = "convert-camel-to-kebab" : n = t;
54969
54992
  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 } };
54993
+ return { ...e, scanner: a, completion: i, documentation: r, localization: { defaultLocale: "en", loadText: xe, ...e.localization } };
54971
54994
  }
54972
- function He(e, t) {
54995
+ function _e(e, t) {
54973
54996
  let n = Ae(t);
54974
54997
  if (e.kind === O && n.versionInfo) {
54975
54998
  if (e.usesFlag("version"))
54976
- throw new x("Unable to use command with flag --version as root when version info is supplied");
54999
+ throw new C("Unable to use command with flag --version as root when version info is supplied");
54977
55000
  if (e.usesFlag("v"))
54978
- throw new x("Unable to use command with alias -v as root when version info is supplied");
55001
+ throw new C("Unable to use command with alias -v as root when version info is supplied");
54979
55002
  }
54980
55003
  let a = n.localization.loadText(n.localization.defaultLocale);
54981
55004
  if (!a)
54982
- throw new x(`No text available for the default locale "${n.localization.defaultLocale}"`);
55005
+ throw new C(`No text available for the default locale "${n.localization.defaultLocale}"`);
54983
55006
  return { root: e, config: n, defaultText: a };
54984
55007
  }
54985
55008
  function le(e) {
@@ -54988,27 +55011,27 @@ function le(e) {
54988
55011
  function k(e) {
54989
55012
  return e.optional ?? le(e);
54990
55013
  }
54991
- function be(e) {
55014
+ function Pe(e) {
54992
55015
  return `(${e})`;
54993
55016
  }
54994
- function Pe(e) {
55017
+ function Se(e) {
54995
55018
  return `[${e}]`;
54996
55019
  }
54997
- function Se(e) {
55020
+ function Re(e) {
54998
55021
  return `${e}...`;
54999
55022
  }
55000
- function Ye(e) {
55023
+ function Qe(e) {
55001
55024
  return `<${e}>`;
55002
55025
  }
55003
- function Qe(e) {
55026
+ function Ze(e) {
55004
55027
  return `[<${e}>]`;
55005
55028
  }
55006
- function Ze(e) {
55029
+ function en(e) {
55007
55030
  return `<${e}>...`;
55008
55031
  }
55009
55032
  function ee(e, t) {
55010
55033
  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}`;
55034
+ let d = t.config.caseStyle === "convert-camel-to-kebab" ? `--${F(i)}` : `--${i}`;
55012
55035
  if (e.aliases && t.config.useAliasInUsageLine) {
55013
55036
  let s = Object.entries(e.aliases).filter((u) => u[1] === i);
55014
55037
  s.length === 1 && s[0] && (d = `-${s[0][0]}`);
@@ -55019,15 +55042,15 @@ function ee(e, t) {
55019
55042
  return [o, `${d} ${o.values.join("|")}`];
55020
55043
  let m = o.placeholder ?? "value";
55021
55044
  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;
55045
+ }).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
55046
  if (r)
55024
55047
  if (r.kind === "array")
55025
- a = [Ze(r.parameter.placeholder ?? "args")];
55048
+ a = [en(r.parameter.placeholder ?? "args")];
55026
55049
  else {
55027
55050
  let i = r.parameters;
55028
55051
  t.config.onlyRequiredInUsageLine && (i = i.filter((o) => !o.optional && typeof o.default > "u")), a = i.map((o, d) => {
55029
55052
  let m = o.placeholder ?? `arg${d + 1}`;
55030
- return o.optional || typeof o.default < "u" ? Qe(m) : Ye(m);
55053
+ return o.optional || typeof o.default < "u" ? Ze(m) : Qe(m);
55031
55054
  });
55032
55055
  }
55033
55056
  return [...t.prefix, ...n, ...a].join(" ");
@@ -55036,7 +55059,7 @@ function ne(e, t, n) {
55036
55059
  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
55060
  let u = Object.entries(t).filter((f) => f[1] === m).map(([f]) => `-${f}`), l = "--" + U(m, n.config.caseStyle);
55038
55061
  if (s.kind === "boolean" && s.default !== false) {
55039
- let f = Fe(m, n.config.caseStyle);
55062
+ let f = Ee(m, n.config.caseStyle);
55040
55063
  l = `${l}/--${f}`;
55041
55064
  }
55042
55065
  k(s) ? l = `[${l}]` : o && (l = ` ${l}`), s.kind === "parsed" && s.variadic && (l = `${l}...`);
@@ -55049,6 +55072,10 @@ function ne(e, t, n) {
55049
55072
  let f = n.ansiColor ? `\x1B[90m${a.default}\x1B[39m` : a.default;
55050
55073
  p.push(`${f} ${s.default === "" ? '""' : String(s.default)}`);
55051
55074
  }
55075
+ if ("variadic" in s && typeof s.variadic == "string") {
55076
+ let f = n.ansiColor ? `\x1B[90m${a.separator}\x1B[39m` : a.separator;
55077
+ p.push(`${f} ${s.variadic}`);
55078
+ }
55052
55079
  let c = p.length > 0 ? `[${p.join(", ")}]` : undefined;
55053
55080
  return { aliases: u.join(" "), flagName: l, brief: s.brief, suffix: c, hidden: s.hidden };
55054
55081
  });
@@ -55065,7 +55092,7 @@ function* te(e) {
55065
55092
  }
55066
55093
  e.includeVersionFlag && (yield e.config.useAliasInUsageLine ? "-v" : "--version");
55067
55094
  }
55068
- function Re(e, t) {
55095
+ function Oe(e, t) {
55069
55096
  if (e.kind === "array") {
55070
55097
  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
55098
  return $([[i, o]], [" "]);
@@ -55076,7 +55103,7 @@ function Re(e, t) {
55076
55103
  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
55104
  }), [" ", " "]);
55078
55105
  }
55079
- function* Oe(e, t, n) {
55106
+ function* ve(e, t, n) {
55080
55107
  let { brief: a, fullDescription: r, customUsage: i } = t, { headers: o } = n.text, d = n.prefix.join(" ");
55081
55108
  if (yield n.ansiColor ? `\x1B[1m${o.usage}\x1B[22m` : o.usage, i)
55082
55109
  for (let s of i)
@@ -55103,37 +55130,46 @@ function* Oe(e, t, n) {
55103
55130
  let m = e.positional ?? { kind: "tuple", parameters: [] };
55104
55131
  if (m.kind === "array" || m.parameters.length > 0) {
55105
55132
  yield "", yield n.ansiColor ? `\x1B[1m${o.arguments}\x1B[22m` : o.arguments;
55106
- for (let s of Re(m, n))
55133
+ for (let s of Oe(m, n))
55107
55134
  yield ` ${s}`;
55108
55135
  }
55109
55136
  }
55110
- function en(e, t) {
55137
+ function nn(e, t) {
55111
55138
  for (let n of t)
55112
55139
  if (n in e)
55113
- throw new x(`Unable to use reserved flag --${n}`);
55140
+ throw new C(`Unable to use reserved flag --${n}`);
55114
55141
  }
55115
- function nn(e, t) {
55142
+ function tn(e, t) {
55116
55143
  for (let n of t)
55117
55144
  if (n in e)
55118
- throw new x(`Unable to use reserved alias -${n}`);
55145
+ throw new C(`Unable to use reserved alias -${n}`);
55119
55146
  }
55120
- function* tn(e) {
55121
- yield `no-${A(e)}`, yield `no${e[0].toUpperCase()}${e.slice(1)}`;
55147
+ function* rn(e) {
55148
+ yield `no-${F(e)}`, yield `no${e[0].toUpperCase()}${e.slice(1)}`;
55122
55149
  }
55123
- function rn(e) {
55150
+ function on(e) {
55124
55151
  let t = Object.entries(e).filter(([, n]) => n.kind === "boolean" && !n.optional);
55125
55152
  for (let [n] of t)
55126
- for (let a of tn(n))
55153
+ for (let a of rn(n))
55127
55154
  if (a in e)
55128
- throw new x(`Unable to allow negation for --${n} as it conflicts with --${a}`);
55155
+ throw new C(`Unable to allow negation for --${n} as it conflicts with --${a}`);
55129
55156
  }
55130
- function on(e) {
55157
+ function an(e) {
55158
+ for (let [t, n] of Object.entries(e))
55159
+ if ("variadic" in n && typeof n.variadic == "string") {
55160
+ if (n.variadic.length < 1)
55161
+ throw new C(`Unable to use "" as variadic separator for --${t} as it is empty`);
55162
+ if (/\s/.test(n.variadic))
55163
+ throw new C(`Unable to use "${n.variadic}" as variadic separator for --${t} as it contains whitespace`);
55164
+ }
55165
+ }
55166
+ function sn(e) {
55131
55167
  let { flags: t = {}, aliases: n = {} } = e.parameters;
55132
- en(t, ["help", "helpAll", "help-all"]), nn(n, ["h", "H"]), rn(t);
55168
+ nn(t, ["help", "helpAll", "help-all"]), tn(n, ["h", "H"]), on(t), an(t);
55133
55169
  let a;
55134
55170
  return "func" in e ? a = async () => e.func : a = e.loader, { kind: O, loader: a, parameters: e.parameters, get brief() {
55135
55171
  return e.docs.brief;
55136
- }, formatUsageLine: (r) => ee(e.parameters, r), formatHelp: (r) => [...Oe(e.parameters, e.docs, r)].join(`
55172
+ }, formatUsageLine: (r) => ee(e.parameters, r), formatHelp: (r) => [...ve(e.parameters, e.docs, r)].join(`
55137
55173
  `) + `
55138
55174
  `, usesFlag: (r) => (r in t) || (r in n) };
55139
55175
  }
@@ -55142,7 +55178,7 @@ function* Be(e, t, n) {
55142
55178
  yield n.ansiColor ? `\x1B[1m${o.usage}\x1B[22m` : o.usage;
55143
55179
  for (let [l, p] of Object.entries(e))
55144
55180
  if (!i || !i[l] || n.includeHidden) {
55145
- let c = n.config.caseStyle === "convert-camel-to-kebab" ? A(l) : l;
55181
+ let c = n.config.caseStyle === "convert-camel-to-kebab" ? F(l) : l;
55146
55182
  yield ` ${p.formatUsageLine({ ...n, prefix: [...n.prefix, c] })}`;
55147
55183
  }
55148
55184
  let d = n.prefix.join(" ");
@@ -55162,19 +55198,19 @@ function* Be(e, t, n) {
55162
55198
  for (let l of u)
55163
55199
  yield ` ${l}`;
55164
55200
  }
55165
- function an({ routes: e, defaultCommand: t, docs: n, aliases: a }) {
55201
+ function ln({ routes: e, defaultCommand: t, docs: n, aliases: a }) {
55166
55202
  if (Object.entries(e).length === 0)
55167
- throw new x("Route map must contain at least one route");
55203
+ throw new C("Route map must contain at least one route");
55168
55204
  let r = a ?? {}, i = new Map;
55169
55205
  for (let [m, s] of Object.entries(r)) {
55170
55206
  if (m in e)
55171
- throw new x(`Cannot use "${m}" as an alias when a route with that name already exists`);
55207
+ throw new C(`Cannot use "${m}" as an alias when a route with that name already exists`);
55172
55208
  let u = i.get(s) ?? [];
55173
55209
  i.set(s, [...u, m]);
55174
55210
  }
55175
55211
  let o = t ? e[t] : undefined;
55176
55212
  if (o && o.kind === R)
55177
- throw new x(`Cannot use "${t}" as the default command because it is not a Command`);
55213
+ throw new C(`Cannot use "${t}" as the default command because it is not a Command`);
55178
55214
  let d = (m) => {
55179
55215
  if (m in r)
55180
55216
  return r[m];
@@ -55199,17 +55235,17 @@ function an({ routes: e, defaultCommand: t, docs: n, aliases: a }) {
55199
55235
  if (!l && s === "allow-kebab-for-camel" && (l = d(u)), !l)
55200
55236
  return { original: [], "convert-camel-to-kebab": [] };
55201
55237
  let p = [l, ...i.get(l) ?? []].filter((c) => c !== m && c !== u);
55202
- return { original: p, "convert-camel-to-kebab": p.map(A) };
55238
+ return { original: p, "convert-camel-to-kebab": p.map(F) };
55203
55239
  }, getRoutingTargetForInput: (m) => {
55204
55240
  let s = m in r ? r[m] : m;
55205
55241
  return e[s];
55206
55242
  }, getAllEntries() {
55207
55243
  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 }));
55244
+ 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
55245
  } };
55210
55246
  }
55211
- async function zt(e, t, n) {
55212
- let a = await Te(e, t, n);
55247
+ async function Yt(e, t, n) {
55248
+ let a = await Fe(e, t, n);
55213
55249
  n.process.exitCode = a;
55214
55250
  }
55215
55251
 
@@ -55224,12 +55260,7 @@ function buildContext(process2) {
55224
55260
  // src/mcp-server/cli/start/command.ts
55225
55261
  init_esm();
55226
55262
  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({
55263
+ var startCommand = sn({
55233
55264
  loader: async () => {
55234
55265
  const { main: main2 } = await Promise.resolve().then(() => (init_impl(), exports_impl));
55235
55266
  return main2;
@@ -55257,15 +55288,6 @@ var startCommand = on({
55257
55288
  return stringType().parse(value);
55258
55289
  }
55259
55290
  },
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
55291
  "api-key-auth": {
55270
55292
  kind: "parsed",
55271
55293
  brief: "Sets the apiKeyAuth auth field for the API",
@@ -55322,7 +55344,7 @@ var startCommand = on({
55322
55344
  });
55323
55345
 
55324
55346
  // src/mcp-server/mcp-server.ts
55325
- var routes = an({
55347
+ var routes = ln({
55326
55348
  routes: {
55327
55349
  start: startCommand
55328
55350
  },
@@ -55330,16 +55352,16 @@ var routes = an({
55330
55352
  brief: "MCP server CLI"
55331
55353
  }
55332
55354
  });
55333
- var app = He(routes, {
55355
+ var app = _e(routes, {
55334
55356
  name: "mcp",
55335
55357
  versionInfo: {
55336
- currentVersion: "0.5.35"
55358
+ currentVersion: "0.5.37"
55337
55359
  }
55338
55360
  });
55339
- zt(app, process3.argv.slice(2), buildContext(process3));
55361
+ Yt(app, process3.argv.slice(2), buildContext(process3));
55340
55362
  export {
55341
55363
  app
55342
55364
  };
55343
55365
 
55344
- //# debugId=E60518FDBEFFE54864756E2164756E21
55366
+ //# debugId=AC63E9787D82BA5C64756E2164756E21
55345
55367
  //# sourceMappingURL=mcp-server.js.map