@alienplatform/sdk 3.3.11 → 3.3.13

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.
package/dist/dist.js CHANGED
@@ -169,7 +169,9 @@ function waitUntil(promise) {
169
169
  function setOnTaskRegistered(hook) {
170
170
  registry$1().onTaskRegistered = hook;
171
171
  }
172
- Object.freeze({ status: "aborted" });
172
+ //#endregion
173
+ //#region ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/core.js
174
+ var _a$1;
173
175
  function $constructor(name, initializer, params) {
174
176
  function init(inst, def) {
175
177
  if (!inst._zod) Object.defineProperty(inst, "_zod", {
@@ -220,13 +222,14 @@ var $ZodEncodeError = class extends Error {
220
222
  this.name = "ZodEncodeError";
221
223
  }
222
224
  };
223
- const globalConfig = {};
225
+ (_a$1 = globalThis).__zod_globalConfig ?? (_a$1.__zod_globalConfig = {});
226
+ const globalConfig = globalThis.__zod_globalConfig;
224
227
  function config(newConfig) {
225
228
  if (newConfig) Object.assign(globalConfig, newConfig);
226
229
  return globalConfig;
227
230
  }
228
231
  //#endregion
229
- //#region ../../node_modules/.pnpm/zod@4.3.2/node_modules/zod/v4/core/util.js
232
+ //#region ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/util.js
230
233
  function getEnumValues(entries) {
231
234
  const numericValues = Object.values(entries).filter((v) => typeof v === "number");
232
235
  return Object.entries(entries).filter(([k, _]) => numericValues.indexOf(+k) === -1).map(([_, v]) => v);
@@ -253,17 +256,13 @@ function cleanRegex(source) {
253
256
  return source.slice(start, end);
254
257
  }
255
258
  function floatSafeRemainder(val, step) {
256
- const valDecCount = (val.toString().split(".")[1] || "").length;
257
- const stepString = step.toString();
258
- let stepDecCount = (stepString.split(".")[1] || "").length;
259
- if (stepDecCount === 0 && /\d?e-\d?/.test(stepString)) {
260
- const match = stepString.match(/\d?e-(\d?)/);
261
- if (match?.[1]) stepDecCount = Number.parseInt(match[1]);
262
- }
263
- const decCount = valDecCount > stepDecCount ? valDecCount : stepDecCount;
264
- return Number.parseInt(val.toFixed(decCount).replace(".", "")) % Number.parseInt(step.toFixed(decCount).replace(".", "")) / 10 ** decCount;
259
+ const ratio = val / step;
260
+ const roundedRatio = Math.round(ratio);
261
+ const tolerance = Number.EPSILON * Math.max(Math.abs(ratio), 1);
262
+ if (Math.abs(ratio - roundedRatio) < tolerance) return 0;
263
+ return ratio - roundedRatio;
265
264
  }
266
- const EVALUATING = Symbol("evaluating");
265
+ const EVALUATING = /* @__PURE__*/ Symbol("evaluating");
267
266
  function defineLazy(object, key, getter) {
268
267
  let value = void 0;
269
268
  Object.defineProperty(object, key, {
@@ -307,7 +306,8 @@ const captureStackTrace = "captureStackTrace" in Error ? Error.captureStackTrace
307
306
  function isObject(data) {
308
307
  return typeof data === "object" && data !== null && !Array.isArray(data);
309
308
  }
310
- const allowsEval = cached(() => {
309
+ const allowsEval = /* @__PURE__*/ cached(() => {
310
+ if (globalConfig.jitless) return false;
311
311
  if (typeof navigator !== "undefined" && navigator?.userAgent?.includes("Cloudflare")) return false;
312
312
  try {
313
313
  new Function("");
@@ -329,9 +329,11 @@ function isPlainObject(o) {
329
329
  function shallowClone(o) {
330
330
  if (isPlainObject(o)) return { ...o };
331
331
  if (Array.isArray(o)) return [...o];
332
+ if (o instanceof Map) return new Map(o);
333
+ if (o instanceof Set) return new Set(o);
332
334
  return o;
333
335
  }
334
- const propertyKeyTypes = /* @__PURE__ */ new Set([
336
+ const propertyKeyTypes = /* @__PURE__*/ new Set([
335
337
  "string",
336
338
  "number",
337
339
  "symbol"
@@ -435,6 +437,7 @@ function safeExtend(schema, shape) {
435
437
  } }));
436
438
  }
437
439
  function merge(a, b) {
440
+ if (a._zod.def.checks?.length) throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");
438
441
  return clone(a, mergeDefs(a._zod.def, {
439
442
  get shape() {
440
443
  const _shape = {
@@ -447,7 +450,7 @@ function merge(a, b) {
447
450
  get catchall() {
448
451
  return b._zod.def.catchall;
449
452
  },
450
- checks: []
453
+ checks: b._zod.def.checks ?? []
451
454
  }));
452
455
  }
453
456
  function partial(Class, schema, mask) {
@@ -500,6 +503,11 @@ function aborted(x, startIndex = 0) {
500
503
  for (let i = startIndex; i < x.issues.length; i++) if (x.issues[i]?.continue !== true) return true;
501
504
  return false;
502
505
  }
506
+ function explicitlyAborted(x, startIndex = 0) {
507
+ if (x.aborted === true) return true;
508
+ for (let i = startIndex; i < x.issues.length; i++) if (x.issues[i]?.continue === false) return true;
509
+ return false;
510
+ }
503
511
  function prefixIssues(path, issues) {
504
512
  return issues.map((iss) => {
505
513
  var _a;
@@ -512,15 +520,12 @@ function unwrapMessage(message) {
512
520
  return typeof message === "string" ? message : message?.message;
513
521
  }
514
522
  function finalizeIssue(iss, ctx, config) {
515
- const full = {
516
- ...iss,
517
- path: iss.path ?? []
518
- };
519
- if (!iss.message) full.message = unwrapMessage(iss.inst?._zod.def?.error?.(iss)) ?? unwrapMessage(ctx?.error?.(iss)) ?? unwrapMessage(config.customError?.(iss)) ?? unwrapMessage(config.localeError?.(iss)) ?? "Invalid input";
520
- delete full.inst;
521
- delete full.continue;
522
- if (!ctx?.reportInput) delete full.input;
523
- return full;
523
+ const message = iss.message ? iss.message : unwrapMessage(iss.inst?._zod.def?.error?.(iss)) ?? unwrapMessage(ctx?.error?.(iss)) ?? unwrapMessage(config.customError?.(iss)) ?? unwrapMessage(config.localeError?.(iss)) ?? "Invalid input";
524
+ const { inst: _inst, continue: _continue, input: _input, ...rest } = iss;
525
+ rest.path ?? (rest.path = []);
526
+ rest.message = message;
527
+ if (ctx?.reportInput) rest.input = _input;
528
+ return rest;
524
529
  }
525
530
  function getLengthableOrigin(input) {
526
531
  if (Array.isArray(input)) return "array";
@@ -538,7 +543,7 @@ function issue(...args) {
538
543
  return { ...iss };
539
544
  }
540
545
  //#endregion
541
- //#region ../../node_modules/.pnpm/zod@4.3.2/node_modules/zod/v4/core/errors.js
546
+ //#region ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/errors.js
542
547
  const initializer$1 = (inst, def) => {
543
548
  inst.name = "$ZodError";
544
549
  Object.defineProperty(inst, "_zod", {
@@ -571,23 +576,26 @@ function flattenError(error, mapper = (issue) => issue.message) {
571
576
  }
572
577
  function formatError(error, mapper = (issue) => issue.message) {
573
578
  const fieldErrors = { _errors: [] };
574
- const processError = (error) => {
575
- for (const issue of error.issues) if (issue.code === "invalid_union" && issue.errors.length) issue.errors.map((issues) => processError({ issues }));
576
- else if (issue.code === "invalid_key") processError({ issues: issue.issues });
577
- else if (issue.code === "invalid_element") processError({ issues: issue.issues });
578
- else if (issue.path.length === 0) fieldErrors._errors.push(mapper(issue));
579
+ const processError = (error, path = []) => {
580
+ for (const issue of error.issues) if (issue.code === "invalid_union" && issue.errors.length) issue.errors.map((issues) => processError({ issues }, [...path, ...issue.path]));
581
+ else if (issue.code === "invalid_key") processError({ issues: issue.issues }, [...path, ...issue.path]);
582
+ else if (issue.code === "invalid_element") processError({ issues: issue.issues }, [...path, ...issue.path]);
579
583
  else {
580
- let curr = fieldErrors;
581
- let i = 0;
582
- while (i < issue.path.length) {
583
- const el = issue.path[i];
584
- if (!(i === issue.path.length - 1)) curr[el] = curr[el] || { _errors: [] };
585
- else {
586
- curr[el] = curr[el] || { _errors: [] };
587
- curr[el]._errors.push(mapper(issue));
584
+ const fullpath = [...path, ...issue.path];
585
+ if (fullpath.length === 0) fieldErrors._errors.push(mapper(issue));
586
+ else {
587
+ let curr = fieldErrors;
588
+ let i = 0;
589
+ while (i < fullpath.length) {
590
+ const el = fullpath[i];
591
+ if (!(i === fullpath.length - 1)) curr[el] = curr[el] || { _errors: [] };
592
+ else {
593
+ curr[el] = curr[el] || { _errors: [] };
594
+ curr[el]._errors.push(mapper(issue));
595
+ }
596
+ curr = curr[el];
597
+ i++;
588
598
  }
589
- curr = curr[el];
590
- i++;
591
599
  }
592
600
  }
593
601
  };
@@ -595,9 +603,12 @@ function formatError(error, mapper = (issue) => issue.message) {
595
603
  return fieldErrors;
596
604
  }
597
605
  //#endregion
598
- //#region ../../node_modules/.pnpm/zod@4.3.2/node_modules/zod/v4/core/parse.js
606
+ //#region ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/parse.js
599
607
  const _parse = (_Err) => (schema, value, _ctx, _params) => {
600
- const ctx = _ctx ? Object.assign(_ctx, { async: false }) : { async: false };
608
+ const ctx = _ctx ? {
609
+ ..._ctx,
610
+ async: false
611
+ } : { async: false };
601
612
  const result = schema._zod.run({
602
613
  value,
603
614
  issues: []
@@ -611,7 +622,10 @@ const _parse = (_Err) => (schema, value, _ctx, _params) => {
611
622
  return result.value;
612
623
  };
613
624
  const _parseAsync = (_Err) => async (schema, value, _ctx, params) => {
614
- const ctx = _ctx ? Object.assign(_ctx, { async: true }) : { async: true };
625
+ const ctx = _ctx ? {
626
+ ..._ctx,
627
+ async: true
628
+ } : { async: true };
615
629
  let result = schema._zod.run({
616
630
  value,
617
631
  issues: []
@@ -644,7 +658,10 @@ const _safeParse = (_Err) => (schema, value, _ctx) => {
644
658
  };
645
659
  const safeParse$1 = /* @__PURE__*/ _safeParse($ZodRealError);
646
660
  const _safeParseAsync = (_Err) => async (schema, value, _ctx) => {
647
- const ctx = _ctx ? Object.assign(_ctx, { async: true }) : { async: true };
661
+ const ctx = _ctx ? {
662
+ ..._ctx,
663
+ async: true
664
+ } : { async: true };
648
665
  let result = schema._zod.run({
649
666
  value,
650
667
  issues: []
@@ -660,36 +677,53 @@ const _safeParseAsync = (_Err) => async (schema, value, _ctx) => {
660
677
  };
661
678
  const safeParseAsync$1 = /* @__PURE__*/ _safeParseAsync($ZodRealError);
662
679
  const _encode = (_Err) => (schema, value, _ctx) => {
663
- const ctx = _ctx ? Object.assign(_ctx, { direction: "backward" }) : { direction: "backward" };
680
+ const ctx = _ctx ? {
681
+ ..._ctx,
682
+ direction: "backward"
683
+ } : { direction: "backward" };
664
684
  return _parse(_Err)(schema, value, ctx);
665
685
  };
666
686
  const _decode = (_Err) => (schema, value, _ctx) => {
667
687
  return _parse(_Err)(schema, value, _ctx);
668
688
  };
669
689
  const _encodeAsync = (_Err) => async (schema, value, _ctx) => {
670
- const ctx = _ctx ? Object.assign(_ctx, { direction: "backward" }) : { direction: "backward" };
690
+ const ctx = _ctx ? {
691
+ ..._ctx,
692
+ direction: "backward"
693
+ } : { direction: "backward" };
671
694
  return _parseAsync(_Err)(schema, value, ctx);
672
695
  };
673
696
  const _decodeAsync = (_Err) => async (schema, value, _ctx) => {
674
697
  return _parseAsync(_Err)(schema, value, _ctx);
675
698
  };
676
699
  const _safeEncode = (_Err) => (schema, value, _ctx) => {
677
- const ctx = _ctx ? Object.assign(_ctx, { direction: "backward" }) : { direction: "backward" };
700
+ const ctx = _ctx ? {
701
+ ..._ctx,
702
+ direction: "backward"
703
+ } : { direction: "backward" };
678
704
  return _safeParse(_Err)(schema, value, ctx);
679
705
  };
680
706
  const _safeDecode = (_Err) => (schema, value, _ctx) => {
681
707
  return _safeParse(_Err)(schema, value, _ctx);
682
708
  };
683
709
  const _safeEncodeAsync = (_Err) => async (schema, value, _ctx) => {
684
- const ctx = _ctx ? Object.assign(_ctx, { direction: "backward" }) : { direction: "backward" };
710
+ const ctx = _ctx ? {
711
+ ..._ctx,
712
+ direction: "backward"
713
+ } : { direction: "backward" };
685
714
  return _safeParseAsync(_Err)(schema, value, ctx);
686
715
  };
687
716
  const _safeDecodeAsync = (_Err) => async (schema, value, _ctx) => {
688
717
  return _safeParseAsync(_Err)(schema, value, _ctx);
689
718
  };
690
719
  //#endregion
691
- //#region ../../node_modules/.pnpm/zod@4.3.2/node_modules/zod/v4/core/regexes.js
692
- const cuid = /^[cC][^\s-]{8,}$/;
720
+ //#region ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/regexes.js
721
+ /**
722
+ * @deprecated CUID v1 is deprecated by its authors due to information leakage
723
+ * (timestamps embedded in the id). Use {@link cuid2} instead.
724
+ * See https://github.com/paralleldrive/cuid.
725
+ */
726
+ const cuid = /^[cC][0-9a-z]{6,}$/;
693
727
  const cuid2 = /^[0-9a-z]+$/;
694
728
  const ulid = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/;
695
729
  const xid = /^[0-9a-vA-V]{20}$/;
@@ -718,6 +752,7 @@ const cidrv4 = /^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-
718
752
  const cidrv6 = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/;
719
753
  const base64 = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/;
720
754
  const base64url = /^[A-Za-z0-9_-]*$/;
755
+ const httpProtocol = /^https?$/;
721
756
  const e164 = /^\+[1-9]\d{6,14}$/;
722
757
  const dateSource = `(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))`;
723
758
  const date$1 = /*@__PURE__*/ new RegExp(`^${dateSource}$`);
@@ -747,7 +782,7 @@ const _null$2 = /^null$/i;
747
782
  const lowercase = /^[^A-Z]*$/;
748
783
  const uppercase = /^[^a-z]*$/;
749
784
  //#endregion
750
- //#region ../../node_modules/.pnpm/zod@4.3.2/node_modules/zod/v4/core/checks.js
785
+ //#region ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/checks.js
751
786
  const $ZodCheck = /*@__PURE__*/ $constructor("$ZodCheck", (inst, def) => {
752
787
  var _a;
753
788
  inst._zod ?? (inst._zod = {});
@@ -765,8 +800,10 @@ const $ZodCheckLessThan = /*@__PURE__*/ $constructor("$ZodCheckLessThan", (inst,
765
800
  inst._zod.onattach.push((inst) => {
766
801
  const bag = inst._zod.bag;
767
802
  const curr = (def.inclusive ? bag.maximum : bag.exclusiveMaximum) ?? Number.POSITIVE_INFINITY;
768
- if (def.value < curr) if (def.inclusive) bag.maximum = def.value;
769
- else bag.exclusiveMaximum = def.value;
803
+ if (def.value < curr) {
804
+ if (def.inclusive) bag.maximum = def.value;
805
+ else bag.exclusiveMaximum = def.value;
806
+ }
770
807
  });
771
808
  inst._zod.check = (payload) => {
772
809
  if (def.inclusive ? payload.value <= def.value : payload.value < def.value) return;
@@ -787,8 +824,10 @@ const $ZodCheckGreaterThan = /*@__PURE__*/ $constructor("$ZodCheckGreaterThan",
787
824
  inst._zod.onattach.push((inst) => {
788
825
  const bag = inst._zod.bag;
789
826
  const curr = (def.inclusive ? bag.minimum : bag.exclusiveMinimum) ?? Number.NEGATIVE_INFINITY;
790
- if (def.value > curr) if (def.inclusive) bag.minimum = def.value;
791
- else bag.exclusiveMinimum = def.value;
827
+ if (def.value > curr) {
828
+ if (def.inclusive) bag.minimum = def.value;
829
+ else bag.exclusiveMinimum = def.value;
830
+ }
792
831
  });
793
832
  inst._zod.check = (payload) => {
794
833
  if (def.inclusive ? payload.value >= def.value : payload.value > def.value) return;
@@ -1105,7 +1144,7 @@ const $ZodCheckOverwrite = /*@__PURE__*/ $constructor("$ZodCheckOverwrite", (ins
1105
1144
  };
1106
1145
  });
1107
1146
  //#endregion
1108
- //#region ../../node_modules/.pnpm/zod@4.3.2/node_modules/zod/v4/core/doc.js
1147
+ //#region ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/doc.js
1109
1148
  var Doc = class {
1110
1149
  constructor(args = []) {
1111
1150
  this.content = [];
@@ -1136,14 +1175,14 @@ var Doc = class {
1136
1175
  }
1137
1176
  };
1138
1177
  //#endregion
1139
- //#region ../../node_modules/.pnpm/zod@4.3.2/node_modules/zod/v4/core/versions.js
1178
+ //#region ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/versions.js
1140
1179
  const version = {
1141
1180
  major: 4,
1142
- minor: 3,
1143
- patch: 2
1181
+ minor: 4,
1182
+ patch: 3
1144
1183
  };
1145
1184
  //#endregion
1146
- //#region ../../node_modules/.pnpm/zod@4.3.2/node_modules/zod/v4/core/schemas.js
1185
+ //#region ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/schemas.js
1147
1186
  const $ZodType = /*@__PURE__*/ $constructor("$ZodType", (inst, def) => {
1148
1187
  var _a;
1149
1188
  inst ?? (inst = {});
@@ -1164,6 +1203,7 @@ const $ZodType = /*@__PURE__*/ $constructor("$ZodType", (inst, def) => {
1164
1203
  let asyncResult;
1165
1204
  for (const ch of checks) {
1166
1205
  if (ch._zod.def.when) {
1206
+ if (explicitlyAborted(payload)) continue;
1167
1207
  if (!ch._zod.def.when(payload)) continue;
1168
1208
  } else if (isAborted) continue;
1169
1209
  const currLen = payload.issues.length;
@@ -1283,6 +1323,19 @@ const $ZodURL = /*@__PURE__*/ $constructor("$ZodURL", (inst, def) => {
1283
1323
  inst._zod.check = (payload) => {
1284
1324
  try {
1285
1325
  const trimmed = payload.value.trim();
1326
+ if (!def.normalize && def.protocol?.source === httpProtocol.source) {
1327
+ if (!/^https?:\/\//i.test(trimmed)) {
1328
+ payload.issues.push({
1329
+ code: "invalid_format",
1330
+ format: "url",
1331
+ note: "Invalid URL format",
1332
+ input: payload.value,
1333
+ inst,
1334
+ continue: !def.abort
1335
+ });
1336
+ return;
1337
+ }
1338
+ }
1286
1339
  const url = new URL(trimmed);
1287
1340
  if (def.hostname) {
1288
1341
  def.hostname.lastIndex = 0;
@@ -1330,6 +1383,11 @@ const $ZodNanoID = /*@__PURE__*/ $constructor("$ZodNanoID", (inst, def) => {
1330
1383
  def.pattern ?? (def.pattern = nanoid);
1331
1384
  $ZodStringFormat.init(inst, def);
1332
1385
  });
1386
+ /**
1387
+ * @deprecated CUID v1 is deprecated by its authors due to information leakage
1388
+ * (timestamps embedded in the id). Use {@link $ZodCUID2} instead.
1389
+ * See https://github.com/paralleldrive/cuid.
1390
+ */
1333
1391
  const $ZodCUID = /*@__PURE__*/ $constructor("$ZodCUID", (inst, def) => {
1334
1392
  def.pattern ?? (def.pattern = cuid);
1335
1393
  $ZodStringFormat.init(inst, def);
@@ -1419,6 +1477,7 @@ const $ZodCIDRv6 = /*@__PURE__*/ $constructor("$ZodCIDRv6", (inst, def) => {
1419
1477
  });
1420
1478
  function isValidBase64(data) {
1421
1479
  if (data === "") return true;
1480
+ if (/\s/.test(data)) return false;
1422
1481
  if (data.length % 4 !== 0) return false;
1423
1482
  try {
1424
1483
  atob(data);
@@ -1604,13 +1663,23 @@ const $ZodArray = /*@__PURE__*/ $constructor("$ZodArray", (inst, def) => {
1604
1663
  return payload;
1605
1664
  };
1606
1665
  });
1607
- function handlePropertyResult(result, final, key, input, isOptionalOut) {
1666
+ function handlePropertyResult(result, final, key, input, isOptionalIn, isOptionalOut) {
1667
+ const isPresent = key in input;
1608
1668
  if (result.issues.length) {
1609
- if (isOptionalOut && !(key in input)) return;
1669
+ if (isOptionalIn && isOptionalOut && !isPresent) return;
1610
1670
  final.issues.push(...prefixIssues(key, result.issues));
1611
1671
  }
1672
+ if (!isPresent && !isOptionalIn) {
1673
+ if (!result.issues.length) final.issues.push({
1674
+ code: "invalid_type",
1675
+ expected: "nonoptional",
1676
+ input: void 0,
1677
+ path: [key]
1678
+ });
1679
+ return;
1680
+ }
1612
1681
  if (result.value === void 0) {
1613
- if (key in input) final.value[key] = void 0;
1682
+ if (isPresent) final.value[key] = void 0;
1614
1683
  } else final.value[key] = result.value;
1615
1684
  }
1616
1685
  function normalizeDef(def) {
@@ -1630,8 +1699,10 @@ function handleCatchall(proms, input, payload, ctx, def, inst) {
1630
1699
  const keySet = def.keySet;
1631
1700
  const _catchall = def.catchall._zod;
1632
1701
  const t = _catchall.def.type;
1702
+ const isOptionalIn = _catchall.optin === "optional";
1633
1703
  const isOptionalOut = _catchall.optout === "optional";
1634
1704
  for (const key in input) {
1705
+ if (key === "__proto__") continue;
1635
1706
  if (keySet.has(key)) continue;
1636
1707
  if (t === "never") {
1637
1708
  unrecognized.push(key);
@@ -1641,8 +1712,8 @@ function handleCatchall(proms, input, payload, ctx, def, inst) {
1641
1712
  value: input[key],
1642
1713
  issues: []
1643
1714
  }, ctx);
1644
- if (r instanceof Promise) proms.push(r.then((r) => handlePropertyResult(r, payload, key, input, isOptionalOut)));
1645
- else handlePropertyResult(r, payload, key, input, isOptionalOut);
1715
+ if (r instanceof Promise) proms.push(r.then((r) => handlePropertyResult(r, payload, key, input, isOptionalIn, isOptionalOut)));
1716
+ else handlePropertyResult(r, payload, key, input, isOptionalIn, isOptionalOut);
1646
1717
  }
1647
1718
  if (unrecognized.length) payload.issues.push({
1648
1719
  code: "unrecognized_keys",
@@ -1698,13 +1769,14 @@ const $ZodObject = /*@__PURE__*/ $constructor("$ZodObject", (inst, def) => {
1698
1769
  const shape = value.shape;
1699
1770
  for (const key of value.keys) {
1700
1771
  const el = shape[key];
1772
+ const isOptionalIn = el._zod.optin === "optional";
1701
1773
  const isOptionalOut = el._zod.optout === "optional";
1702
1774
  const r = el._zod.run({
1703
1775
  value: input[key],
1704
1776
  issues: []
1705
1777
  }, ctx);
1706
- if (r instanceof Promise) proms.push(r.then((r) => handlePropertyResult(r, payload, key, input, isOptionalOut)));
1707
- else handlePropertyResult(r, payload, key, input, isOptionalOut);
1778
+ if (r instanceof Promise) proms.push(r.then((r) => handlePropertyResult(r, payload, key, input, isOptionalIn, isOptionalOut)));
1779
+ else handlePropertyResult(r, payload, key, input, isOptionalIn, isOptionalOut);
1708
1780
  }
1709
1781
  if (!catchall) return proms.length ? Promise.all(proms).then(() => payload) : payload;
1710
1782
  return handleCatchall(proms, input, payload, ctx, _normalized.value, inst);
@@ -1733,9 +1805,11 @@ const $ZodObjectJIT = /*@__PURE__*/ $constructor("$ZodObjectJIT", (inst, def) =>
1733
1805
  for (const key of normalized.keys) {
1734
1806
  const id = ids[key];
1735
1807
  const k = esc(key);
1736
- const isOptionalOut = shape[key]?._zod?.optout === "optional";
1808
+ const schema = shape[key];
1809
+ const isOptionalIn = schema?._zod?.optin === "optional";
1810
+ const isOptionalOut = schema?._zod?.optout === "optional";
1737
1811
  doc.write(`const ${id} = ${parseStr(key)};`);
1738
- if (isOptionalOut) doc.write(`
1812
+ if (isOptionalIn && isOptionalOut) doc.write(`
1739
1813
  if (${id}.issues.length) {
1740
1814
  if (${k} in input) {
1741
1815
  payload.issues = payload.issues.concat(${id}.issues.map(iss => ({
@@ -1753,6 +1827,32 @@ const $ZodObjectJIT = /*@__PURE__*/ $constructor("$ZodObjectJIT", (inst, def) =>
1753
1827
  newResult[${k}] = ${id}.value;
1754
1828
  }
1755
1829
 
1830
+ `);
1831
+ else if (!isOptionalIn) doc.write(`
1832
+ const ${id}_present = ${k} in input;
1833
+ if (${id}.issues.length) {
1834
+ payload.issues = payload.issues.concat(${id}.issues.map(iss => ({
1835
+ ...iss,
1836
+ path: iss.path ? [${k}, ...iss.path] : [${k}]
1837
+ })));
1838
+ }
1839
+ if (!${id}_present && !${id}.issues.length) {
1840
+ payload.issues.push({
1841
+ code: "invalid_type",
1842
+ expected: "nonoptional",
1843
+ input: undefined,
1844
+ path: [${k}]
1845
+ });
1846
+ }
1847
+
1848
+ if (${id}_present) {
1849
+ if (${id}.value === undefined) {
1850
+ newResult[${k}] = undefined;
1851
+ } else {
1852
+ newResult[${k}] = ${id}.value;
1853
+ }
1854
+ }
1855
+
1756
1856
  `);
1757
1857
  else doc.write(`
1758
1858
  if (${id}.issues.length) {
@@ -1835,10 +1935,9 @@ const $ZodUnion = /*@__PURE__*/ $constructor("$ZodUnion", (inst, def) => {
1835
1935
  return new RegExp(`^(${patterns.map((p) => cleanRegex(p.source)).join("|")})$`);
1836
1936
  }
1837
1937
  });
1838
- const single = def.options.length === 1;
1839
- const first = def.options[0]._zod.run;
1938
+ const first = def.options.length === 1 ? def.options[0]._zod.run : null;
1840
1939
  inst._zod.parse = (payload, ctx) => {
1841
- if (single) return first(payload, ctx);
1940
+ if (first) return first(payload, ctx);
1842
1941
  let async = false;
1843
1942
  const results = [];
1844
1943
  for (const option of def.options) {
@@ -1979,20 +2078,23 @@ const $ZodEnum = /*@__PURE__*/ $constructor("$ZodEnum", (inst, def) => {
1979
2078
  });
1980
2079
  const $ZodTransform = /*@__PURE__*/ $constructor("$ZodTransform", (inst, def) => {
1981
2080
  $ZodType.init(inst, def);
2081
+ inst._zod.optin = "optional";
1982
2082
  inst._zod.parse = (payload, ctx) => {
1983
2083
  if (ctx.direction === "backward") throw new $ZodEncodeError(inst.constructor.name);
1984
2084
  const _out = def.transform(payload.value, payload);
1985
2085
  if (ctx.async) return (_out instanceof Promise ? _out : Promise.resolve(_out)).then((output) => {
1986
2086
  payload.value = output;
2087
+ payload.fallback = true;
1987
2088
  return payload;
1988
2089
  });
1989
2090
  if (_out instanceof Promise) throw new $ZodAsyncError();
1990
2091
  payload.value = _out;
2092
+ payload.fallback = true;
1991
2093
  return payload;
1992
2094
  };
1993
2095
  });
1994
2096
  function handleOptionalResult(result, input) {
1995
- if (result.issues.length && input === void 0) return {
2097
+ if (input === void 0 && (result.issues.length || result.fallback)) return {
1996
2098
  issues: [],
1997
2099
  value: void 0
1998
2100
  };
@@ -2011,9 +2113,10 @@ const $ZodOptional = /*@__PURE__*/ $constructor("$ZodOptional", (inst, def) => {
2011
2113
  });
2012
2114
  inst._zod.parse = (payload, ctx) => {
2013
2115
  if (def.innerType._zod.optin === "optional") {
2116
+ const input = payload.value;
2014
2117
  const result = def.innerType._zod.run(payload, ctx);
2015
- if (result instanceof Promise) return result.then((r) => handleOptionalResult(r, payload.value));
2016
- return handleOptionalResult(result, payload.value);
2118
+ if (result instanceof Promise) return result.then((r) => handleOptionalResult(r, input));
2119
+ return handleOptionalResult(result, input);
2017
2120
  }
2018
2121
  if (payload.value === void 0) return payload;
2019
2122
  return def.innerType._zod.run(payload, ctx);
@@ -2098,7 +2201,7 @@ function handleNonOptionalResult(payload, inst) {
2098
2201
  }
2099
2202
  const $ZodCatch = /*@__PURE__*/ $constructor("$ZodCatch", (inst, def) => {
2100
2203
  $ZodType.init(inst, def);
2101
- defineLazy(inst._zod, "optin", () => def.innerType._zod.optin);
2204
+ inst._zod.optin = "optional";
2102
2205
  defineLazy(inst._zod, "optout", () => def.innerType._zod.optout);
2103
2206
  defineLazy(inst._zod, "values", () => def.innerType._zod.values);
2104
2207
  inst._zod.parse = (payload, ctx) => {
@@ -2113,6 +2216,7 @@ const $ZodCatch = /*@__PURE__*/ $constructor("$ZodCatch", (inst, def) => {
2113
2216
  input: payload.value
2114
2217
  });
2115
2218
  payload.issues = [];
2219
+ payload.fallback = true;
2116
2220
  }
2117
2221
  return payload;
2118
2222
  });
@@ -2124,6 +2228,7 @@ const $ZodCatch = /*@__PURE__*/ $constructor("$ZodCatch", (inst, def) => {
2124
2228
  input: payload.value
2125
2229
  });
2126
2230
  payload.issues = [];
2231
+ payload.fallback = true;
2127
2232
  }
2128
2233
  return payload;
2129
2234
  };
@@ -2152,7 +2257,8 @@ function handlePipeResult(left, next, ctx) {
2152
2257
  }
2153
2258
  return next._zod.run({
2154
2259
  value: left.value,
2155
- issues: left.issues
2260
+ issues: left.issues,
2261
+ fallback: left.fallback
2156
2262
  }, ctx);
2157
2263
  }
2158
2264
  const $ZodReadonly = /*@__PURE__*/ $constructor("$ZodReadonly", (inst, def) => {
@@ -2174,7 +2280,11 @@ function handleReadonlyResult(payload) {
2174
2280
  }
2175
2281
  const $ZodLazy = /*@__PURE__*/ $constructor("$ZodLazy", (inst, def) => {
2176
2282
  $ZodType.init(inst, def);
2177
- defineLazy(inst._zod, "innerType", () => def.getter());
2283
+ defineLazy(inst._zod, "innerType", () => {
2284
+ const d = def;
2285
+ if (!d._cachedInner) d._cachedInner = def.getter();
2286
+ return d._cachedInner;
2287
+ });
2178
2288
  defineLazy(inst._zod, "pattern", () => inst._zod.innerType?._zod?.pattern);
2179
2289
  defineLazy(inst._zod, "propValues", () => inst._zod.innerType?._zod?.propValues);
2180
2290
  defineLazy(inst._zod, "optin", () => inst._zod.innerType?._zod?.optin ?? void 0);
@@ -2210,7 +2320,7 @@ function handleRefineResult(result, payload, input, inst) {
2210
2320
  }
2211
2321
  }
2212
2322
  //#endregion
2213
- //#region ../../node_modules/.pnpm/zod@4.3.2/node_modules/zod/v4/core/registries.js
2323
+ //#region ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/registries.js
2214
2324
  var _a;
2215
2325
  var $ZodRegistry = class {
2216
2326
  constructor() {
@@ -2257,7 +2367,7 @@ function registry() {
2257
2367
  (_a = globalThis).__zod_globalRegistry ?? (_a.__zod_globalRegistry = registry());
2258
2368
  const globalRegistry = globalThis.__zod_globalRegistry;
2259
2369
  //#endregion
2260
- //#region ../../node_modules/.pnpm/zod@4.3.2/node_modules/zod/v4/core/api.js
2370
+ //#region ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/api.js
2261
2371
  // @__NO_SIDE_EFFECTS__
2262
2372
  function _string(Class, params) {
2263
2373
  return new Class({
@@ -2358,6 +2468,11 @@ function _nanoid(Class, params) {
2358
2468
  ...normalizeParams(params)
2359
2469
  });
2360
2470
  }
2471
+ /**
2472
+ * @deprecated CUID v1 is deprecated by its authors due to information leakage
2473
+ * (timestamps embedded in the id). Use {@link _cuid2} instead.
2474
+ * See https://github.com/paralleldrive/cuid.
2475
+ */
2361
2476
  // @__NO_SIDE_EFFECTS__
2362
2477
  function _cuid(Class, params) {
2363
2478
  return new Class({
@@ -2740,7 +2855,7 @@ function _refine(Class, fn, _params) {
2740
2855
  });
2741
2856
  }
2742
2857
  // @__NO_SIDE_EFFECTS__
2743
- function _superRefine(fn) {
2858
+ function _superRefine(fn, params) {
2744
2859
  const ch = /* @__PURE__ */ _check((payload) => {
2745
2860
  payload.addIssue = (issue$2) => {
2746
2861
  if (typeof issue$2 === "string") payload.issues.push(issue(issue$2, payload.value, ch._zod.def));
@@ -2755,7 +2870,7 @@ function _superRefine(fn) {
2755
2870
  }
2756
2871
  };
2757
2872
  return fn(payload.value, payload);
2758
- });
2873
+ }, params);
2759
2874
  return ch;
2760
2875
  }
2761
2876
  // @__NO_SIDE_EFFECTS__
@@ -2768,7 +2883,7 @@ function _check(fn, params) {
2768
2883
  return ch;
2769
2884
  }
2770
2885
  //#endregion
2771
- //#region ../../node_modules/.pnpm/zod@4.3.2/node_modules/zod/v4/core/to-json-schema.js
2886
+ //#region ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/to-json-schema.js
2772
2887
  function initializeContext(params) {
2773
2888
  let target = params?.target ?? "draft-2020-12";
2774
2889
  if (target === "draft-4") target = "draft-04";
@@ -2834,7 +2949,7 @@ function process(schema, ctx, _params = {
2834
2949
  delete result.schema.examples;
2835
2950
  delete result.schema.default;
2836
2951
  }
2837
- if (ctx.io === "input" && result.schema._prefault) (_a = result.schema).default ?? (_a.default = result.schema._prefault);
2952
+ if (ctx.io === "input" && "_prefault" in result.schema) (_a = result.schema).default ?? (_a.default = result.schema._prefault);
2838
2953
  delete result.schema._prefault;
2839
2954
  return ctx.seen.get(schema).schema;
2840
2955
  }
@@ -2939,7 +3054,7 @@ function finalize(ctx, schema) {
2939
3054
  if (key === "$ref" || key === "allOf") continue;
2940
3055
  if (!(key in _cached)) delete schema[key];
2941
3056
  }
2942
- if (refSchema.$ref) for (const key in schema) {
3057
+ if (refSchema.$ref && refSeen.def) for (const key in schema) {
2943
3058
  if (key === "$ref" || key === "allOf") continue;
2944
3059
  if (key in refSeen.def && JSON.stringify(schema[key]) === JSON.stringify(refSeen.def[key])) delete schema[key];
2945
3060
  }
@@ -2974,13 +3089,20 @@ function finalize(ctx, schema) {
2974
3089
  result.$id = ctx.external.uri(id);
2975
3090
  }
2976
3091
  Object.assign(result, root.def ?? root.schema);
3092
+ const rootMetaId = ctx.metadataRegistry.get(schema)?.id;
3093
+ if (rootMetaId !== void 0 && result.id === rootMetaId) delete result.id;
2977
3094
  const defs = ctx.external?.defs ?? {};
2978
3095
  for (const entry of ctx.seen.entries()) {
2979
3096
  const seen = entry[1];
2980
- if (seen.def && seen.defId) defs[seen.defId] = seen.def;
3097
+ if (seen.def && seen.defId) {
3098
+ if (seen.def.id === seen.defId) delete seen.def.id;
3099
+ defs[seen.defId] = seen.def;
3100
+ }
3101
+ }
3102
+ if (ctx.external) {} else if (Object.keys(defs).length > 0) {
3103
+ if (ctx.target === "draft-2020-12") result.$defs = defs;
3104
+ else result.definitions = defs;
2981
3105
  }
2982
- if (ctx.external) {} else if (Object.keys(defs).length > 0) if (ctx.target === "draft-2020-12") result.$defs = defs;
2983
- else result.definitions = defs;
2984
3106
  try {
2985
3107
  const finalized = JSON.parse(JSON.stringify(result));
2986
3108
  Object.defineProperty(finalized, "~standard", {
@@ -3011,7 +3133,10 @@ function isTransforming(_schema, _ctx) {
3011
3133
  if (def.type === "promise" || def.type === "optional" || def.type === "nonoptional" || def.type === "nullable" || def.type === "readonly" || def.type === "default" || def.type === "prefault") return isTransforming(def.innerType, ctx);
3012
3134
  if (def.type === "intersection") return isTransforming(def.left, ctx) || isTransforming(def.right, ctx);
3013
3135
  if (def.type === "record" || def.type === "map") return isTransforming(def.keyType, ctx) || isTransforming(def.valueType, ctx);
3014
- if (def.type === "pipe") return isTransforming(def.in, ctx) || isTransforming(def.out, ctx);
3136
+ if (def.type === "pipe") {
3137
+ if (_schema._zod.traits.has("$ZodCodec")) return true;
3138
+ return isTransforming(def.in, ctx) || isTransforming(def.out, ctx);
3139
+ }
3015
3140
  if (def.type === "object") {
3016
3141
  for (const key in def.shape) if (isTransforming(def.shape[key], ctx)) return true;
3017
3142
  return false;
@@ -3053,7 +3178,7 @@ const createStandardJSONSchemaMethod = (schema, io, processors = {}) => (params)
3053
3178
  return finalize(ctx, schema);
3054
3179
  };
3055
3180
  //#endregion
3056
- //#region ../../node_modules/.pnpm/zod@4.3.2/node_modules/zod/v4/core/json-schema-processors.js
3181
+ //#region ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/json-schema-processors.js
3057
3182
  const formatMap = {
3058
3183
  guid: "uuid",
3059
3184
  url: "uri",
@@ -3087,24 +3212,21 @@ const numberProcessor = (schema, ctx, _json, _params) => {
3087
3212
  const { minimum, maximum, format, multipleOf, exclusiveMaximum, exclusiveMinimum } = schema._zod.bag;
3088
3213
  if (typeof format === "string" && format.includes("int")) json.type = "integer";
3089
3214
  else json.type = "number";
3090
- if (typeof exclusiveMinimum === "number") if (ctx.target === "draft-04" || ctx.target === "openapi-3.0") {
3091
- json.minimum = exclusiveMinimum;
3092
- json.exclusiveMinimum = true;
3093
- } else json.exclusiveMinimum = exclusiveMinimum;
3094
- if (typeof minimum === "number") {
3095
- json.minimum = minimum;
3096
- if (typeof exclusiveMinimum === "number" && ctx.target !== "draft-04") if (exclusiveMinimum >= minimum) delete json.minimum;
3097
- else delete json.exclusiveMinimum;
3098
- }
3099
- if (typeof exclusiveMaximum === "number") if (ctx.target === "draft-04" || ctx.target === "openapi-3.0") {
3100
- json.maximum = exclusiveMaximum;
3101
- json.exclusiveMaximum = true;
3102
- } else json.exclusiveMaximum = exclusiveMaximum;
3103
- if (typeof maximum === "number") {
3104
- json.maximum = maximum;
3105
- if (typeof exclusiveMaximum === "number" && ctx.target !== "draft-04") if (exclusiveMaximum <= maximum) delete json.maximum;
3106
- else delete json.exclusiveMaximum;
3107
- }
3215
+ const exMin = typeof exclusiveMinimum === "number" && exclusiveMinimum >= (minimum ?? Number.NEGATIVE_INFINITY);
3216
+ const exMax = typeof exclusiveMaximum === "number" && exclusiveMaximum <= (maximum ?? Number.POSITIVE_INFINITY);
3217
+ const legacy = ctx.target === "draft-04" || ctx.target === "openapi-3.0";
3218
+ if (exMin) {
3219
+ if (legacy) {
3220
+ json.minimum = exclusiveMinimum;
3221
+ json.exclusiveMinimum = true;
3222
+ } else json.exclusiveMinimum = exclusiveMinimum;
3223
+ } else if (typeof minimum === "number") json.minimum = minimum;
3224
+ if (exMax) {
3225
+ if (legacy) {
3226
+ json.maximum = exclusiveMaximum;
3227
+ json.exclusiveMaximum = true;
3228
+ } else json.exclusiveMaximum = exclusiveMaximum;
3229
+ } else if (typeof maximum === "number") json.maximum = maximum;
3108
3230
  if (typeof multipleOf === "number") json.multipleOf = multipleOf;
3109
3231
  };
3110
3232
  const booleanProcessor = (_schema, _ctx, json, _params) => {
@@ -3253,7 +3375,8 @@ const catchProcessor = (schema, ctx, json, params) => {
3253
3375
  };
3254
3376
  const pipeProcessor = (schema, ctx, _json, params) => {
3255
3377
  const def = schema._zod.def;
3256
- const innerType = ctx.io === "input" ? def.in._zod.def.type === "transform" ? def.out : def.in : def.out;
3378
+ const inIsTransform = def.in._zod.traits.has("$ZodTransform");
3379
+ const innerType = ctx.io === "input" ? inIsTransform ? def.out : def.in : def.out;
3257
3380
  process(innerType, ctx, params);
3258
3381
  const seen = ctx.seen.get(schema);
3259
3382
  seen.ref = innerType;
@@ -3278,7 +3401,7 @@ const lazyProcessor = (schema, ctx, _json, params) => {
3278
3401
  seen.ref = innerType;
3279
3402
  };
3280
3403
  //#endregion
3281
- //#region ../../node_modules/.pnpm/zod@4.3.2/node_modules/zod/v4/classic/iso.js
3404
+ //#region ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/classic/iso.js
3282
3405
  const ZodISODateTime = /*@__PURE__*/ $constructor("ZodISODateTime", (inst, def) => {
3283
3406
  $ZodISODateTime.init(inst, def);
3284
3407
  ZodStringFormat.init(inst, def);
@@ -3308,7 +3431,7 @@ function duration(params) {
3308
3431
  return /* @__PURE__ */ _isoDuration(ZodISODuration, params);
3309
3432
  }
3310
3433
  //#endregion
3311
- //#region ../../node_modules/.pnpm/zod@4.3.2/node_modules/zod/v4/classic/errors.js
3434
+ //#region ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/classic/errors.js
3312
3435
  const initializer = (inst, issues) => {
3313
3436
  $ZodError.init(inst, issues);
3314
3437
  inst.name = "ZodError";
@@ -3328,10 +3451,9 @@ const initializer = (inst, issues) => {
3328
3451
  } }
3329
3452
  });
3330
3453
  };
3331
- $constructor("ZodError", initializer);
3332
- const ZodRealError = $constructor("ZodError", initializer, { Parent: Error });
3454
+ const ZodRealError = /*@__PURE__*/ $constructor("ZodError", initializer, { Parent: Error });
3333
3455
  //#endregion
3334
- //#region ../../node_modules/.pnpm/zod@4.3.2/node_modules/zod/v4/classic/parse.js
3456
+ //#region ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/classic/parse.js
3335
3457
  const parse = /* @__PURE__ */ _parse(ZodRealError);
3336
3458
  const parseAsync = /* @__PURE__ */ _parseAsync(ZodRealError);
3337
3459
  const safeParse = /* @__PURE__ */ _safeParse(ZodRealError);
@@ -3345,7 +3467,43 @@ const safeDecode = /* @__PURE__ */ _safeDecode(ZodRealError);
3345
3467
  const safeEncodeAsync = /* @__PURE__ */ _safeEncodeAsync(ZodRealError);
3346
3468
  const safeDecodeAsync = /* @__PURE__ */ _safeDecodeAsync(ZodRealError);
3347
3469
  //#endregion
3348
- //#region ../../node_modules/.pnpm/zod@4.3.2/node_modules/zod/v4/classic/schemas.js
3470
+ //#region ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/classic/schemas.js
3471
+ const _installedGroups = /* @__PURE__ */ new WeakMap();
3472
+ function _installLazyMethods(inst, group, methods) {
3473
+ const proto = Object.getPrototypeOf(inst);
3474
+ let installed = _installedGroups.get(proto);
3475
+ if (!installed) {
3476
+ installed = /* @__PURE__ */ new Set();
3477
+ _installedGroups.set(proto, installed);
3478
+ }
3479
+ if (installed.has(group)) return;
3480
+ installed.add(group);
3481
+ for (const key in methods) {
3482
+ const fn = methods[key];
3483
+ Object.defineProperty(proto, key, {
3484
+ configurable: true,
3485
+ enumerable: false,
3486
+ get() {
3487
+ const bound = fn.bind(this);
3488
+ Object.defineProperty(this, key, {
3489
+ configurable: true,
3490
+ writable: true,
3491
+ enumerable: true,
3492
+ value: bound
3493
+ });
3494
+ return bound;
3495
+ },
3496
+ set(v) {
3497
+ Object.defineProperty(this, key, {
3498
+ configurable: true,
3499
+ writable: true,
3500
+ enumerable: true,
3501
+ value: v
3502
+ });
3503
+ }
3504
+ });
3505
+ }
3506
+ }
3349
3507
  const ZodType = /*@__PURE__*/ $constructor("ZodType", (inst, def) => {
3350
3508
  $ZodType.init(inst, def);
3351
3509
  Object.assign(inst["~standard"], { jsonSchema: {
@@ -3356,20 +3514,6 @@ const ZodType = /*@__PURE__*/ $constructor("ZodType", (inst, def) => {
3356
3514
  inst.def = def;
3357
3515
  inst.type = def.type;
3358
3516
  Object.defineProperty(inst, "_def", { value: def });
3359
- inst.check = (...checks) => {
3360
- return inst.clone(mergeDefs(def, { checks: [...def.checks ?? [], ...checks.map((ch) => typeof ch === "function" ? { _zod: {
3361
- check: ch,
3362
- def: { check: "custom" },
3363
- onattach: []
3364
- } } : ch)] }), { parent: true });
3365
- };
3366
- inst.with = inst.check;
3367
- inst.clone = (def, params) => clone(inst, def, params);
3368
- inst.brand = () => inst;
3369
- inst.register = ((reg, meta) => {
3370
- reg.add(inst, meta);
3371
- return inst;
3372
- });
3373
3517
  inst.parse = (data, params) => parse(inst, data, params, { callee: inst.parse });
3374
3518
  inst.safeParse = (data, params) => safeParse(inst, data, params);
3375
3519
  inst.parseAsync = async (data, params) => parseAsync(inst, data, params, { callee: inst.parseAsync });
@@ -3383,43 +3527,106 @@ const ZodType = /*@__PURE__*/ $constructor("ZodType", (inst, def) => {
3383
3527
  inst.safeDecode = (data, params) => safeDecode(inst, data, params);
3384
3528
  inst.safeEncodeAsync = async (data, params) => safeEncodeAsync(inst, data, params);
3385
3529
  inst.safeDecodeAsync = async (data, params) => safeDecodeAsync(inst, data, params);
3386
- inst.refine = (check, params) => inst.check(refine(check, params));
3387
- inst.superRefine = (refinement) => inst.check(superRefine(refinement));
3388
- inst.overwrite = (fn) => inst.check(/* @__PURE__ */ _overwrite(fn));
3389
- inst.optional = () => optional(inst);
3390
- inst.exactOptional = () => exactOptional(inst);
3391
- inst.nullable = () => nullable(inst);
3392
- inst.nullish = () => optional(nullable(inst));
3393
- inst.nonoptional = (params) => nonoptional(inst, params);
3394
- inst.array = () => array(inst);
3395
- inst.or = (arg) => union([inst, arg]);
3396
- inst.and = (arg) => intersection(inst, arg);
3397
- inst.transform = (tx) => pipe(inst, transform(tx));
3398
- inst.default = (def) => _default(inst, def);
3399
- inst.prefault = (def) => prefault(inst, def);
3400
- inst.catch = (params) => _catch(inst, params);
3401
- inst.pipe = (target) => pipe(inst, target);
3402
- inst.readonly = () => readonly(inst);
3403
- inst.describe = (description) => {
3404
- const cl = inst.clone();
3405
- globalRegistry.add(cl, { description });
3406
- return cl;
3407
- };
3530
+ _installLazyMethods(inst, "ZodType", {
3531
+ check(...chks) {
3532
+ const def = this.def;
3533
+ return this.clone(mergeDefs(def, { checks: [...def.checks ?? [], ...chks.map((ch) => typeof ch === "function" ? { _zod: {
3534
+ check: ch,
3535
+ def: { check: "custom" },
3536
+ onattach: []
3537
+ } } : ch)] }), { parent: true });
3538
+ },
3539
+ with(...chks) {
3540
+ return this.check(...chks);
3541
+ },
3542
+ clone(def, params) {
3543
+ return clone(this, def, params);
3544
+ },
3545
+ brand() {
3546
+ return this;
3547
+ },
3548
+ register(reg, meta) {
3549
+ reg.add(this, meta);
3550
+ return this;
3551
+ },
3552
+ refine(check, params) {
3553
+ return this.check(refine(check, params));
3554
+ },
3555
+ superRefine(refinement, params) {
3556
+ return this.check(superRefine(refinement, params));
3557
+ },
3558
+ overwrite(fn) {
3559
+ return this.check(/* @__PURE__ */ _overwrite(fn));
3560
+ },
3561
+ optional() {
3562
+ return optional(this);
3563
+ },
3564
+ exactOptional() {
3565
+ return exactOptional(this);
3566
+ },
3567
+ nullable() {
3568
+ return nullable(this);
3569
+ },
3570
+ nullish() {
3571
+ return optional(nullable(this));
3572
+ },
3573
+ nonoptional(params) {
3574
+ return nonoptional(this, params);
3575
+ },
3576
+ array() {
3577
+ return array(this);
3578
+ },
3579
+ or(arg) {
3580
+ return union([this, arg]);
3581
+ },
3582
+ and(arg) {
3583
+ return intersection(this, arg);
3584
+ },
3585
+ transform(tx) {
3586
+ return pipe(this, transform(tx));
3587
+ },
3588
+ default(d) {
3589
+ return _default(this, d);
3590
+ },
3591
+ prefault(d) {
3592
+ return prefault(this, d);
3593
+ },
3594
+ catch(params) {
3595
+ return _catch(this, params);
3596
+ },
3597
+ pipe(target) {
3598
+ return pipe(this, target);
3599
+ },
3600
+ readonly() {
3601
+ return readonly(this);
3602
+ },
3603
+ describe(description) {
3604
+ const cl = this.clone();
3605
+ globalRegistry.add(cl, { description });
3606
+ return cl;
3607
+ },
3608
+ meta(...args) {
3609
+ if (args.length === 0) return globalRegistry.get(this);
3610
+ const cl = this.clone();
3611
+ globalRegistry.add(cl, args[0]);
3612
+ return cl;
3613
+ },
3614
+ isOptional() {
3615
+ return this.safeParse(void 0).success;
3616
+ },
3617
+ isNullable() {
3618
+ return this.safeParse(null).success;
3619
+ },
3620
+ apply(fn) {
3621
+ return fn(this);
3622
+ }
3623
+ });
3408
3624
  Object.defineProperty(inst, "description", {
3409
3625
  get() {
3410
3626
  return globalRegistry.get(inst)?.description;
3411
3627
  },
3412
3628
  configurable: true
3413
3629
  });
3414
- inst.meta = (...args) => {
3415
- if (args.length === 0) return globalRegistry.get(inst);
3416
- const cl = inst.clone();
3417
- globalRegistry.add(cl, args[0]);
3418
- return cl;
3419
- };
3420
- inst.isOptional = () => inst.safeParse(void 0).success;
3421
- inst.isNullable = () => inst.safeParse(null).success;
3422
- inst.apply = (fn) => fn(inst);
3423
3630
  return inst;
3424
3631
  });
3425
3632
  /** @internal */
@@ -3431,21 +3638,53 @@ const _ZodString = /*@__PURE__*/ $constructor("_ZodString", (inst, def) => {
3431
3638
  inst.format = bag.format ?? null;
3432
3639
  inst.minLength = bag.minimum ?? null;
3433
3640
  inst.maxLength = bag.maximum ?? null;
3434
- inst.regex = (...args) => inst.check(/* @__PURE__ */ _regex(...args));
3435
- inst.includes = (...args) => inst.check(/* @__PURE__ */ _includes(...args));
3436
- inst.startsWith = (...args) => inst.check(/* @__PURE__ */ _startsWith(...args));
3437
- inst.endsWith = (...args) => inst.check(/* @__PURE__ */ _endsWith(...args));
3438
- inst.min = (...args) => inst.check(/* @__PURE__ */ _minLength(...args));
3439
- inst.max = (...args) => inst.check(/* @__PURE__ */ _maxLength(...args));
3440
- inst.length = (...args) => inst.check(/* @__PURE__ */ _length(...args));
3441
- inst.nonempty = (...args) => inst.check(/* @__PURE__ */ _minLength(1, ...args));
3442
- inst.lowercase = (params) => inst.check(/* @__PURE__ */ _lowercase(params));
3443
- inst.uppercase = (params) => inst.check(/* @__PURE__ */ _uppercase(params));
3444
- inst.trim = () => inst.check(/* @__PURE__ */ _trim());
3445
- inst.normalize = (...args) => inst.check(/* @__PURE__ */ _normalize(...args));
3446
- inst.toLowerCase = () => inst.check(/* @__PURE__ */ _toLowerCase());
3447
- inst.toUpperCase = () => inst.check(/* @__PURE__ */ _toUpperCase());
3448
- inst.slugify = () => inst.check(/* @__PURE__ */ _slugify());
3641
+ _installLazyMethods(inst, "_ZodString", {
3642
+ regex(...args) {
3643
+ return this.check(/* @__PURE__ */ _regex(...args));
3644
+ },
3645
+ includes(...args) {
3646
+ return this.check(/* @__PURE__ */ _includes(...args));
3647
+ },
3648
+ startsWith(...args) {
3649
+ return this.check(/* @__PURE__ */ _startsWith(...args));
3650
+ },
3651
+ endsWith(...args) {
3652
+ return this.check(/* @__PURE__ */ _endsWith(...args));
3653
+ },
3654
+ min(...args) {
3655
+ return this.check(/* @__PURE__ */ _minLength(...args));
3656
+ },
3657
+ max(...args) {
3658
+ return this.check(/* @__PURE__ */ _maxLength(...args));
3659
+ },
3660
+ length(...args) {
3661
+ return this.check(/* @__PURE__ */ _length(...args));
3662
+ },
3663
+ nonempty(...args) {
3664
+ return this.check(/* @__PURE__ */ _minLength(1, ...args));
3665
+ },
3666
+ lowercase(params) {
3667
+ return this.check(/* @__PURE__ */ _lowercase(params));
3668
+ },
3669
+ uppercase(params) {
3670
+ return this.check(/* @__PURE__ */ _uppercase(params));
3671
+ },
3672
+ trim() {
3673
+ return this.check(/* @__PURE__ */ _trim());
3674
+ },
3675
+ normalize(...args) {
3676
+ return this.check(/* @__PURE__ */ _normalize(...args));
3677
+ },
3678
+ toLowerCase() {
3679
+ return this.check(/* @__PURE__ */ _toLowerCase());
3680
+ },
3681
+ toUpperCase() {
3682
+ return this.check(/* @__PURE__ */ _toUpperCase());
3683
+ },
3684
+ slugify() {
3685
+ return this.check(/* @__PURE__ */ _slugify());
3686
+ }
3687
+ });
3449
3688
  });
3450
3689
  const ZodString = /*@__PURE__*/ $constructor("ZodString", (inst, def) => {
3451
3690
  $ZodString.init(inst, def);
@@ -3509,6 +3748,11 @@ const ZodNanoID = /*@__PURE__*/ $constructor("ZodNanoID", (inst, def) => {
3509
3748
  $ZodNanoID.init(inst, def);
3510
3749
  ZodStringFormat.init(inst, def);
3511
3750
  });
3751
+ /**
3752
+ * @deprecated CUID v1 is deprecated by its authors due to information leakage
3753
+ * (timestamps embedded in the id). Use {@link ZodCUID2} instead.
3754
+ * See https://github.com/paralleldrive/cuid.
3755
+ */
3512
3756
  const ZodCUID = /*@__PURE__*/ $constructor("ZodCUID", (inst, def) => {
3513
3757
  $ZodCUID.init(inst, def);
3514
3758
  ZodStringFormat.init(inst, def);
@@ -3565,21 +3809,53 @@ const ZodNumber = /*@__PURE__*/ $constructor("ZodNumber", (inst, def) => {
3565
3809
  $ZodNumber.init(inst, def);
3566
3810
  ZodType.init(inst, def);
3567
3811
  inst._zod.processJSONSchema = (ctx, json, params) => numberProcessor(inst, ctx, json, params);
3568
- inst.gt = (value, params) => inst.check(/* @__PURE__ */ _gt(value, params));
3569
- inst.gte = (value, params) => inst.check(/* @__PURE__ */ _gte(value, params));
3570
- inst.min = (value, params) => inst.check(/* @__PURE__ */ _gte(value, params));
3571
- inst.lt = (value, params) => inst.check(/* @__PURE__ */ _lt(value, params));
3572
- inst.lte = (value, params) => inst.check(/* @__PURE__ */ _lte(value, params));
3573
- inst.max = (value, params) => inst.check(/* @__PURE__ */ _lte(value, params));
3574
- inst.int = (params) => inst.check(int(params));
3575
- inst.safe = (params) => inst.check(int(params));
3576
- inst.positive = (params) => inst.check(/* @__PURE__ */ _gt(0, params));
3577
- inst.nonnegative = (params) => inst.check(/* @__PURE__ */ _gte(0, params));
3578
- inst.negative = (params) => inst.check(/* @__PURE__ */ _lt(0, params));
3579
- inst.nonpositive = (params) => inst.check(/* @__PURE__ */ _lte(0, params));
3580
- inst.multipleOf = (value, params) => inst.check(/* @__PURE__ */ _multipleOf(value, params));
3581
- inst.step = (value, params) => inst.check(/* @__PURE__ */ _multipleOf(value, params));
3582
- inst.finite = () => inst;
3812
+ _installLazyMethods(inst, "ZodNumber", {
3813
+ gt(value, params) {
3814
+ return this.check(/* @__PURE__ */ _gt(value, params));
3815
+ },
3816
+ gte(value, params) {
3817
+ return this.check(/* @__PURE__ */ _gte(value, params));
3818
+ },
3819
+ min(value, params) {
3820
+ return this.check(/* @__PURE__ */ _gte(value, params));
3821
+ },
3822
+ lt(value, params) {
3823
+ return this.check(/* @__PURE__ */ _lt(value, params));
3824
+ },
3825
+ lte(value, params) {
3826
+ return this.check(/* @__PURE__ */ _lte(value, params));
3827
+ },
3828
+ max(value, params) {
3829
+ return this.check(/* @__PURE__ */ _lte(value, params));
3830
+ },
3831
+ int(params) {
3832
+ return this.check(int(params));
3833
+ },
3834
+ safe(params) {
3835
+ return this.check(int(params));
3836
+ },
3837
+ positive(params) {
3838
+ return this.check(/* @__PURE__ */ _gt(0, params));
3839
+ },
3840
+ nonnegative(params) {
3841
+ return this.check(/* @__PURE__ */ _gte(0, params));
3842
+ },
3843
+ negative(params) {
3844
+ return this.check(/* @__PURE__ */ _lt(0, params));
3845
+ },
3846
+ nonpositive(params) {
3847
+ return this.check(/* @__PURE__ */ _lte(0, params));
3848
+ },
3849
+ multipleOf(value, params) {
3850
+ return this.check(/* @__PURE__ */ _multipleOf(value, params));
3851
+ },
3852
+ step(value, params) {
3853
+ return this.check(/* @__PURE__ */ _multipleOf(value, params));
3854
+ },
3855
+ finite() {
3856
+ return this;
3857
+ }
3858
+ });
3583
3859
  const bag = inst._zod.bag;
3584
3860
  inst.minValue = Math.max(bag.minimum ?? Number.NEGATIVE_INFINITY, bag.exclusiveMinimum ?? Number.NEGATIVE_INFINITY) ?? null;
3585
3861
  inst.maxValue = Math.min(bag.maximum ?? Number.POSITIVE_INFINITY, bag.exclusiveMaximum ?? Number.POSITIVE_INFINITY) ?? null;
@@ -3642,11 +3918,23 @@ const ZodArray = /*@__PURE__*/ $constructor("ZodArray", (inst, def) => {
3642
3918
  ZodType.init(inst, def);
3643
3919
  inst._zod.processJSONSchema = (ctx, json, params) => arrayProcessor(inst, ctx, json, params);
3644
3920
  inst.element = def.element;
3645
- inst.min = (minLength, params) => inst.check(/* @__PURE__ */ _minLength(minLength, params));
3646
- inst.nonempty = (params) => inst.check(/* @__PURE__ */ _minLength(1, params));
3647
- inst.max = (maxLength, params) => inst.check(/* @__PURE__ */ _maxLength(maxLength, params));
3648
- inst.length = (len, params) => inst.check(/* @__PURE__ */ _length(len, params));
3649
- inst.unwrap = () => inst.element;
3921
+ _installLazyMethods(inst, "ZodArray", {
3922
+ min(n, params) {
3923
+ return this.check(/* @__PURE__ */ _minLength(n, params));
3924
+ },
3925
+ nonempty(params) {
3926
+ return this.check(/* @__PURE__ */ _minLength(1, params));
3927
+ },
3928
+ max(n, params) {
3929
+ return this.check(/* @__PURE__ */ _maxLength(n, params));
3930
+ },
3931
+ length(n, params) {
3932
+ return this.check(/* @__PURE__ */ _length(n, params));
3933
+ },
3934
+ unwrap() {
3935
+ return this.element;
3936
+ }
3937
+ });
3650
3938
  });
3651
3939
  function array(element, params) {
3652
3940
  return /* @__PURE__ */ _array(ZodArray, element, params);
@@ -3658,38 +3946,62 @@ const ZodObject = /*@__PURE__*/ $constructor("ZodObject", (inst, def) => {
3658
3946
  defineLazy(inst, "shape", () => {
3659
3947
  return def.shape;
3660
3948
  });
3661
- inst.keyof = () => _enum(Object.keys(inst._zod.def.shape));
3662
- inst.catchall = (catchall) => inst.clone({
3663
- ...inst._zod.def,
3664
- catchall
3665
- });
3666
- inst.passthrough = () => inst.clone({
3667
- ...inst._zod.def,
3668
- catchall: unknown()
3669
- });
3670
- inst.loose = () => inst.clone({
3671
- ...inst._zod.def,
3672
- catchall: unknown()
3673
- });
3674
- inst.strict = () => inst.clone({
3675
- ...inst._zod.def,
3676
- catchall: never()
3677
- });
3678
- inst.strip = () => inst.clone({
3679
- ...inst._zod.def,
3680
- catchall: void 0
3949
+ _installLazyMethods(inst, "ZodObject", {
3950
+ keyof() {
3951
+ return _enum(Object.keys(this._zod.def.shape));
3952
+ },
3953
+ catchall(catchall) {
3954
+ return this.clone({
3955
+ ...this._zod.def,
3956
+ catchall
3957
+ });
3958
+ },
3959
+ passthrough() {
3960
+ return this.clone({
3961
+ ...this._zod.def,
3962
+ catchall: unknown()
3963
+ });
3964
+ },
3965
+ loose() {
3966
+ return this.clone({
3967
+ ...this._zod.def,
3968
+ catchall: unknown()
3969
+ });
3970
+ },
3971
+ strict() {
3972
+ return this.clone({
3973
+ ...this._zod.def,
3974
+ catchall: never()
3975
+ });
3976
+ },
3977
+ strip() {
3978
+ return this.clone({
3979
+ ...this._zod.def,
3980
+ catchall: void 0
3981
+ });
3982
+ },
3983
+ extend(incoming) {
3984
+ return extend(this, incoming);
3985
+ },
3986
+ safeExtend(incoming) {
3987
+ return safeExtend(this, incoming);
3988
+ },
3989
+ merge(other) {
3990
+ return merge(this, other);
3991
+ },
3992
+ pick(mask) {
3993
+ return pick(this, mask);
3994
+ },
3995
+ omit(mask) {
3996
+ return omit(this, mask);
3997
+ },
3998
+ partial(...args) {
3999
+ return partial(ZodOptional, this, args[0]);
4000
+ },
4001
+ required(...args) {
4002
+ return required(ZodNonOptional, this, args[0]);
4003
+ }
3681
4004
  });
3682
- inst.extend = (incoming) => {
3683
- return extend(inst, incoming);
3684
- };
3685
- inst.safeExtend = (incoming) => {
3686
- return safeExtend(inst, incoming);
3687
- };
3688
- inst.merge = (other) => merge(inst, other);
3689
- inst.pick = (mask) => pick(inst, mask);
3690
- inst.omit = (mask) => omit(inst, mask);
3691
- inst.partial = (...args) => partial(ZodOptional, inst, args[0]);
3692
- inst.required = (...args) => required(ZodNonOptional, inst, args[0]);
3693
4005
  });
3694
4006
  function object(shape, params) {
3695
4007
  const def = {
@@ -3782,9 +4094,11 @@ const ZodTransform = /*@__PURE__*/ $constructor("ZodTransform", (inst, def) => {
3782
4094
  const output = def.transform(payload.value, payload);
3783
4095
  if (output instanceof Promise) return output.then((output) => {
3784
4096
  payload.value = output;
4097
+ payload.fallback = true;
3785
4098
  return payload;
3786
4099
  });
3787
4100
  payload.value = output;
4101
+ payload.fallback = true;
3788
4102
  return payload;
3789
4103
  };
3790
4104
  });
@@ -3934,8 +4248,8 @@ const ZodCustom = /*@__PURE__*/ $constructor("ZodCustom", (inst, def) => {
3934
4248
  function refine(fn, _params = {}) {
3935
4249
  return /* @__PURE__ */ _refine(ZodCustom, fn, _params);
3936
4250
  }
3937
- function superRefine(fn) {
3938
- return /* @__PURE__ */ _superRefine(fn);
4251
+ function superRefine(fn, params) {
4252
+ return /* @__PURE__ */ _superRefine(fn, params);
3939
4253
  }
3940
4254
  //#endregion
3941
4255
  //#region ../../node_modules/.pnpm/serialize-error@12.0.0/node_modules/serialize-error/error-constructors.js
@@ -3993,9 +4307,11 @@ const newError = (name) => {
3993
4307
  return ErrorConstructor === AggregateError ? new ErrorConstructor([]) : new ErrorConstructor();
3994
4308
  };
3995
4309
  const destroyCircular = ({ from, seen, to, forceEnumerable, maxDepth, depth, useToJSON, serialize }) => {
3996
- if (!to) if (Array.isArray(from)) to = [];
3997
- else if (!serialize && isErrorLike(from)) to = newError(from.name);
3998
- else to = {};
4310
+ if (!to) {
4311
+ if (Array.isArray(from)) to = [];
4312
+ else if (!serialize && isErrorLike(from)) to = newError(from.name);
4313
+ else to = {};
4314
+ }
3999
4315
  seen.push(from);
4000
4316
  if (depth >= maxDepth) return to;
4001
4317
  if (useToJSON && typeof from.toJSON === "function" && !toJsonWasCalled.has(from)) return toJSON(from);
@@ -4140,6 +4456,98 @@ const AgentStatusSchema = object({
4140
4456
  * Generated by Kubb (https://kubb.dev/).
4141
4457
  * Do not edit manually.
4142
4458
  */
4459
+ const AiAccessTestSchema = _enum([
4460
+ "verified",
4461
+ "failed",
4462
+ "not-checked"
4463
+ ]);
4464
+ /**
4465
+ * Generated by Kubb (https://kubb.dev/).
4466
+ * Do not edit manually.
4467
+ */
4468
+ const AiAvailabilityBlockerSchema = _enum([
4469
+ "agreement-required",
4470
+ "entitlement-required",
4471
+ "model-activation-required",
4472
+ "deployment-required",
4473
+ "quota-configuration-required",
4474
+ "region-unavailable",
4475
+ "access-denied",
4476
+ "observation-failed"
4477
+ ]);
4478
+ /**
4479
+ * Generated by Kubb (https://kubb.dev/).
4480
+ * Do not edit manually.
4481
+ */
4482
+ /**
4483
+ * @description Provider control plane used to observe model availability without invoking\na model, spending customer quota, or accepting provider terms.
4484
+ */
4485
+ const AiAvailabilitySourceSchema = _enum([
4486
+ "aws-bedrock",
4487
+ "gcp-vertex",
4488
+ "azure-foundry",
4489
+ "anthropic"
4490
+ ]).describe("Provider control plane used to observe model availability without invoking\na model, spending customer quota, or accepting provider terms.");
4491
+ /**
4492
+ * Generated by Kubb (https://kubb.dev/).
4493
+ * Do not edit manually.
4494
+ */
4495
+ const AiModelAvailabilitySchema = _enum([
4496
+ "available",
4497
+ "blocked",
4498
+ "unknown"
4499
+ ]);
4500
+ /**
4501
+ * Generated by Kubb (https://kubb.dev/).
4502
+ * Do not edit manually.
4503
+ */
4504
+ /**
4505
+ * @description A public API accepted from an application client.
4506
+ */
4507
+ const ClientApiSchema = _enum([
4508
+ "open-ai-chat-completions",
4509
+ "open-ai-responses",
4510
+ "anthropic-messages"
4511
+ ]).describe("A public API accepted from an application client.");
4512
+ /**
4513
+ * Generated by Kubb (https://kubb.dev/).
4514
+ * Do not edit manually.
4515
+ */
4516
+ const AiModelAvailabilityObservationSchema = object({
4517
+ get "accessTest"() {
4518
+ return AiAccessTestSchema;
4519
+ },
4520
+ get "availability"() {
4521
+ return AiModelAvailabilitySchema;
4522
+ },
4523
+ get "blockers"() {
4524
+ return array(AiAvailabilityBlockerSchema);
4525
+ },
4526
+ get "clientApis"() {
4527
+ return array(ClientApiSchema.describe("A public API accepted from an application client."));
4528
+ },
4529
+ "errorCode": string().nullish(),
4530
+ "publicModelId": string(),
4531
+ "testedAt": datetime().nullish()
4532
+ });
4533
+ /**
4534
+ * Generated by Kubb (https://kubb.dev/).
4535
+ * Do not edit manually.
4536
+ */
4537
+ const AiAvailabilityObservationSchema = object({
4538
+ "catalogRevision": string(),
4539
+ "location": string().nullish(),
4540
+ get "models"() {
4541
+ return array(AiModelAvailabilityObservationSchema);
4542
+ },
4543
+ get "source"() {
4544
+ return AiAvailabilitySourceSchema.describe("Provider control plane used to observe model availability without invoking\na model, spending customer quota, or accepting provider terms.");
4545
+ }
4546
+ });
4547
+ /**
4548
+ * Generated by Kubb (https://kubb.dev/).
4549
+ * Do not edit manually.
4550
+ */
4143
4551
  const HeartbeatCollectionIssueReasonSchema = _enum([
4144
4552
  "forbidden",
4145
4553
  "not-installed",
@@ -4219,6 +4627,9 @@ const AiHeartbeatStatusSchema = object({
4219
4627
  * Do not edit manually.
4220
4628
  */
4221
4629
  const AwsBedrockAiHeartbeatDataSchema = object({
4630
+ get "availability"() {
4631
+ return AiAvailabilityObservationSchema;
4632
+ },
4222
4633
  "region": string(),
4223
4634
  get "status"() {
4224
4635
  return AiHeartbeatStatusSchema;
@@ -4230,6 +4641,9 @@ const AwsBedrockAiHeartbeatDataSchema = object({
4230
4641
  */
4231
4642
  const AzureFoundryAiHeartbeatDataSchema = object({
4232
4643
  "accountName": string(),
4644
+ get "availability"() {
4645
+ return AiAvailabilityObservationSchema;
4646
+ },
4233
4647
  "endpoint": string().nullish(),
4234
4648
  "location": string().nullish(),
4235
4649
  "resourceGroup": string().nullish(),
@@ -4242,6 +4656,9 @@ const AzureFoundryAiHeartbeatDataSchema = object({
4242
4656
  * Do not edit manually.
4243
4657
  */
4244
4658
  const ExternalAiHeartbeatDataSchema = object({
4659
+ get "availability"() {
4660
+ return union([AiAvailabilityObservationSchema, _null()]).optional();
4661
+ },
4245
4662
  "provider": string().describe("The BYO-key provider serving this binding (e.g. \"openai\"). Used on the Local\nplatform, where the app brings its own provider key instead of an ambient cloud."),
4246
4663
  get "status"() {
4247
4664
  return AiHeartbeatStatusSchema;
@@ -4252,6 +4669,9 @@ const ExternalAiHeartbeatDataSchema = object({
4252
4669
  * Do not edit manually.
4253
4670
  */
4254
4671
  const GcpVertexAiHeartbeatDataSchema = object({
4672
+ get "availability"() {
4673
+ return AiAvailabilityObservationSchema;
4674
+ },
4255
4675
  "location": string(),
4256
4676
  "project": string(),
4257
4677
  get "status"() {
@@ -5282,6 +5702,34 @@ const AwsIamRoleServiceAccountHeartbeatDataSchema = object({
5282
5702
  },
5283
5703
  "tagCount": int().min(0)
5284
5704
  });
5705
+ object({ "keyArn": string().describe("Immutable KMS key ARN. Alias ARNs are not accepted.") }).describe("AWS KMS key created by the customer-installed setup stack.");
5706
+ /**
5707
+ * Generated by Kubb (https://kubb.dev/).
5708
+ * Do not edit manually.
5709
+ */
5710
+ const KeyHeartbeatStatusSchema = object({
5711
+ get "health"() {
5712
+ return ObservedHealthSchema;
5713
+ },
5714
+ get "lifecycle"() {
5715
+ return ProviderLifecycleStateSchema;
5716
+ },
5717
+ "message": string().nullish()
5718
+ });
5719
+ /**
5720
+ * Generated by Kubb (https://kubb.dev/).
5721
+ * Do not edit manually.
5722
+ */
5723
+ const AwsKmsKeyHeartbeatDataSchema = object({
5724
+ "enabled": boolean(),
5725
+ "keyArn": string(),
5726
+ "keySpec": string(),
5727
+ "keyState": string(),
5728
+ "keyUsage": string(),
5729
+ get "status"() {
5730
+ return KeyHeartbeatStatusSchema;
5731
+ }
5732
+ });
5285
5733
  object({
5286
5734
  "tableArn": string().describe("DynamoDB table ARN."),
5287
5735
  "tableName": string().describe("DynamoDB table name.")
@@ -5940,6 +6388,12 @@ object({
5940
6388
  "serverResourceId": string().describe("Full ARM resource id of the Flexible Server (the deletable handle)."),
5941
6389
  "version": string().describe("Engine version the server reports.")
5942
6390
  }).describe("Azure Postgres (Flexible Server + Private Endpoint) registration data: the handles by\nwhich a setup-created Flexible Server (with its Private Endpoint, private DNS zone, and\nthe Key Vault secret holding the master password) is registered as a Frozen Postgres\nresource. Setup owns the server, Alien refreshes and heartbeats it. The raw password is\nnever carried, only the Key Vault secret URI.");
6391
+ object({
6392
+ "keyId": string().describe("Full versioned Key Vault key ID used for new wrapping operations."),
6393
+ "keyName": string().describe("Key name within the vault."),
6394
+ "lineageVersionId": string().describe("Version ID that identifies the original key lineage."),
6395
+ "vaultResourceId": string().describe("ARM resource ID of the dedicated Key Vault.")
6396
+ }).describe("Azure Key Vault key created by the customer-installed setup stack.");
5943
6397
  /**
5944
6398
  * Generated by Kubb (https://kubb.dev/).
5945
6399
  * Do not edit manually.
@@ -5965,6 +6419,20 @@ const AzureKeyVaultHeartbeatDataSchema = object({
5965
6419
  },
5966
6420
  "vaultUri": string().nullish()
5967
6421
  });
6422
+ /**
6423
+ * Generated by Kubb (https://kubb.dev/).
6424
+ * Do not edit manually.
6425
+ */
6426
+ const AzureKeyVaultKeyHeartbeatDataSchema = object({
6427
+ "enabled": boolean().nullish(),
6428
+ "keyId": string(),
6429
+ "keyOperations": array(string()),
6430
+ "keyType": string(),
6431
+ "recoveryLevel": string().nullish(),
6432
+ get "status"() {
6433
+ return KeyHeartbeatStatusSchema;
6434
+ }
6435
+ });
5968
6436
  object({
5969
6437
  "resourceGroup": string().describe("Resource group containing the Storage account."),
5970
6438
  "storageAccountName": string().describe("Storage account name."),
@@ -7836,7 +8304,7 @@ object({
7836
8304
  get "inbound"() {
7837
8305
  return union([EmailInboundSchema, _null()]).optional();
7838
8306
  }
7839
- }).describe("Email infrastructure for sending and receiving mail on customer-owned\ndomains. On AWS this is backed by SES: a shared configuration set, optional\ninbound/event wiring, and one email identity (Easy DKIM) per seed domain.\n\n# Infrastructure vs runtime data\n\nThis resource owns the email *infrastructure* and the capability to use it,\nnot the domain lifecycle. Deployment manages the configuration set, the\nevent topology, the inbound receipt topology, and any seed identities\nlisted in `domains`. Email identities created at runtime through the\n`email/manage-identities` grant are application data: they are not tracked\nby the deployment, are not removed when the stack is deleted, and their\nlifecycle — including deletion — belongs to the application.\n\nThe operator (or the application, for runtime-created identities) owns DNS:\nthe per-domain DKIM CNAME records surfaced in [`EmailOutputs`] must be\ncreated before SES verifies a domain and allows sending from it.\n\n# Inbound mail (AWS)\n\nWhen `inbound` is set, a SES receipt rule set is provisioned that writes\nraw incoming mail into the linked Storage bucket. The receipt rule is a\ncatch-all (no recipient filter), so mail for identities verified at runtime\nlands in the bucket without any infrastructure change.\n\nAlien activates the provisioned receipt rule set as part of setup. Because\nSES permits only one active receipt rule set per AWS account and region, an\nAWS stack may contain only one email resource with inbound delivery, and\ninstalling it makes its rule set the account's active rule set. SES email\nreceiving is available only in a subset of AWS regions; deploying `inbound`\nto an unsupported region fails during setup.\n\n# Update semantics\n\n`domains` is append-friendly: adding a domain provisions a new identity,\nremoving a domain deletes its identity (and its DKIM verification state).\nThe list may be empty. `inbound` and `events` may be added, removed, or\nrepointed; removing them tears down the corresponding receipt rule set /\nevent destination wiring.");
8307
+ }).describe("Email infrastructure for sending and receiving mail on customer-owned\ndomains. On AWS this is backed by SES: a shared configuration set, optional\ninbound/event wiring, and one email identity (Easy DKIM) per seed domain.\n\n# Infrastructure vs runtime data\n\nThis resource owns the email *infrastructure* and the capability to use it,\nnot the domain lifecycle. Deployment manages the configuration set, the\nevent topology, the inbound receipt topology, and any seed identities\nlisted in `domains`. Email identities created at runtime through the\n`email/manage-identities` grant are application data: they are not tracked\nby the deployment, are not removed when the stack is deleted, and their\nlifecycle — including deletion — belongs to the application.\n\nThe operator (or the application, for runtime-created identities) owns DNS:\nthe per-domain DKIM CNAME records surfaced in [`EmailOutputs`] must be\ncreated before SES verifies a domain and allows sending from it.\n\n# Inbound mail (AWS)\n\nWhen `inbound` is set, a SES receipt rule set is provisioned that writes\nraw incoming mail into the linked Storage bucket. The receipt rule is a\ncatch-all (no recipient filter), so mail for identities verified at runtime\nlands in the bucket without any infrastructure change.\n\nAlien activates the provisioned receipt rule set as part of setup. Because\nSES permits only one active receipt rule set per AWS account and region, an\nAWS stack may contain only one email resource with inbound delivery. The\nresource requires exclusive ownership of SES receiving in its account and\nregion: setup refuses to replace an active rule set it does not own. Choose\nan unused region when the account already receives email through SES. SES email\nreceiving is available only in a subset of AWS regions; deploying `inbound`\nto an unsupported region fails during setup.\n\n# Update semantics\n\n`domains` is append-friendly: adding a domain provisions a new identity,\nremoving a domain deletes its identity (and its DKIM verification state).\nThe list may be empty. `inbound` and `events` may be added, removed, or\nrepointed; removing them tears down the corresponding receipt rule set /\nevent destination wiring.");
7840
8308
  /**
7841
8309
  * Generated by Kubb (https://kubb.dev/).
7842
8310
  * Do not edit manually.
@@ -7955,6 +8423,20 @@ object({
7955
8423
  * Generated by Kubb (https://kubb.dev/).
7956
8424
  * Do not edit manually.
7957
8425
  */
8426
+ const GcpCloudKmsKeyHeartbeatDataSchema = object({
8427
+ "algorithm": string().nullish(),
8428
+ "cryptoKeyName": string(),
8429
+ "primaryState": string().nullish(),
8430
+ "primaryVersion": string().nullish(),
8431
+ "purpose": string(),
8432
+ get "status"() {
8433
+ return KeyHeartbeatStatusSchema;
8434
+ }
8435
+ });
8436
+ /**
8437
+ * Generated by Kubb (https://kubb.dev/).
8438
+ * Do not edit manually.
8439
+ */
7958
8440
  const GcpCloudRunWorkerHeartbeatDataSchema = object({
7959
8441
  "containerImage": string().nullish(),
7960
8442
  "cpuLimit": string().nullish(),
@@ -8044,6 +8526,10 @@ const GcpFirestoreKvHeartbeatDataSchema = object({
8044
8526
  "updateTime": string().nullish(),
8045
8527
  "versionRetentionPeriod": string().nullish()
8046
8528
  });
8529
+ object({
8530
+ "cryptoKeyName": string().describe("Full CryptoKey resource name, without a CryptoKeyVersion."),
8531
+ "primaryVersion": string().describe("Full primary CryptoKeyVersion resource name used for new wrapping operations.")
8532
+ }).describe("GCP Cloud KMS key created by the customer-installed setup stack.");
8047
8533
  object({
8048
8534
  "databaseId": string().describe("Firestore database ID (`(default)` when this is the default database)."),
8049
8535
  "location": string().describe("Firestore database location (region or multi-region code)."),
@@ -8340,10 +8826,64 @@ const ImportedResourceSchema = object({
8340
8826
  * Do not edit manually.
8341
8827
  */
8342
8828
  /**
8829
+ * @description Stable identity of a provider key family.\n\nProvider-native version rotation does not change this value. Replacing the\nprovider key does.
8830
+ */
8831
+ const KeyFingerprintSchema = union([
8832
+ object({
8833
+ "key_arn": string(),
8834
+ "provider": _enum(["aws"])
8835
+ }),
8836
+ object({
8837
+ "crypto_key_name": string(),
8838
+ "provider": _enum(["gcp"])
8839
+ }),
8840
+ object({
8841
+ "key_name": string(),
8842
+ "lineage_version_id": string(),
8843
+ "provider": _enum(["azure"]),
8844
+ "vault_resource_id": string()
8845
+ })
8846
+ ]).describe("Stable identity of a provider key family.\n\nProvider-native version rotation does not change this value. Replacing the\nprovider key does.");
8847
+ /**
8848
+ * Generated by Kubb (https://kubb.dev/).
8849
+ * Do not edit manually.
8850
+ */
8851
+ const KeyHeartbeatDataSchema = union([
8852
+ object({
8853
+ get "data"() {
8854
+ return AwsKmsKeyHeartbeatDataSchema;
8855
+ },
8856
+ "provider": _enum(["aws-kms"])
8857
+ }),
8858
+ object({
8859
+ get "data"() {
8860
+ return GcpCloudKmsKeyHeartbeatDataSchema;
8861
+ },
8862
+ "provider": _enum(["gcp-cloud-kms"])
8863
+ }),
8864
+ object({
8865
+ get "data"() {
8866
+ return AzureKeyVaultKeyHeartbeatDataSchema;
8867
+ },
8868
+ "provider": _enum(["azure-key-vault"])
8869
+ })
8870
+ ]);
8871
+ object({
8872
+ get "fingerprint"() {
8873
+ return KeyFingerprintSchema.describe("Stable identity of a provider key family.\n\nProvider-native version rotation does not change this value. Replacing the\nprovider key does.");
8874
+ },
8875
+ "wrappingKeyId": string().describe("Exact provider key version used for new wrapping operations.")
8876
+ }).describe("Outputs generated by a successfully provisioned Key.");
8877
+ object({ "id": string().describe("Identifier for the key resource.") }).describe("A customer-managed encryption key.");
8878
+ /**
8879
+ * Generated by Kubb (https://kubb.dev/).
8880
+ * Do not edit manually.
8881
+ */
8882
+ /**
8343
8883
  * @description Certificate publication or reference mode for Kubernetes public endpoints.
8344
8884
  */
8345
8885
  const KubernetesCertificateModeSchema = union([
8346
- lazy(() => KubernetesTlsSecretRefSchema).and(object({ "mode": _enum(["tlsSecretRef"]) })),
8886
+ lazy(() => KubernetesTlsSecretRefSchema).and(object({ "mode": _enum(["tlsSecretRef"]) })).describe("Namespace-scoped Kubernetes TLS Secret reference."),
8347
8887
  object({
8348
8888
  "mode": _enum(["managedAcmImport"]),
8349
8889
  "region": string().describe("ACM region. Defaults to the deployment region when omitted.").nullish(),
@@ -8560,7 +9100,7 @@ const KubernetesIngressRouteProfileSchema = object({
8560
9100
  /**
8561
9101
  * @description Kubernetes route API selected for public endpoints.
8562
9102
  */
8563
- const KubernetesRouteProfileSchema = union([lazy(() => KubernetesIngressRouteProfileSchema).and(object({ "routeApi": _enum(["ingress"]) })), lazy(() => KubernetesGatewayRouteProfileSchema).and(object({ "routeApi": _enum(["gateway"]) }))]).describe("Kubernetes route API selected for public endpoints.");
9103
+ const KubernetesRouteProfileSchema = union([lazy(() => KubernetesIngressRouteProfileSchema).and(object({ "routeApi": _enum(["ingress"]) })).describe("Shared Ingress route profile values."), lazy(() => KubernetesGatewayRouteProfileSchema).and(object({ "routeApi": _enum(["gateway"]) })).describe("Shared Gateway API route profile values.")]).describe("Kubernetes route API selected for public endpoints.");
8564
9104
  /**
8565
9105
  * Generated by Kubb (https://kubb.dev/).
8566
9106
  * Do not edit manually.
@@ -8818,9 +9358,9 @@ const LocalWorkerHeartbeatDataSchema = object({
8818
9358
  * @description Management configuration for different cloud platforms.\n\nPlatform-derived configuration for cross-account/cross-tenant access.\nThis is NOT user-specified - it\'s derived from the Manager\'s ServiceAccount.
8819
9359
  */
8820
9360
  const ManagementConfigSchema = union([
8821
- lazy(() => AwsManagementConfigSchema).and(object({ "platform": _enum(["aws"]) })),
8822
- lazy(() => GcpManagementConfigSchema).and(object({ "platform": _enum(["gcp"]) })),
8823
- lazy(() => AzureManagementConfigSchema).and(object({ "platform": _enum(["azure"]) })),
9361
+ lazy(() => AwsManagementConfigSchema).and(object({ "platform": _enum(["aws"]) })).describe("AWS management configuration extracted from stack settings"),
9362
+ lazy(() => GcpManagementConfigSchema).and(object({ "platform": _enum(["gcp"]) })).describe("GCP management configuration extracted from stack settings"),
9363
+ lazy(() => AzureManagementConfigSchema).and(object({ "platform": _enum(["azure"]) })).describe("Azure management configuration extracted from stack settings"),
8824
9364
  object({ "platform": _enum(["kubernetes"]) })
8825
9365
  ]).describe("Management configuration for different cloud platforms.\n\nPlatform-derived configuration for cross-account/cross-tenant access.\nThis is NOT user-specified - it's derived from the Manager's ServiceAccount.");
8826
9366
  /**
@@ -9041,10 +9581,10 @@ const PostgresBackendSchema = object({ "type": _enum(["auroraServerlessV2"]) }).
9041
9581
  * Do not edit manually.
9042
9582
  */
9043
9583
  const PostgresHeartbeatDataSchema = union([
9044
- lazy(() => AuroraPostgresHeartbeatDataSchema).and(object({ "backend": _enum(["aurora"]) })),
9045
- lazy(() => GcpCloudSqlPostgresHeartbeatDataSchema).and(object({ "backend": _enum(["cloudSql"]) })),
9046
- lazy(() => AzureFlexibleServerPostgresHeartbeatDataSchema).and(object({ "backend": _enum(["flexibleServer"]) })),
9047
- lazy(() => LocalPostgresHeartbeatDataSchema).and(object({ "backend": _enum(["local"]) }))
9584
+ lazy(() => AuroraPostgresHeartbeatDataSchema).and(object({ "backend": _enum(["aurora"]) })).describe("AWS Aurora Serverless v2 backend."),
9585
+ lazy(() => GcpCloudSqlPostgresHeartbeatDataSchema).and(object({ "backend": _enum(["cloudSql"]) })).describe("GCP Cloud SQL backend."),
9586
+ lazy(() => AzureFlexibleServerPostgresHeartbeatDataSchema).and(object({ "backend": _enum(["flexibleServer"]) })).describe("Azure Flexible Server backend."),
9587
+ lazy(() => LocalPostgresHeartbeatDataSchema).and(object({ "backend": _enum(["local"]) })).describe("Local embedded Postgres backend.")
9048
9588
  ]);
9049
9589
  object({
9050
9590
  "database": string().describe("The default database created for this resource. On cloud backends this is the fixed\nlabel `POSTGRES_DATABASE_NAME` (`alien`); on Local it is the resource id."),
@@ -9329,6 +9869,12 @@ const ResourceHeartbeatDataSchema = union([
9329
9869
  return AiHeartbeatDataSchema;
9330
9870
  },
9331
9871
  "resourceType": _enum(["ai"])
9872
+ }),
9873
+ object({
9874
+ get "data"() {
9875
+ return KeyHeartbeatDataSchema;
9876
+ },
9877
+ "resourceType": _enum(["key"])
9332
9878
  })
9333
9879
  ]);
9334
9880
  object({
@@ -9643,6 +10189,9 @@ array(lazy(() => StorageEventSchema).describe("Represents an event triggered by
9643
10189
  object({ "bucketName": string().describe("The globally unique name of the bucket.") }).describe("Outputs generated by a successfully provisioned Storage bucket.");
9644
10190
  object({
9645
10191
  "corsAllowedOrigins": optional(array(string()).describe("Browser origins allowed to read objects through signed URLs.\n\nWhen non-empty, providers configure CORS for `GET` and `HEAD` requests.\nAn origin of `*` is appropriate for private buckets whose signed URLs\nare bearer credentials and do not use browser cookies.\nDefault: `[]` (CORS disabled).")),
10192
+ get "encryptionKey"() {
10193
+ return union([ResourceRefSchema, _null()]).optional();
10194
+ },
9646
10195
  "id": string().describe("Name of the the storage bucket.\nFor names with dots, each dot-separated label must be ≤ 63 characters."),
9647
10196
  get "lifecycleRules"() {
9648
10197
  return array(LifecycleRuleSchema.describe("Defines a rule for managing the lifecycle of objects within a storage bucket.")).describe("List of rules for automatic object management (e.g., expiration).\nDefault: `[]` (empty list)").optional();
@@ -9650,7 +10199,7 @@ object({
9650
10199
  "publicRead": optional(boolean().describe("Allows public read access to objects without authentication.\nDefault: `false`")),
9651
10200
  "versioning": optional(boolean().describe("Enables object versioning.\nDefault: `false`"))
9652
10201
  }).describe("Represents an object storage bucket.");
9653
- lazy(() => CommandResponseSchema).describe("Request to submit a command response (from deployment)");
10202
+ lazy(() => CommandResponseSchema).describe("Command response from deployment").describe("Request to submit a command response (from deployment)");
9654
10203
  object({ "size": int().min(0).describe("Size of uploaded data") }).describe("Request to mark upload as complete");
9655
10204
  object({
9656
10205
  "commandId": string().describe("Command identifier"),