agent-valley 3.0.4 → 4.0.1

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.
@@ -59,7 +59,7 @@ var __esm = (fn, res, err) => () => {
59
59
  };
60
60
  var __require = /* @__PURE__ */ createRequire(import.meta.url);
61
61
 
62
- // ../../node_modules/.bun/zod@4.6.5/node_modules/zod/v4/core/util.js
62
+ // ../../node_modules/.bun/zod@4.6.7/node_modules/zod/v4/core/util.js
63
63
  function getEnumValues(entries) {
64
64
  const numericValues = Object.values(entries).filter((v) => typeof v === "number");
65
65
  const values = Object.entries(entries).filter(([k, _]) => numericValues.indexOf(+k) === -1).map(([_, v]) => v);
@@ -398,6 +398,18 @@ function prefixIssues(path, issues) {
398
398
  function unwrapMessage(message) {
399
399
  return typeof message === "string" ? message : message?.message;
400
400
  }
401
+ function sizeCaps(defChecks) {
402
+ const caps = [];
403
+ for (const ch of defChecks ?? []) {
404
+ const d = ch._zod.def;
405
+ if (!/_(length|size)$|_equals$/.test(d.check))
406
+ break;
407
+ const max = d.maximum ?? d.length ?? d.size;
408
+ if (max >= 0)
409
+ caps.push([max, ch]);
410
+ }
411
+ return caps;
412
+ }
401
413
  function attachSchema(issues, start, inst) {
402
414
  var _a;
403
415
  for (let i = start;i < issues.length; i++) {
@@ -625,7 +637,7 @@ var init_util = __esm(() => {
625
637
  };
626
638
  });
627
639
 
628
- // ../../node_modules/.bun/zod@4.6.5/node_modules/zod/v4/core/core.js
640
+ // ../../node_modules/.bun/zod@4.6.7/node_modules/zod/v4/core/core.js
629
641
  function newError(Definition) {
630
642
  const E = _E;
631
643
  if (E) {
@@ -749,7 +761,7 @@ var init_core = __esm(() => {
749
761
  globalConfig = globalThis.__zod_globalConfig;
750
762
  });
751
763
 
752
- // ../../node_modules/.bun/zod@4.6.5/node_modules/zod/v4/core/errors.js
764
+ // ../../node_modules/.bun/zod@4.6.7/node_modules/zod/v4/core/errors.js
753
765
  function _getMessage() {
754
766
  const internals = this._zod;
755
767
  internals.message ?? (internals.message = JSON.stringify(internals.def, jsonStringifyReplacer, 2));
@@ -897,7 +909,7 @@ var init_errors = __esm(() => {
897
909
  });
898
910
  });
899
911
 
900
- // ../../node_modules/.bun/zod@4.6.5/node_modules/zod/v4/core/parse.js
912
+ // ../../node_modules/.bun/zod@4.6.7/node_modules/zod/v4/core/parse.js
901
913
  function finalizeParams(callee, params) {
902
914
  return { callee: params?.callee ?? callee, Err: params?.Err };
903
915
  }
@@ -1039,7 +1051,7 @@ var init_parse = __esm(() => {
1039
1051
  COMPILE_FALLBACK = /* @__PURE__ */ Symbol.for("zod.compile.fallback");
1040
1052
  });
1041
1053
 
1042
- // ../../node_modules/.bun/zod@4.6.5/node_modules/zod/v4/core/regexes.js
1054
+ // ../../node_modules/.bun/zod@4.6.7/node_modules/zod/v4/core/regexes.js
1043
1055
  function nanoidOfLength(length) {
1044
1056
  return new RegExp(`^[a-zA-Z0-9_-]{${length}}$`);
1045
1057
  }
@@ -1099,7 +1111,7 @@ var init_regexes = __esm(() => {
1099
1111
  uppercase = /^[^a-z]*$/;
1100
1112
  });
1101
1113
 
1102
- // ../../node_modules/.bun/zod@4.6.5/node_modules/zod/v4/core/checks.js
1114
+ // ../../node_modules/.bun/zod@4.6.7/node_modules/zod/v4/core/checks.js
1103
1115
  var $ZodCheck, _whenHasLength = (payload) => {
1104
1116
  const val = payload.value;
1105
1117
  return !nullish(val) && val.length !== undefined;
@@ -1420,7 +1432,7 @@ var init_checks = __esm(() => {
1420
1432
  });
1421
1433
  });
1422
1434
 
1423
- // ../../node_modules/.bun/zod@4.6.5/node_modules/zod/v4/core/doc.js
1435
+ // ../../node_modules/.bun/zod@4.6.7/node_modules/zod/v4/core/doc.js
1424
1436
  class Doc {
1425
1437
  constructor(args = [], closed = {}) {
1426
1438
  this.content = [];
@@ -1462,17 +1474,17 @@ ${content.join(`
1462
1474
  }
1463
1475
  }
1464
1476
 
1465
- // ../../node_modules/.bun/zod@4.6.5/node_modules/zod/v4/core/versions.js
1477
+ // ../../node_modules/.bun/zod@4.6.7/node_modules/zod/v4/core/versions.js
1466
1478
  var version;
1467
1479
  var init_versions = __esm(() => {
1468
1480
  version = {
1469
1481
  major: 4,
1470
1482
  minor: 6,
1471
- patch: 5
1483
+ patch: 7
1472
1484
  };
1473
1485
  });
1474
1486
 
1475
- // ../../node_modules/.bun/zod@4.6.5/node_modules/zod/v4/core/schemas.js
1487
+ // ../../node_modules/.bun/zod@4.6.7/node_modules/zod/v4/core/schemas.js
1476
1488
  async function validateAsync2(inst, value) {
1477
1489
  const ctx = { async: true };
1478
1490
  return toStandardResult(await inst._zod.run({ value, issues: [] }, ctx), ctx);
@@ -1594,6 +1606,28 @@ function isValidJWT(token, algorithm = null) {
1594
1606
  return false;
1595
1607
  }
1596
1608
  }
1609
+ function capSize(inst, size) {
1610
+ const caps = sizeCaps(inst._zod.def.checks);
1611
+ if (!caps.length)
1612
+ return;
1613
+ const cap = Math.min(...caps.map((c) => c[0]));
1614
+ const parse = inst._zod.parse;
1615
+ inst._zod.parse = (payload, ctx) => {
1616
+ const n = size(payload.value);
1617
+ if (n > cap && !ctx?.skipChecks && ctx?.direction !== "backward") {
1618
+ for (const [max, ch] of sizeCaps(inst._zod.def.checks)) {
1619
+ if (n > max && ch._zod.def.when(payload)) {
1620
+ const start = payload.issues.length;
1621
+ ch._zod.check(payload);
1622
+ payload.issues[start].continue = false;
1623
+ attachSchema(payload.issues, start, inst);
1624
+ return payload;
1625
+ }
1626
+ }
1627
+ }
1628
+ return parse(payload, ctx);
1629
+ };
1630
+ }
1597
1631
  function handleArrayResult(result, final, index) {
1598
1632
  if (result.issues.length) {
1599
1633
  final.issues.push(...prefixIssues(index, result.issues));
@@ -1899,7 +1933,7 @@ function handleRefineResult(result, payload, input, inst) {
1899
1933
  payload.issues.push(issue(_iss));
1900
1934
  }
1901
1935
  }
1902
- var $ZodType, toStandardResult = (r, ctx) => r.issues.length ? { issues: r.issues.map((iss) => finalizeIssue(iss, ctx, config())) } : { value: r.value }, $ZodString, $ZodStringFormat, $ZodGUID, $ZodUUID, $ZodEmail, URL_BAD_FORMAT = 1, URL_UNPARSEABLE = 2, asciiTabOrNewline, $ZodURL, $ZodEmoji, $ZodNanoID, $ZodCUID, $ZodCUID2, $ZodULID, $ZodXID, $ZodKSUID, $ZodISODateTime, $ZodISODate, $ZodISOTime, $ZodISODuration, $ZodIPv4, ipv6Alphabet, $ZodIPv6, $ZodCIDRv4, $ZodCIDRv6, base64Charset, $ZodBase64, base64urlCharset, $ZodBase64URL, $ZodE164, $ZodJWT, $ZodNumber, $ZodNumberFormat, $ZodBoolean, $ZodBigInt, $ZodNull, $ZodAny, $ZodUnknown, $ZodNever, $ZodDate, $ZodArray, NO_SYMBOL_KEYS, $ZodObject, $ZodObjectJIT, $ZodUnion, $ZodDiscriminatedUnion, $ZodIntersection, $ZodRecord, $ZodEnum, $ZodLiteral, $ZodTransform, $ZodOptional, $ZodExactOptional, $ZodNullable, $ZodDefault, $ZodPrefault, $ZodNonOptional, $ZodCatch, $ZodPipe, $ZodPreprocess, $ZodReadonly, $ZodLazy, $ZodCustom;
1936
+ var $ZodType, toStandardResult = (r, ctx) => r.issues.length ? { issues: r.issues.map((iss) => finalizeIssue(iss, ctx, config())) } : { value: r.value }, $ZodString, $ZodStringFormat, $ZodGUID, $ZodUUID, $ZodEmail, URL_BAD_FORMAT = 1, URL_UNPARSEABLE = 2, asciiTabOrNewline, $ZodURL, $ZodEmoji, $ZodNanoID, $ZodCUID, $ZodCUID2, $ZodULID, $ZodXID, $ZodKSUID, $ZodISODateTime, $ZodISODate, $ZodISOTime, $ZodISODuration, $ZodIPv4, ipv6Alphabet, $ZodIPv6, $ZodCIDRv4, $ZodCIDRv6, base64Charset, $ZodBase64, base64urlCharset, $ZodBase64URL, $ZodE164, $ZodJWT, $ZodNumber, $ZodNumberFormat, $ZodBoolean, $ZodBigInt, $ZodNull, $ZodAny, $ZodUnknown, $ZodNever, $ZodDate, arraySize = (input) => Array.isArray(input) ? input.length : -1, $ZodArray, NO_SYMBOL_KEYS, $ZodObject, $ZodObjectJIT, $ZodUnion, $ZodDiscriminatedUnion, $ZodIntersection, $ZodRecord, $ZodEnum, $ZodLiteral, $ZodTransform, $ZodOptional, $ZodExactOptional, $ZodNullable, $ZodDefault, $ZodPrefault, $ZodNonOptional, $ZodCatch, $ZodPipe, $ZodPreprocess, $ZodReadonly, $ZodLazy, $ZodCustom;
1903
1937
  var init_schemas = __esm(() => {
1904
1938
  init_checks();
1905
1939
  init_core();
@@ -2431,6 +2465,7 @@ var init_schemas = __esm(() => {
2431
2465
  }
2432
2466
  return payload;
2433
2467
  };
2468
+ capSize(inst, arraySize);
2434
2469
  });
2435
2470
  NO_SYMBOL_KEYS = [];
2436
2471
  $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => {
@@ -3174,7 +3209,7 @@ var init_schemas = __esm(() => {
3174
3209
  });
3175
3210
  });
3176
3211
 
3177
- // ../../node_modules/.bun/zod@4.6.5/node_modules/zod/v4/core/memoizer.js
3212
+ // ../../node_modules/.bun/zod@4.6.7/node_modules/zod/v4/core/memoizer.js
3178
3213
  function isRef(value) {
3179
3214
  return value !== null && typeof value === "object";
3180
3215
  }
@@ -3443,7 +3478,7 @@ var init_memoizer = __esm(() => {
3443
3478
  };
3444
3479
  });
3445
3480
 
3446
- // ../../node_modules/.bun/zod@4.6.5/node_modules/zod/v4/locales/en.js
3481
+ // ../../node_modules/.bun/zod@4.6.7/node_modules/zod/v4/locales/en.js
3447
3482
  function en_default() {
3448
3483
  return {
3449
3484
  localeError: error()
@@ -3569,10 +3604,10 @@ var init_en = __esm(() => {
3569
3604
  init_util();
3570
3605
  });
3571
3606
 
3572
- // ../../node_modules/.bun/zod@4.6.5/node_modules/zod/v4/locales/index.js
3607
+ // ../../node_modules/.bun/zod@4.6.7/node_modules/zod/v4/locales/index.js
3573
3608
  var init_locales = () => {};
3574
3609
 
3575
- // ../../node_modules/.bun/zod@4.6.5/node_modules/zod/v4/core/registries.js
3610
+ // ../../node_modules/.bun/zod@4.6.7/node_modules/zod/v4/core/registries.js
3576
3611
  class $ZodRegistry {
3577
3612
  constructor() {
3578
3613
  this._map = new WeakMap;
@@ -3622,7 +3657,7 @@ var init_registries = __esm(() => {
3622
3657
  globalRegistry = globalThis.__zod_globalRegistry;
3623
3658
  });
3624
3659
 
3625
- // ../../node_modules/.bun/zod@4.6.5/node_modules/zod/v4/core/compile.js
3660
+ // ../../node_modules/.bun/zod@4.6.7/node_modules/zod/v4/core/compile.js
3626
3661
  var INVALID, FALLBACK_FLAG, WHEN_DEFAULTED_CHECKS, PATTERN_IS_COMPLETE;
3627
3662
  var init_compile = __esm(() => {
3628
3663
  INVALID = Symbol.for("zod.compile.invalid");
@@ -3663,7 +3698,7 @@ var init_compile = __esm(() => {
3663
3698
  ]);
3664
3699
  });
3665
3700
 
3666
- // ../../node_modules/.bun/zod@4.6.5/node_modules/zod/v4/core/api.js
3701
+ // ../../node_modules/.bun/zod@4.6.7/node_modules/zod/v4/core/api.js
3667
3702
  function snapshotChecks(def) {
3668
3703
  if (def.checks)
3669
3704
  def.checks = [...def.checks];
@@ -4165,7 +4200,7 @@ var init_api = __esm(() => {
4165
4200
  init_util();
4166
4201
  });
4167
4202
 
4168
- // ../../node_modules/.bun/zod@4.6.5/node_modules/zod/v4/core/to-json-schema.js
4203
+ // ../../node_modules/.bun/zod@4.6.7/node_modules/zod/v4/core/to-json-schema.js
4169
4204
  function assignProps(target, ...sources) {
4170
4205
  for (const source of sources) {
4171
4206
  for (const key of Reflect.ownKeys(source)) {
@@ -4692,7 +4727,7 @@ var init_to_json_schema = __esm(() => {
4692
4727
  UNION_KEYS = ["oneOf", "anyOf"];
4693
4728
  });
4694
4729
 
4695
- // ../../node_modules/.bun/zod@4.6.5/node_modules/zod/v4/core/json-schema-processors.js
4730
+ // ../../node_modules/.bun/zod@4.6.7/node_modules/zod/v4/core/json-schema-processors.js
4696
4731
  function aggregateChecks(schema) {
4697
4732
  const agg = {};
4698
4733
  const def = schema._zod.def;
@@ -5393,10 +5428,10 @@ var init_json_schema_processors = __esm(() => {
5393
5428
  };
5394
5429
  });
5395
5430
 
5396
- // ../../node_modules/.bun/zod@4.6.5/node_modules/zod/v4/core/json-schema.js
5431
+ // ../../node_modules/.bun/zod@4.6.7/node_modules/zod/v4/core/json-schema.js
5397
5432
  var init_json_schema = () => {};
5398
5433
 
5399
- // ../../node_modules/.bun/zod@4.6.5/node_modules/zod/v4/core/index.js
5434
+ // ../../node_modules/.bun/zod@4.6.7/node_modules/zod/v4/core/index.js
5400
5435
  var init_core2 = __esm(() => {
5401
5436
  init_util();
5402
5437
  init_regexes();
@@ -5416,12 +5451,12 @@ var init_core2 = __esm(() => {
5416
5451
  init_to_json_schema();
5417
5452
  });
5418
5453
 
5419
- // ../../node_modules/.bun/zod@4.6.5/node_modules/zod/v4/classic/checks.js
5454
+ // ../../node_modules/.bun/zod@4.6.7/node_modules/zod/v4/classic/checks.js
5420
5455
  var init_checks2 = __esm(() => {
5421
5456
  init_core2();
5422
5457
  });
5423
5458
 
5424
- // ../../node_modules/.bun/zod@4.6.5/node_modules/zod/v4/classic/errors.js
5459
+ // ../../node_modules/.bun/zod@4.6.7/node_modules/zod/v4/classic/errors.js
5425
5460
  function _lazyMethod(proto, key, make) {
5426
5461
  Object.defineProperty(proto, key, {
5427
5462
  configurable: true,
@@ -5471,7 +5506,7 @@ var init_errors2 = __esm(() => {
5471
5506
  });
5472
5507
  });
5473
5508
 
5474
- // ../../node_modules/.bun/zod@4.6.5/node_modules/zod/v4/classic/parse.js
5509
+ // ../../node_modules/.bun/zod@4.6.7/node_modules/zod/v4/classic/parse.js
5475
5510
  var parse3, parseAsync2, safeParse, safeParseAsync, encode, decode, encodeAsync, decodeAsync, safeEncode, safeDecode, safeEncodeAsync, safeDecodeAsync;
5476
5511
  var init_parse2 = __esm(() => {
5477
5512
  init_core2();
@@ -5491,7 +5526,7 @@ var init_parse2 = __esm(() => {
5491
5526
  safeDecodeAsync = /* @__PURE__ */ _safeDecodeAsync(ZodRealError);
5492
5527
  });
5493
5528
 
5494
- // ../../node_modules/.bun/zod@4.6.5/node_modules/zod/v4/classic/schemas.js
5529
+ // ../../node_modules/.bun/zod@4.6.7/node_modules/zod/v4/classic/schemas.js
5495
5530
  function _ensureDefaultLocale() {
5496
5531
  if (!globalConfig.localeError)
5497
5532
  config(en_default());
@@ -6528,7 +6563,7 @@ var init_schemas2 = __esm(() => {
6528
6563
  });
6529
6564
  });
6530
6565
 
6531
- // ../../node_modules/.bun/zod@4.6.5/node_modules/zod/v4/classic/compat.js
6566
+ // ../../node_modules/.bun/zod@4.6.7/node_modules/zod/v4/classic/compat.js
6532
6567
  var ZodIssueCode, ZodFirstPartyTypeKind;
6533
6568
  var init_compat = __esm(() => {
6534
6569
  ZodIssueCode = {
@@ -6547,7 +6582,7 @@ var init_compat = __esm(() => {
6547
6582
  (function(ZodFirstPartyTypeKind) {})(ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {}));
6548
6583
  });
6549
6584
 
6550
- // ../../node_modules/.bun/zod@4.6.5/node_modules/zod/v4/classic/iso.js
6585
+ // ../../node_modules/.bun/zod@4.6.7/node_modules/zod/v4/classic/iso.js
6551
6586
  var exports_iso = {};
6552
6587
  __export(exports_iso, {
6553
6588
  ZodISODate: () => ZodISODate,
@@ -6577,7 +6612,7 @@ var init_iso = __esm(() => {
6577
6612
  init_schemas2();
6578
6613
  });
6579
6614
 
6580
- // ../../node_modules/.bun/zod@4.6.5/node_modules/zod/v4/classic/coerce.js
6615
+ // ../../node_modules/.bun/zod@4.6.7/node_modules/zod/v4/classic/coerce.js
6581
6616
  var exports_coerce = {};
6582
6617
  __export(exports_coerce, {
6583
6618
  bigint: () => bigint2,
@@ -6606,7 +6641,7 @@ var init_coerce = __esm(() => {
6606
6641
  init_schemas2();
6607
6642
  });
6608
6643
 
6609
- // ../../node_modules/.bun/zod@4.6.5/node_modules/zod/v4/classic/external.js
6644
+ // ../../node_modules/.bun/zod@4.6.7/node_modules/zod/v4/classic/external.js
6610
6645
  var init_external = __esm(() => {
6611
6646
  init_core2();
6612
6647
  init_core2();
@@ -6621,7 +6656,7 @@ var init_external = __esm(() => {
6621
6656
  init_compat();
6622
6657
  });
6623
6658
 
6624
- // ../../node_modules/.bun/zod@4.6.5/node_modules/zod/index.js
6659
+ // ../../node_modules/.bun/zod@4.6.7/node_modules/zod/index.js
6625
6660
  var init_zod = __esm(() => {
6626
6661
  init_external();
6627
6662
  init_external();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agent-valley",
3
- "version": "3.0.4",
3
+ "version": "4.0.1",
4
4
  "type": "module",
5
5
  "engines": {
6
6
  "node": ">=26.10.0",