@inkeep/agents-manage-mcp 0.41.2 → 0.43.0

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/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
2
2
 
3
- //#region ../../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/core/core.js
3
+ //#region ../../node_modules/.pnpm/zod@4.2.1/node_modules/zod/v4/core/core.js
4
4
  /** A special constant with type `never` */
5
5
  const NEVER = Object.freeze({ status: "aborted" });
6
6
  function $constructor(name, initializer$2, params) {
@@ -60,7 +60,7 @@ function config(newConfig) {
60
60
  }
61
61
 
62
62
  //#endregion
63
- //#region ../../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/core/util.js
63
+ //#region ../../node_modules/.pnpm/zod@4.2.1/node_modules/zod/v4/core/util.js
64
64
  function getEnumValues(entries) {
65
65
  const numericValues = Object.values(entries).filter((v) => typeof v === "number");
66
66
  return Object.entries(entries).filter(([k, _]) => numericValues.indexOf(+k) === -1).map(([_, v]) => v);
@@ -208,8 +208,6 @@ const NUMBER_FORMAT_RANGES = {
208
208
  };
209
209
  function pick(schema, mask) {
210
210
  const currDef = schema._zod.def;
211
- const checks = currDef.checks;
212
- if (checks && checks.length > 0) throw new Error(".pick() cannot be used on object schemas containing refinements");
213
211
  return clone(schema, mergeDefs(schema._zod.def, {
214
212
  get shape() {
215
213
  const newShape = {};
@@ -226,8 +224,6 @@ function pick(schema, mask) {
226
224
  }
227
225
  function omit(schema, mask) {
228
226
  const currDef = schema._zod.def;
229
- const checks = currDef.checks;
230
- if (checks && checks.length > 0) throw new Error(".omit() cannot be used on object schemas containing refinements");
231
227
  return clone(schema, mergeDefs(schema._zod.def, {
232
228
  get shape() {
233
229
  const newShape = { ...schema._zod.def.shape };
@@ -245,29 +241,33 @@ function omit(schema, mask) {
245
241
  function extend(schema, shape) {
246
242
  if (!isPlainObject$1(shape)) throw new Error("Invalid input to extend: expected a plain object");
247
243
  const checks = schema._zod.def.checks;
248
- if (checks && checks.length > 0) {
249
- const existingShape = schema._zod.def.shape;
250
- for (const key in shape) if (Object.getOwnPropertyDescriptor(existingShape, key) !== void 0) throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.");
251
- }
252
- return clone(schema, mergeDefs(schema._zod.def, { get shape() {
253
- const _shape = {
254
- ...schema._zod.def.shape,
255
- ...shape
256
- };
257
- assignProp(this, "shape", _shape);
258
- return _shape;
259
- } }));
244
+ if (checks && checks.length > 0) throw new Error("Object schemas containing refinements cannot be extended. Use `.safeExtend()` instead.");
245
+ return clone(schema, mergeDefs(schema._zod.def, {
246
+ get shape() {
247
+ const _shape = {
248
+ ...schema._zod.def.shape,
249
+ ...shape
250
+ };
251
+ assignProp(this, "shape", _shape);
252
+ return _shape;
253
+ },
254
+ checks: []
255
+ }));
260
256
  }
261
257
  function safeExtend(schema, shape) {
262
258
  if (!isPlainObject$1(shape)) throw new Error("Invalid input to safeExtend: expected a plain object");
263
- return clone(schema, mergeDefs(schema._zod.def, { get shape() {
264
- const _shape = {
265
- ...schema._zod.def.shape,
266
- ...shape
267
- };
268
- assignProp(this, "shape", _shape);
269
- return _shape;
270
- } }));
259
+ return clone(schema, {
260
+ ...schema._zod.def,
261
+ get shape() {
262
+ const _shape = {
263
+ ...schema._zod.def.shape,
264
+ ...shape
265
+ };
266
+ assignProp(this, "shape", _shape);
267
+ return _shape;
268
+ },
269
+ checks: schema._zod.def.checks
270
+ });
271
271
  }
272
272
  function merge(a, b) {
273
273
  return clone(a, mergeDefs(a._zod.def, {
@@ -286,8 +286,6 @@ function merge(a, b) {
286
286
  }));
287
287
  }
288
288
  function partial(Class, schema, mask) {
289
- const checks = schema._zod.def.checks;
290
- if (checks && checks.length > 0) throw new Error(".partial() cannot be used on object schemas containing refinements");
291
289
  return clone(schema, mergeDefs(schema._zod.def, {
292
290
  get shape() {
293
291
  const oldShape = schema._zod.def.shape;
@@ -311,24 +309,27 @@ function partial(Class, schema, mask) {
311
309
  }));
312
310
  }
313
311
  function required(Class, schema, mask) {
314
- return clone(schema, mergeDefs(schema._zod.def, { get shape() {
315
- const oldShape = schema._zod.def.shape;
316
- const shape = { ...oldShape };
317
- if (mask) for (const key in mask) {
318
- if (!(key in shape)) throw new Error(`Unrecognized key: "${key}"`);
319
- if (!mask[key]) continue;
320
- shape[key] = new Class({
312
+ return clone(schema, mergeDefs(schema._zod.def, {
313
+ get shape() {
314
+ const oldShape = schema._zod.def.shape;
315
+ const shape = { ...oldShape };
316
+ if (mask) for (const key in mask) {
317
+ if (!(key in shape)) throw new Error(`Unrecognized key: "${key}"`);
318
+ if (!mask[key]) continue;
319
+ shape[key] = new Class({
320
+ type: "nonoptional",
321
+ innerType: oldShape[key]
322
+ });
323
+ }
324
+ else for (const key in oldShape) shape[key] = new Class({
321
325
  type: "nonoptional",
322
326
  innerType: oldShape[key]
323
327
  });
324
- }
325
- else for (const key in oldShape) shape[key] = new Class({
326
- type: "nonoptional",
327
- innerType: oldShape[key]
328
- });
329
- assignProp(this, "shape", shape);
330
- return shape;
331
- } }));
328
+ assignProp(this, "shape", shape);
329
+ return shape;
330
+ },
331
+ checks: []
332
+ }));
332
333
  }
333
334
  function aborted(x, startIndex = 0) {
334
335
  if (x.aborted === true) return true;
@@ -374,7 +375,7 @@ function issue(...args$113) {
374
375
  }
375
376
 
376
377
  //#endregion
377
- //#region ../../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/core/errors.js
378
+ //#region ../../node_modules/.pnpm/zod@4.2.1/node_modules/zod/v4/core/errors.js
378
379
  const initializer$1 = (inst, def) => {
379
380
  inst.name = "$ZodError";
380
381
  Object.defineProperty(inst, "_zod", {
@@ -485,7 +486,7 @@ function prettifyError(error) {
485
486
  }
486
487
 
487
488
  //#endregion
488
- //#region ../../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/core/parse.js
489
+ //#region ../../node_modules/.pnpm/zod@4.2.1/node_modules/zod/v4/core/parse.js
489
490
  const _parse = (_Err) => (schema, value, _ctx, _params) => {
490
491
  const ctx = _ctx ? Object.assign(_ctx, { async: false }) : { async: false };
491
492
  const result = schema._zod.run({
@@ -589,7 +590,7 @@ const _safeDecodeAsync = (_Err) => async (schema, value, _ctx) => {
589
590
  const safeDecodeAsync$1 = /* @__PURE__ */ _safeDecodeAsync($ZodRealError);
590
591
 
591
592
  //#endregion
592
- //#region ../../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/core/regexes.js
593
+ //#region ../../node_modules/.pnpm/zod@4.2.1/node_modules/zod/v4/core/regexes.js
593
594
  const cuid = /^[cC][^\s-]{8,}$/;
594
595
  const cuid2 = /^[0-9a-z]+$/;
595
596
  const ulid = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/;
@@ -619,7 +620,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-
619
620
  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])$/;
620
621
  const base64 = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/;
621
622
  const base64url = /^[A-Za-z0-9_-]*$/;
622
- const e164 = /^\+[1-9]\d{6,14}$/;
623
+ const e164 = /^\+(?:[0-9]){6,14}[0-9]$/;
623
624
  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])))`;
624
625
  const date$1 = /* @__PURE__ */ new RegExp(`^${dateSource}$`);
625
626
  function timeSource(args$113) {
@@ -642,13 +643,13 @@ const string$1 = (params) => {
642
643
  return /* @__PURE__ */ new RegExp(`^${regex}$`);
643
644
  };
644
645
  const integer = /^-?\d+$/;
645
- const number$1 = /^-?\d+(?:\.\d+)?$/;
646
+ const number$1 = /^-?\d+(?:\.\d+)?/;
646
647
  const boolean$2 = /^(?:true|false)$/i;
647
648
  const lowercase = /^[^A-Z]*$/;
648
649
  const uppercase = /^[^a-z]*$/;
649
650
 
650
651
  //#endregion
651
- //#region ../../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/core/checks.js
652
+ //#region ../../node_modules/.pnpm/zod@4.2.1/node_modules/zod/v4/core/checks.js
652
653
  const $ZodCheck = /* @__PURE__ */ $constructor("$ZodCheck", (inst, def) => {
653
654
  var _a$1;
654
655
  inst._zod ?? (inst._zod = {});
@@ -674,7 +675,7 @@ const $ZodCheckLessThan = /* @__PURE__ */ $constructor("$ZodCheckLessThan", (ins
674
675
  payload.issues.push({
675
676
  origin,
676
677
  code: "too_big",
677
- maximum: typeof def.value === "object" ? def.value.getTime() : def.value,
678
+ maximum: def.value,
678
679
  input: payload.value,
679
680
  inclusive: def.inclusive,
680
681
  inst,
@@ -696,7 +697,7 @@ const $ZodCheckGreaterThan = /* @__PURE__ */ $constructor("$ZodCheckGreaterThan"
696
697
  payload.issues.push({
697
698
  origin,
698
699
  code: "too_small",
699
- minimum: typeof def.value === "object" ? def.value.getTime() : def.value,
700
+ minimum: def.value,
700
701
  input: payload.value,
701
702
  inclusive: def.inclusive,
702
703
  inst,
@@ -758,7 +759,6 @@ const $ZodCheckNumberFormat = /* @__PURE__ */ $constructor("$ZodCheckNumberForma
758
759
  note: "Integers must be within the safe integer range.",
759
760
  inst,
760
761
  origin,
761
- inclusive: true,
762
762
  continue: !def.abort
763
763
  });
764
764
  else payload.issues.push({
@@ -768,7 +768,6 @@ const $ZodCheckNumberFormat = /* @__PURE__ */ $constructor("$ZodCheckNumberForma
768
768
  note: "Integers must be within the safe integer range.",
769
769
  inst,
770
770
  origin,
771
- inclusive: true,
772
771
  continue: !def.abort
773
772
  });
774
773
  return;
@@ -788,9 +787,7 @@ const $ZodCheckNumberFormat = /* @__PURE__ */ $constructor("$ZodCheckNumberForma
788
787
  input,
789
788
  code: "too_big",
790
789
  maximum,
791
- inclusive: true,
792
- inst,
793
- continue: !def.abort
790
+ inst
794
791
  });
795
792
  };
796
793
  });
@@ -1007,7 +1004,7 @@ const $ZodCheckOverwrite = /* @__PURE__ */ $constructor("$ZodCheckOverwrite", (i
1007
1004
  });
1008
1005
 
1009
1006
  //#endregion
1010
- //#region ../../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/core/doc.js
1007
+ //#region ../../node_modules/.pnpm/zod@4.2.1/node_modules/zod/v4/core/doc.js
1011
1008
  var Doc = class {
1012
1009
  constructor(args$113 = []) {
1013
1010
  this.content = [];
@@ -1039,15 +1036,15 @@ var Doc = class {
1039
1036
  };
1040
1037
 
1041
1038
  //#endregion
1042
- //#region ../../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/core/versions.js
1039
+ //#region ../../node_modules/.pnpm/zod@4.2.1/node_modules/zod/v4/core/versions.js
1043
1040
  const version = {
1044
1041
  major: 4,
1045
- minor: 3,
1046
- patch: 5
1042
+ minor: 2,
1043
+ patch: 1
1047
1044
  };
1048
1045
 
1049
1046
  //#endregion
1050
- //#region ../../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/core/schemas.js
1047
+ //#region ../../node_modules/.pnpm/zod@4.2.1/node_modules/zod/v4/core/schemas.js
1051
1048
  const $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
1052
1049
  var _a$1;
1053
1050
  inst ?? (inst = {});
@@ -1123,7 +1120,7 @@ const $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
1123
1120
  return runChecks(result, checks, ctx);
1124
1121
  };
1125
1122
  }
1126
- defineLazy(inst, "~standard", () => ({
1123
+ inst["~standard"] = {
1127
1124
  validate: (value) => {
1128
1125
  try {
1129
1126
  const r = safeParse$2(inst, value);
@@ -1134,7 +1131,7 @@ const $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
1134
1131
  },
1135
1132
  vendor: "zod",
1136
1133
  version: 1
1137
- }));
1134
+ };
1138
1135
  });
1139
1136
  const $ZodString = /* @__PURE__ */ $constructor("$ZodString", (inst, def) => {
1140
1137
  $ZodType.init(inst, def);
@@ -1492,11 +1489,8 @@ const $ZodArray = /* @__PURE__ */ $constructor("$ZodArray", (inst, def) => {
1492
1489
  return payload;
1493
1490
  };
1494
1491
  });
1495
- function handlePropertyResult(result, final, key, input, isOptionalOut) {
1496
- if (result.issues.length) {
1497
- if (isOptionalOut && !(key in input)) return;
1498
- final.issues.push(...prefixIssues(key, result.issues));
1499
- }
1492
+ function handlePropertyResult(result, final, key, input) {
1493
+ if (result.issues.length) final.issues.push(...prefixIssues(key, result.issues));
1500
1494
  if (result.value === void 0) {
1501
1495
  if (key in input) final.value[key] = void 0;
1502
1496
  } else final.value[key] = result.value;
@@ -1518,7 +1512,6 @@ function handleCatchall(proms, input, payload, ctx, def, inst) {
1518
1512
  const keySet = def.keySet;
1519
1513
  const _catchall = def.catchall._zod;
1520
1514
  const t = _catchall.def.type;
1521
- const isOptionalOut = _catchall.optout === "optional";
1522
1515
  for (const key in input) {
1523
1516
  if (keySet.has(key)) continue;
1524
1517
  if (t === "never") {
@@ -1529,8 +1522,8 @@ function handleCatchall(proms, input, payload, ctx, def, inst) {
1529
1522
  value: input[key],
1530
1523
  issues: []
1531
1524
  }, ctx);
1532
- if (r instanceof Promise) proms.push(r.then((r$1) => handlePropertyResult(r$1, payload, key, input, isOptionalOut)));
1533
- else handlePropertyResult(r, payload, key, input, isOptionalOut);
1525
+ if (r instanceof Promise) proms.push(r.then((r$1) => handlePropertyResult(r$1, payload, key, input)));
1526
+ else handlePropertyResult(r, payload, key, input);
1534
1527
  }
1535
1528
  if (unrecognized.length) payload.issues.push({
1536
1529
  code: "unrecognized_keys",
@@ -1585,14 +1578,12 @@ const $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => {
1585
1578
  const proms = [];
1586
1579
  const shape = value.shape;
1587
1580
  for (const key of value.keys) {
1588
- const el = shape[key];
1589
- const isOptionalOut = el._zod.optout === "optional";
1590
- const r = el._zod.run({
1581
+ const r = shape[key]._zod.run({
1591
1582
  value: input[key],
1592
1583
  issues: []
1593
1584
  }, ctx);
1594
- if (r instanceof Promise) proms.push(r.then((r$1) => handlePropertyResult(r$1, payload, key, input, isOptionalOut)));
1595
- else handlePropertyResult(r, payload, key, input, isOptionalOut);
1585
+ if (r instanceof Promise) proms.push(r.then((r$1) => handlePropertyResult(r$1, payload, key, input)));
1586
+ else handlePropertyResult(r, payload, key, input);
1596
1587
  }
1597
1588
  if (!catchall) return proms.length ? Promise.all(proms).then(() => payload) : payload;
1598
1589
  return handleCatchall(proms, input, payload, ctx, _normalized.value, inst);
@@ -1621,28 +1612,8 @@ const $ZodObjectJIT = /* @__PURE__ */ $constructor("$ZodObjectJIT", (inst, def)
1621
1612
  for (const key of normalized.keys) {
1622
1613
  const id = ids[key];
1623
1614
  const k = esc(key);
1624
- const isOptionalOut = shape[key]?._zod?.optout === "optional";
1625
1615
  doc.write(`const ${id} = ${parseStr(key)};`);
1626
- if (isOptionalOut) doc.write(`
1627
- if (${id}.issues.length) {
1628
- if (${k} in input) {
1629
- payload.issues = payload.issues.concat(${id}.issues.map(iss => ({
1630
- ...iss,
1631
- path: iss.path ? [${k}, ...iss.path] : [${k}]
1632
- })));
1633
- }
1634
- }
1635
-
1636
- if (${id}.value === undefined) {
1637
- if (${k} in input) {
1638
- newResult[${k}] = undefined;
1639
- }
1640
- } else {
1641
- newResult[${k}] = ${id}.value;
1642
- }
1643
-
1644
- `);
1645
- else doc.write(`
1616
+ doc.write(`
1646
1617
  if (${id}.issues.length) {
1647
1618
  payload.issues = payload.issues.concat(${id}.issues.map(iss => ({
1648
1619
  ...iss,
@@ -1650,6 +1621,7 @@ const $ZodObjectJIT = /* @__PURE__ */ $constructor("$ZodObjectJIT", (inst, def)
1650
1621
  })));
1651
1622
  }
1652
1623
 
1624
+
1653
1625
  if (${id}.value === undefined) {
1654
1626
  if (${k} in input) {
1655
1627
  newResult[${k}] = undefined;
@@ -1823,25 +1795,8 @@ function mergeValues(a, b) {
1823
1795
  };
1824
1796
  }
1825
1797
  function handleIntersectionResults(result, left, right) {
1826
- const unrecKeys = /* @__PURE__ */ new Map();
1827
- let unrecIssue;
1828
- for (const iss of left.issues) if (iss.code === "unrecognized_keys") {
1829
- unrecIssue ?? (unrecIssue = iss);
1830
- for (const k of iss.keys) {
1831
- if (!unrecKeys.has(k)) unrecKeys.set(k, {});
1832
- unrecKeys.get(k).l = true;
1833
- }
1834
- } else result.issues.push(iss);
1835
- for (const iss of right.issues) if (iss.code === "unrecognized_keys") for (const k of iss.keys) {
1836
- if (!unrecKeys.has(k)) unrecKeys.set(k, {});
1837
- unrecKeys.get(k).r = true;
1838
- }
1839
- else result.issues.push(iss);
1840
- const bothKeys = [...unrecKeys].filter(([, f]) => f.l && f.r).map(([k]) => k);
1841
- if (bothKeys.length && unrecIssue) result.issues.push({
1842
- ...unrecIssue,
1843
- keys: bothKeys
1844
- });
1798
+ if (left.issues.length) result.issues.push(...left.issues);
1799
+ if (right.issues.length) result.issues.push(...right.issues);
1845
1800
  if (aborted(result)) return result;
1846
1801
  const merged = mergeValues(left.value, right.value);
1847
1802
  if (!merged.valid) throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(merged.mergeErrorPath)}`);
@@ -1896,19 +1851,11 @@ const $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
1896
1851
  payload.value = {};
1897
1852
  for (const key of Reflect.ownKeys(input)) {
1898
1853
  if (key === "__proto__") continue;
1899
- let keyResult = def.keyType._zod.run({
1854
+ const keyResult = def.keyType._zod.run({
1900
1855
  value: key,
1901
1856
  issues: []
1902
1857
  }, ctx);
1903
1858
  if (keyResult instanceof Promise) throw new Error("Async schemas not supported in object keys currently");
1904
- if (typeof key === "string" && number$1.test(key) && keyResult.issues.length && keyResult.issues.some((iss) => iss.code === "invalid_type" && iss.expected === "number")) {
1905
- const retryResult = def.keyType._zod.run({
1906
- value: Number(key),
1907
- issues: []
1908
- }, ctx);
1909
- if (retryResult instanceof Promise) throw new Error("Async schemas not supported in object keys currently");
1910
- if (retryResult.issues.length === 0) keyResult = retryResult;
1911
- }
1912
1859
  if (keyResult.issues.length) {
1913
1860
  if (def.mode === "loose") payload.value[key] = input[key];
1914
1861
  else payload.issues.push({
@@ -1999,14 +1946,6 @@ const $ZodOptional = /* @__PURE__ */ $constructor("$ZodOptional", (inst, def) =>
1999
1946
  return def.innerType._zod.run(payload, ctx);
2000
1947
  };
2001
1948
  });
2002
- const $ZodExactOptional = /* @__PURE__ */ $constructor("$ZodExactOptional", (inst, def) => {
2003
- $ZodOptional.init(inst, def);
2004
- defineLazy(inst._zod, "values", () => def.innerType._zod.values);
2005
- defineLazy(inst._zod, "pattern", () => def.innerType._zod.pattern);
2006
- inst._zod.parse = (payload, ctx) => {
2007
- return def.innerType._zod.run(payload, ctx);
2008
- };
2009
- });
2010
1949
  const $ZodNullable = /* @__PURE__ */ $constructor("$ZodNullable", (inst, def) => {
2011
1950
  $ZodType.init(inst, def);
2012
1951
  defineLazy(inst._zod, "optin", () => def.innerType._zod.optin);
@@ -2191,7 +2130,7 @@ function handleRefineResult(result, payload, input, inst) {
2191
2130
  }
2192
2131
 
2193
2132
  //#endregion
2194
- //#region ../../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/core/registries.js
2133
+ //#region ../../node_modules/.pnpm/zod@4.2.1/node_modules/zod/v4/core/registries.js
2195
2134
  var _a;
2196
2135
  var $ZodRegistry = class {
2197
2136
  constructor() {
@@ -2201,7 +2140,10 @@ var $ZodRegistry = class {
2201
2140
  add(schema, ..._meta) {
2202
2141
  const meta$2 = _meta[0];
2203
2142
  this._map.set(schema, meta$2);
2204
- if (meta$2 && typeof meta$2 === "object" && "id" in meta$2) this._idmap.set(meta$2.id, schema);
2143
+ if (meta$2 && typeof meta$2 === "object" && "id" in meta$2) {
2144
+ if (this._idmap.has(meta$2.id)) throw new Error(`ID ${meta$2.id} already exists in the registry`);
2145
+ this._idmap.set(meta$2.id, schema);
2146
+ }
2205
2147
  return this;
2206
2148
  }
2207
2149
  clear() {
@@ -2239,15 +2181,13 @@ function registry() {
2239
2181
  const globalRegistry = globalThis.__zod_globalRegistry;
2240
2182
 
2241
2183
  //#endregion
2242
- //#region ../../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/core/api.js
2243
- /* @__NO_SIDE_EFFECTS__ */
2184
+ //#region ../../node_modules/.pnpm/zod@4.2.1/node_modules/zod/v4/core/api.js
2244
2185
  function _string(Class, params) {
2245
2186
  return new Class({
2246
2187
  type: "string",
2247
2188
  ...normalizeParams(params)
2248
2189
  });
2249
2190
  }
2250
- /* @__NO_SIDE_EFFECTS__ */
2251
2191
  function _email(Class, params) {
2252
2192
  return new Class({
2253
2193
  type: "string",
@@ -2257,7 +2197,6 @@ function _email(Class, params) {
2257
2197
  ...normalizeParams(params)
2258
2198
  });
2259
2199
  }
2260
- /* @__NO_SIDE_EFFECTS__ */
2261
2200
  function _guid(Class, params) {
2262
2201
  return new Class({
2263
2202
  type: "string",
@@ -2267,7 +2206,6 @@ function _guid(Class, params) {
2267
2206
  ...normalizeParams(params)
2268
2207
  });
2269
2208
  }
2270
- /* @__NO_SIDE_EFFECTS__ */
2271
2209
  function _uuid(Class, params) {
2272
2210
  return new Class({
2273
2211
  type: "string",
@@ -2277,7 +2215,6 @@ function _uuid(Class, params) {
2277
2215
  ...normalizeParams(params)
2278
2216
  });
2279
2217
  }
2280
- /* @__NO_SIDE_EFFECTS__ */
2281
2218
  function _uuidv4(Class, params) {
2282
2219
  return new Class({
2283
2220
  type: "string",
@@ -2288,7 +2225,6 @@ function _uuidv4(Class, params) {
2288
2225
  ...normalizeParams(params)
2289
2226
  });
2290
2227
  }
2291
- /* @__NO_SIDE_EFFECTS__ */
2292
2228
  function _uuidv6(Class, params) {
2293
2229
  return new Class({
2294
2230
  type: "string",
@@ -2299,7 +2235,6 @@ function _uuidv6(Class, params) {
2299
2235
  ...normalizeParams(params)
2300
2236
  });
2301
2237
  }
2302
- /* @__NO_SIDE_EFFECTS__ */
2303
2238
  function _uuidv7(Class, params) {
2304
2239
  return new Class({
2305
2240
  type: "string",
@@ -2310,7 +2245,6 @@ function _uuidv7(Class, params) {
2310
2245
  ...normalizeParams(params)
2311
2246
  });
2312
2247
  }
2313
- /* @__NO_SIDE_EFFECTS__ */
2314
2248
  function _url(Class, params) {
2315
2249
  return new Class({
2316
2250
  type: "string",
@@ -2320,7 +2254,6 @@ function _url(Class, params) {
2320
2254
  ...normalizeParams(params)
2321
2255
  });
2322
2256
  }
2323
- /* @__NO_SIDE_EFFECTS__ */
2324
2257
  function _emoji(Class, params) {
2325
2258
  return new Class({
2326
2259
  type: "string",
@@ -2330,7 +2263,6 @@ function _emoji(Class, params) {
2330
2263
  ...normalizeParams(params)
2331
2264
  });
2332
2265
  }
2333
- /* @__NO_SIDE_EFFECTS__ */
2334
2266
  function _nanoid(Class, params) {
2335
2267
  return new Class({
2336
2268
  type: "string",
@@ -2340,7 +2272,6 @@ function _nanoid(Class, params) {
2340
2272
  ...normalizeParams(params)
2341
2273
  });
2342
2274
  }
2343
- /* @__NO_SIDE_EFFECTS__ */
2344
2275
  function _cuid(Class, params) {
2345
2276
  return new Class({
2346
2277
  type: "string",
@@ -2350,7 +2281,6 @@ function _cuid(Class, params) {
2350
2281
  ...normalizeParams(params)
2351
2282
  });
2352
2283
  }
2353
- /* @__NO_SIDE_EFFECTS__ */
2354
2284
  function _cuid2(Class, params) {
2355
2285
  return new Class({
2356
2286
  type: "string",
@@ -2360,7 +2290,6 @@ function _cuid2(Class, params) {
2360
2290
  ...normalizeParams(params)
2361
2291
  });
2362
2292
  }
2363
- /* @__NO_SIDE_EFFECTS__ */
2364
2293
  function _ulid(Class, params) {
2365
2294
  return new Class({
2366
2295
  type: "string",
@@ -2370,7 +2299,6 @@ function _ulid(Class, params) {
2370
2299
  ...normalizeParams(params)
2371
2300
  });
2372
2301
  }
2373
- /* @__NO_SIDE_EFFECTS__ */
2374
2302
  function _xid(Class, params) {
2375
2303
  return new Class({
2376
2304
  type: "string",
@@ -2380,7 +2308,6 @@ function _xid(Class, params) {
2380
2308
  ...normalizeParams(params)
2381
2309
  });
2382
2310
  }
2383
- /* @__NO_SIDE_EFFECTS__ */
2384
2311
  function _ksuid(Class, params) {
2385
2312
  return new Class({
2386
2313
  type: "string",
@@ -2390,7 +2317,6 @@ function _ksuid(Class, params) {
2390
2317
  ...normalizeParams(params)
2391
2318
  });
2392
2319
  }
2393
- /* @__NO_SIDE_EFFECTS__ */
2394
2320
  function _ipv4(Class, params) {
2395
2321
  return new Class({
2396
2322
  type: "string",
@@ -2400,7 +2326,6 @@ function _ipv4(Class, params) {
2400
2326
  ...normalizeParams(params)
2401
2327
  });
2402
2328
  }
2403
- /* @__NO_SIDE_EFFECTS__ */
2404
2329
  function _ipv6(Class, params) {
2405
2330
  return new Class({
2406
2331
  type: "string",
@@ -2410,7 +2335,6 @@ function _ipv6(Class, params) {
2410
2335
  ...normalizeParams(params)
2411
2336
  });
2412
2337
  }
2413
- /* @__NO_SIDE_EFFECTS__ */
2414
2338
  function _cidrv4(Class, params) {
2415
2339
  return new Class({
2416
2340
  type: "string",
@@ -2420,7 +2344,6 @@ function _cidrv4(Class, params) {
2420
2344
  ...normalizeParams(params)
2421
2345
  });
2422
2346
  }
2423
- /* @__NO_SIDE_EFFECTS__ */
2424
2347
  function _cidrv6(Class, params) {
2425
2348
  return new Class({
2426
2349
  type: "string",
@@ -2430,7 +2353,6 @@ function _cidrv6(Class, params) {
2430
2353
  ...normalizeParams(params)
2431
2354
  });
2432
2355
  }
2433
- /* @__NO_SIDE_EFFECTS__ */
2434
2356
  function _base64(Class, params) {
2435
2357
  return new Class({
2436
2358
  type: "string",
@@ -2440,7 +2362,6 @@ function _base64(Class, params) {
2440
2362
  ...normalizeParams(params)
2441
2363
  });
2442
2364
  }
2443
- /* @__NO_SIDE_EFFECTS__ */
2444
2365
  function _base64url(Class, params) {
2445
2366
  return new Class({
2446
2367
  type: "string",
@@ -2450,7 +2371,6 @@ function _base64url(Class, params) {
2450
2371
  ...normalizeParams(params)
2451
2372
  });
2452
2373
  }
2453
- /* @__NO_SIDE_EFFECTS__ */
2454
2374
  function _e164(Class, params) {
2455
2375
  return new Class({
2456
2376
  type: "string",
@@ -2460,7 +2380,6 @@ function _e164(Class, params) {
2460
2380
  ...normalizeParams(params)
2461
2381
  });
2462
2382
  }
2463
- /* @__NO_SIDE_EFFECTS__ */
2464
2383
  function _jwt(Class, params) {
2465
2384
  return new Class({
2466
2385
  type: "string",
@@ -2470,7 +2389,6 @@ function _jwt(Class, params) {
2470
2389
  ...normalizeParams(params)
2471
2390
  });
2472
2391
  }
2473
- /* @__NO_SIDE_EFFECTS__ */
2474
2392
  function _isoDateTime(Class, params) {
2475
2393
  return new Class({
2476
2394
  type: "string",
@@ -2482,7 +2400,6 @@ function _isoDateTime(Class, params) {
2482
2400
  ...normalizeParams(params)
2483
2401
  });
2484
2402
  }
2485
- /* @__NO_SIDE_EFFECTS__ */
2486
2403
  function _isoDate(Class, params) {
2487
2404
  return new Class({
2488
2405
  type: "string",
@@ -2491,7 +2408,6 @@ function _isoDate(Class, params) {
2491
2408
  ...normalizeParams(params)
2492
2409
  });
2493
2410
  }
2494
- /* @__NO_SIDE_EFFECTS__ */
2495
2411
  function _isoTime(Class, params) {
2496
2412
  return new Class({
2497
2413
  type: "string",
@@ -2501,7 +2417,6 @@ function _isoTime(Class, params) {
2501
2417
  ...normalizeParams(params)
2502
2418
  });
2503
2419
  }
2504
- /* @__NO_SIDE_EFFECTS__ */
2505
2420
  function _isoDuration(Class, params) {
2506
2421
  return new Class({
2507
2422
  type: "string",
@@ -2510,7 +2425,6 @@ function _isoDuration(Class, params) {
2510
2425
  ...normalizeParams(params)
2511
2426
  });
2512
2427
  }
2513
- /* @__NO_SIDE_EFFECTS__ */
2514
2428
  function _number(Class, params) {
2515
2429
  return new Class({
2516
2430
  type: "number",
@@ -2518,7 +2432,6 @@ function _number(Class, params) {
2518
2432
  ...normalizeParams(params)
2519
2433
  });
2520
2434
  }
2521
- /* @__NO_SIDE_EFFECTS__ */
2522
2435
  function _int(Class, params) {
2523
2436
  return new Class({
2524
2437
  type: "number",
@@ -2528,14 +2441,12 @@ function _int(Class, params) {
2528
2441
  ...normalizeParams(params)
2529
2442
  });
2530
2443
  }
2531
- /* @__NO_SIDE_EFFECTS__ */
2532
2444
  function _boolean(Class, params) {
2533
2445
  return new Class({
2534
2446
  type: "boolean",
2535
2447
  ...normalizeParams(params)
2536
2448
  });
2537
2449
  }
2538
- /* @__NO_SIDE_EFFECTS__ */
2539
2450
  function _coercedBoolean(Class, params) {
2540
2451
  return new Class({
2541
2452
  type: "boolean",
@@ -2543,22 +2454,18 @@ function _coercedBoolean(Class, params) {
2543
2454
  ...normalizeParams(params)
2544
2455
  });
2545
2456
  }
2546
- /* @__NO_SIDE_EFFECTS__ */
2547
2457
  function _any(Class) {
2548
2458
  return new Class({ type: "any" });
2549
2459
  }
2550
- /* @__NO_SIDE_EFFECTS__ */
2551
2460
  function _unknown(Class) {
2552
2461
  return new Class({ type: "unknown" });
2553
2462
  }
2554
- /* @__NO_SIDE_EFFECTS__ */
2555
2463
  function _never(Class, params) {
2556
2464
  return new Class({
2557
2465
  type: "never",
2558
2466
  ...normalizeParams(params)
2559
2467
  });
2560
2468
  }
2561
- /* @__NO_SIDE_EFFECTS__ */
2562
2469
  function _lt(value, params) {
2563
2470
  return new $ZodCheckLessThan({
2564
2471
  check: "less_than",
@@ -2567,7 +2474,6 @@ function _lt(value, params) {
2567
2474
  inclusive: false
2568
2475
  });
2569
2476
  }
2570
- /* @__NO_SIDE_EFFECTS__ */
2571
2477
  function _lte(value, params) {
2572
2478
  return new $ZodCheckLessThan({
2573
2479
  check: "less_than",
@@ -2576,7 +2482,6 @@ function _lte(value, params) {
2576
2482
  inclusive: true
2577
2483
  });
2578
2484
  }
2579
- /* @__NO_SIDE_EFFECTS__ */
2580
2485
  function _gt(value, params) {
2581
2486
  return new $ZodCheckGreaterThan({
2582
2487
  check: "greater_than",
@@ -2585,7 +2490,6 @@ function _gt(value, params) {
2585
2490
  inclusive: false
2586
2491
  });
2587
2492
  }
2588
- /* @__NO_SIDE_EFFECTS__ */
2589
2493
  function _gte(value, params) {
2590
2494
  return new $ZodCheckGreaterThan({
2591
2495
  check: "greater_than",
@@ -2594,7 +2498,6 @@ function _gte(value, params) {
2594
2498
  inclusive: true
2595
2499
  });
2596
2500
  }
2597
- /* @__NO_SIDE_EFFECTS__ */
2598
2501
  function _multipleOf(value, params) {
2599
2502
  return new $ZodCheckMultipleOf({
2600
2503
  check: "multiple_of",
@@ -2602,7 +2505,6 @@ function _multipleOf(value, params) {
2602
2505
  value
2603
2506
  });
2604
2507
  }
2605
- /* @__NO_SIDE_EFFECTS__ */
2606
2508
  function _maxLength(maximum, params) {
2607
2509
  return new $ZodCheckMaxLength({
2608
2510
  check: "max_length",
@@ -2610,7 +2512,6 @@ function _maxLength(maximum, params) {
2610
2512
  maximum
2611
2513
  });
2612
2514
  }
2613
- /* @__NO_SIDE_EFFECTS__ */
2614
2515
  function _minLength(minimum, params) {
2615
2516
  return new $ZodCheckMinLength({
2616
2517
  check: "min_length",
@@ -2618,7 +2519,6 @@ function _minLength(minimum, params) {
2618
2519
  minimum
2619
2520
  });
2620
2521
  }
2621
- /* @__NO_SIDE_EFFECTS__ */
2622
2522
  function _length(length, params) {
2623
2523
  return new $ZodCheckLengthEquals({
2624
2524
  check: "length_equals",
@@ -2626,7 +2526,6 @@ function _length(length, params) {
2626
2526
  length
2627
2527
  });
2628
2528
  }
2629
- /* @__NO_SIDE_EFFECTS__ */
2630
2529
  function _regex(pattern, params) {
2631
2530
  return new $ZodCheckRegex({
2632
2531
  check: "string_format",
@@ -2635,7 +2534,6 @@ function _regex(pattern, params) {
2635
2534
  pattern
2636
2535
  });
2637
2536
  }
2638
- /* @__NO_SIDE_EFFECTS__ */
2639
2537
  function _lowercase(params) {
2640
2538
  return new $ZodCheckLowerCase({
2641
2539
  check: "string_format",
@@ -2643,7 +2541,6 @@ function _lowercase(params) {
2643
2541
  ...normalizeParams(params)
2644
2542
  });
2645
2543
  }
2646
- /* @__NO_SIDE_EFFECTS__ */
2647
2544
  function _uppercase(params) {
2648
2545
  return new $ZodCheckUpperCase({
2649
2546
  check: "string_format",
@@ -2651,7 +2548,6 @@ function _uppercase(params) {
2651
2548
  ...normalizeParams(params)
2652
2549
  });
2653
2550
  }
2654
- /* @__NO_SIDE_EFFECTS__ */
2655
2551
  function _includes(includes, params) {
2656
2552
  return new $ZodCheckIncludes({
2657
2553
  check: "string_format",
@@ -2660,7 +2556,6 @@ function _includes(includes, params) {
2660
2556
  includes
2661
2557
  });
2662
2558
  }
2663
- /* @__NO_SIDE_EFFECTS__ */
2664
2559
  function _startsWith(prefix, params) {
2665
2560
  return new $ZodCheckStartsWith({
2666
2561
  check: "string_format",
@@ -2669,7 +2564,6 @@ function _startsWith(prefix, params) {
2669
2564
  prefix
2670
2565
  });
2671
2566
  }
2672
- /* @__NO_SIDE_EFFECTS__ */
2673
2567
  function _endsWith(suffix, params) {
2674
2568
  return new $ZodCheckEndsWith({
2675
2569
  check: "string_format",
@@ -2678,34 +2572,27 @@ function _endsWith(suffix, params) {
2678
2572
  suffix
2679
2573
  });
2680
2574
  }
2681
- /* @__NO_SIDE_EFFECTS__ */
2682
2575
  function _overwrite(tx) {
2683
2576
  return new $ZodCheckOverwrite({
2684
2577
  check: "overwrite",
2685
2578
  tx
2686
2579
  });
2687
2580
  }
2688
- /* @__NO_SIDE_EFFECTS__ */
2689
2581
  function _normalize(form) {
2690
- return /* @__PURE__ */ _overwrite((input) => input.normalize(form));
2582
+ return _overwrite((input) => input.normalize(form));
2691
2583
  }
2692
- /* @__NO_SIDE_EFFECTS__ */
2693
2584
  function _trim() {
2694
- return /* @__PURE__ */ _overwrite((input) => input.trim());
2585
+ return _overwrite((input) => input.trim());
2695
2586
  }
2696
- /* @__NO_SIDE_EFFECTS__ */
2697
2587
  function _toLowerCase() {
2698
- return /* @__PURE__ */ _overwrite((input) => input.toLowerCase());
2588
+ return _overwrite((input) => input.toLowerCase());
2699
2589
  }
2700
- /* @__NO_SIDE_EFFECTS__ */
2701
2590
  function _toUpperCase() {
2702
- return /* @__PURE__ */ _overwrite((input) => input.toUpperCase());
2591
+ return _overwrite((input) => input.toUpperCase());
2703
2592
  }
2704
- /* @__NO_SIDE_EFFECTS__ */
2705
2593
  function _slugify() {
2706
- return /* @__PURE__ */ _overwrite((input) => slugify(input));
2594
+ return _overwrite((input) => slugify(input));
2707
2595
  }
2708
- /* @__NO_SIDE_EFFECTS__ */
2709
2596
  function _array(Class, element, params) {
2710
2597
  return new Class({
2711
2598
  type: "array",
@@ -2713,7 +2600,6 @@ function _array(Class, element, params) {
2713
2600
  ...normalizeParams(params)
2714
2601
  });
2715
2602
  }
2716
- /* @__NO_SIDE_EFFECTS__ */
2717
2603
  function _custom(Class, fn, _params) {
2718
2604
  const norm = normalizeParams(_params);
2719
2605
  norm.abort ?? (norm.abort = true);
@@ -2724,7 +2610,6 @@ function _custom(Class, fn, _params) {
2724
2610
  ...norm
2725
2611
  });
2726
2612
  }
2727
- /* @__NO_SIDE_EFFECTS__ */
2728
2613
  function _refine(Class, fn, _params) {
2729
2614
  return new Class({
2730
2615
  type: "custom",
@@ -2733,9 +2618,8 @@ function _refine(Class, fn, _params) {
2733
2618
  ...normalizeParams(_params)
2734
2619
  });
2735
2620
  }
2736
- /* @__NO_SIDE_EFFECTS__ */
2737
2621
  function _superRefine(fn) {
2738
- const ch = /* @__PURE__ */ _check((payload) => {
2622
+ const ch = _check((payload) => {
2739
2623
  payload.addIssue = (issue$1) => {
2740
2624
  if (typeof issue$1 === "string") payload.issues.push(issue(issue$1, payload.value, ch._zod.def));
2741
2625
  else {
@@ -2752,7 +2636,6 @@ function _superRefine(fn) {
2752
2636
  });
2753
2637
  return ch;
2754
2638
  }
2755
- /* @__NO_SIDE_EFFECTS__ */
2756
2639
  function _check(fn, params) {
2757
2640
  const ch = new $ZodCheck({
2758
2641
  check: "custom",
@@ -2761,7 +2644,6 @@ function _check(fn, params) {
2761
2644
  ch._zod.check = fn;
2762
2645
  return ch;
2763
2646
  }
2764
- /* @__NO_SIDE_EFFECTS__ */
2765
2647
  function describe$1(description) {
2766
2648
  const ch = new $ZodCheck({ check: "describe" });
2767
2649
  ch._zod.onattach = [(inst) => {
@@ -2774,7 +2656,6 @@ function describe$1(description) {
2774
2656
  ch._zod.check = () => {};
2775
2657
  return ch;
2776
2658
  }
2777
- /* @__NO_SIDE_EFFECTS__ */
2778
2659
  function meta$1(metadata) {
2779
2660
  const ch = new $ZodCheck({ check: "meta" });
2780
2661
  ch._zod.onattach = [(inst) => {
@@ -2789,7 +2670,7 @@ function meta$1(metadata) {
2789
2670
  }
2790
2671
 
2791
2672
  //#endregion
2792
- //#region ../../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/core/to-json-schema.js
2673
+ //#region ../../node_modules/.pnpm/zod@4.2.1/node_modules/zod/v4/core/to-json-schema.js
2793
2674
  function initializeContext(params) {
2794
2675
  let target = params?.target ?? "draft-2020-12";
2795
2676
  if (target === "draft-4") target = "draft-04";
@@ -2835,19 +2716,18 @@ function process(schema, ctx, _params = {
2835
2716
  schemaPath: [..._params.schemaPath, schema],
2836
2717
  path: _params.path
2837
2718
  };
2838
- if (schema._zod.processJSONSchema) schema._zod.processJSONSchema(ctx, result.schema, params);
2719
+ const parent = schema._zod.parent;
2720
+ if (parent) {
2721
+ result.ref = parent;
2722
+ process(parent, ctx, params);
2723
+ ctx.seen.get(parent).isParent = true;
2724
+ } else if (schema._zod.processJSONSchema) schema._zod.processJSONSchema(ctx, result.schema, params);
2839
2725
  else {
2840
2726
  const _json = result.schema;
2841
2727
  const processor = ctx.processors[def.type];
2842
2728
  if (!processor) throw new Error(`[toJSONSchema]: Non-representable type encountered: ${def.type}`);
2843
2729
  processor(schema, ctx, _json, params);
2844
2730
  }
2845
- const parent = schema._zod.parent;
2846
- if (parent) {
2847
- if (!result.ref) result.ref = parent;
2848
- process(parent, ctx, params);
2849
- ctx.seen.get(parent).isParent = true;
2850
- }
2851
2731
  }
2852
2732
  const meta$2 = ctx.metadataRegistry.get(schema);
2853
2733
  if (meta$2) Object.assign(result.schema, meta$2);
@@ -2862,15 +2742,6 @@ function process(schema, ctx, _params = {
2862
2742
  function extractDefs(ctx, schema) {
2863
2743
  const root = ctx.seen.get(schema);
2864
2744
  if (!root) throw new Error("Unprocessed schema. This is a bug in Zod.");
2865
- const idToSchema = /* @__PURE__ */ new Map();
2866
- for (const entry of ctx.seen.entries()) {
2867
- const id = ctx.metadataRegistry.get(entry[0])?.id;
2868
- if (id) {
2869
- const existing = idToSchema.get(id);
2870
- if (existing && existing !== entry[0]) throw new Error(`Duplicate schema id "${id}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);
2871
- idToSchema.set(id, entry[0]);
2872
- }
2873
- }
2874
2745
  const makeURI = (entry) => {
2875
2746
  const defsSegment = ctx.target === "draft-2020-12" ? "$defs" : "definitions";
2876
2747
  if (ctx.external) {
@@ -2942,42 +2813,23 @@ function finalize(ctx, schema) {
2942
2813
  if (!root) throw new Error("Unprocessed schema. This is a bug in Zod.");
2943
2814
  const flattenRef = (zodSchema) => {
2944
2815
  const seen = ctx.seen.get(zodSchema);
2945
- if (seen.ref === null) return;
2946
2816
  const schema$1 = seen.def ?? seen.schema;
2947
2817
  const _cached = { ...schema$1 };
2818
+ if (seen.ref === null) return;
2948
2819
  const ref = seen.ref;
2949
2820
  seen.ref = null;
2950
2821
  if (ref) {
2951
2822
  flattenRef(ref);
2952
- const refSeen = ctx.seen.get(ref);
2953
- const refSchema = refSeen.schema;
2823
+ const refSchema = ctx.seen.get(ref).schema;
2954
2824
  if (refSchema.$ref && (ctx.target === "draft-07" || ctx.target === "draft-04" || ctx.target === "openapi-3.0")) {
2955
2825
  schema$1.allOf = schema$1.allOf ?? [];
2956
2826
  schema$1.allOf.push(refSchema);
2957
- } else Object.assign(schema$1, refSchema);
2958
- Object.assign(schema$1, _cached);
2959
- if (zodSchema._zod.parent === ref) for (const key in schema$1) {
2960
- if (key === "$ref" || key === "allOf") continue;
2961
- if (!(key in _cached)) delete schema$1[key];
2962
- }
2963
- if (refSchema.$ref) for (const key in schema$1) {
2964
- if (key === "$ref" || key === "allOf") continue;
2965
- if (key in refSeen.def && JSON.stringify(schema$1[key]) === JSON.stringify(refSeen.def[key])) delete schema$1[key];
2966
- }
2967
- }
2968
- const parent = zodSchema._zod.parent;
2969
- if (parent && parent !== ref) {
2970
- flattenRef(parent);
2971
- const parentSeen = ctx.seen.get(parent);
2972
- if (parentSeen?.schema.$ref) {
2973
- schema$1.$ref = parentSeen.schema.$ref;
2974
- if (parentSeen.def) for (const key in schema$1) {
2975
- if (key === "$ref" || key === "allOf") continue;
2976
- if (key in parentSeen.def && JSON.stringify(schema$1[key]) === JSON.stringify(parentSeen.def[key])) delete schema$1[key];
2977
- }
2827
+ } else {
2828
+ Object.assign(schema$1, refSchema);
2829
+ Object.assign(schema$1, _cached);
2978
2830
  }
2979
2831
  }
2980
- ctx.override({
2832
+ if (!seen.isParent) ctx.override({
2981
2833
  zodSchema,
2982
2834
  jsonSchema: schema$1,
2983
2835
  path: seen.path ?? []
@@ -3008,8 +2860,8 @@ function finalize(ctx, schema) {
3008
2860
  value: {
3009
2861
  ...schema["~standard"],
3010
2862
  jsonSchema: {
3011
- input: createStandardJSONSchemaMethod(schema, "input", ctx.processors),
3012
- output: createStandardJSONSchemaMethod(schema, "output", ctx.processors)
2863
+ input: createStandardJSONSchemaMethod(schema, "input"),
2864
+ output: createStandardJSONSchemaMethod(schema, "output")
3013
2865
  }
3014
2866
  },
3015
2867
  enumerable: false,
@@ -3061,13 +2913,13 @@ const createToJSONSchemaMethod = (schema, processors = {}) => (params) => {
3061
2913
  extractDefs(ctx, schema);
3062
2914
  return finalize(ctx, schema);
3063
2915
  };
3064
- const createStandardJSONSchemaMethod = (schema, io, processors = {}) => (params) => {
2916
+ const createStandardJSONSchemaMethod = (schema, io) => (params) => {
3065
2917
  const { libraryOptions, target } = params ?? {};
3066
2918
  const ctx = initializeContext({
3067
2919
  ...libraryOptions ?? {},
3068
2920
  target,
3069
2921
  io,
3070
- processors
2922
+ processors: {}
3071
2923
  });
3072
2924
  process(schema, ctx);
3073
2925
  extractDefs(ctx, schema);
@@ -3075,7 +2927,7 @@ const createStandardJSONSchemaMethod = (schema, io, processors = {}) => (params)
3075
2927
  };
3076
2928
 
3077
2929
  //#endregion
3078
- //#region ../../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/core/json-schema-processors.js
2930
+ //#region ../../node_modules/.pnpm/zod@4.2.1/node_modules/zod/v4/core/json-schema-processors.js
3079
2931
  const formatMap = {
3080
2932
  guid: "uuid",
3081
2933
  url: "uri",
@@ -3092,7 +2944,6 @@ const stringProcessor = (schema, ctx, _json, _params) => {
3092
2944
  if (format) {
3093
2945
  json$1.format = formatMap[format] ?? format;
3094
2946
  if (json$1.format === "") delete json$1.format;
3095
- if (format === "time") delete json$1.format;
3096
2947
  }
3097
2948
  if (contentEncoding) json$1.contentEncoding = contentEncoding;
3098
2949
  if (patterns && patterns.size > 0) {
@@ -3230,34 +3081,14 @@ const recordProcessor = (schema, ctx, _json, params) => {
3230
3081
  const json$1 = _json;
3231
3082
  const def = schema._zod.def;
3232
3083
  json$1.type = "object";
3233
- const keyType = def.keyType;
3234
- const patterns = keyType._zod.bag?.patterns;
3235
- if (def.mode === "loose" && patterns && patterns.size > 0) {
3236
- const valueSchema = process(def.valueType, ctx, {
3237
- ...params,
3238
- path: [
3239
- ...params.path,
3240
- "patternProperties",
3241
- "*"
3242
- ]
3243
- });
3244
- json$1.patternProperties = {};
3245
- for (const pattern of patterns) json$1.patternProperties[pattern.source] = valueSchema;
3246
- } else {
3247
- if (ctx.target === "draft-07" || ctx.target === "draft-2020-12") json$1.propertyNames = process(def.keyType, ctx, {
3248
- ...params,
3249
- path: [...params.path, "propertyNames"]
3250
- });
3251
- json$1.additionalProperties = process(def.valueType, ctx, {
3252
- ...params,
3253
- path: [...params.path, "additionalProperties"]
3254
- });
3255
- }
3256
- const keyValues = keyType._zod.values;
3257
- if (keyValues) {
3258
- const validKeyValues = [...keyValues].filter((v) => typeof v === "string" || typeof v === "number");
3259
- if (validKeyValues.length > 0) json$1.required = validKeyValues;
3260
- }
3084
+ if (ctx.target === "draft-07" || ctx.target === "draft-2020-12") json$1.propertyNames = process(def.keyType, ctx, {
3085
+ ...params,
3086
+ path: [...params.path, "propertyNames"]
3087
+ });
3088
+ json$1.additionalProperties = process(def.valueType, ctx, {
3089
+ ...params,
3090
+ path: [...params.path, "additionalProperties"]
3091
+ });
3261
3092
  };
3262
3093
  const nullableProcessor = (schema, ctx, json$1, params) => {
3263
3094
  const def = schema._zod.def;
@@ -3329,7 +3160,7 @@ const lazyProcessor = (schema, ctx, _json, params) => {
3329
3160
  };
3330
3161
 
3331
3162
  //#endregion
3332
- //#region ../../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/classic/iso.js
3163
+ //#region ../../node_modules/.pnpm/zod@4.2.1/node_modules/zod/v4/classic/iso.js
3333
3164
  const ZodISODateTime = /* @__PURE__ */ $constructor("ZodISODateTime", (inst, def) => {
3334
3165
  $ZodISODateTime.init(inst, def);
3335
3166
  ZodStringFormat.init(inst, def);
@@ -3360,7 +3191,7 @@ function duration(params) {
3360
3191
  }
3361
3192
 
3362
3193
  //#endregion
3363
- //#region ../../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/classic/errors.js
3194
+ //#region ../../node_modules/.pnpm/zod@4.2.1/node_modules/zod/v4/classic/errors.js
3364
3195
  const initializer = (inst, issues) => {
3365
3196
  $ZodError.init(inst, issues);
3366
3197
  inst.name = "ZodError";
@@ -3384,7 +3215,7 @@ const ZodError = $constructor("ZodError", initializer);
3384
3215
  const ZodRealError = $constructor("ZodError", initializer, { Parent: Error });
3385
3216
 
3386
3217
  //#endregion
3387
- //#region ../../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/classic/parse.js
3218
+ //#region ../../node_modules/.pnpm/zod@4.2.1/node_modules/zod/v4/classic/parse.js
3388
3219
  const parse = /* @__PURE__ */ _parse(ZodRealError);
3389
3220
  const parseAsync = /* @__PURE__ */ _parseAsync(ZodRealError);
3390
3221
  const safeParse$1 = /* @__PURE__ */ _safeParse(ZodRealError);
@@ -3399,7 +3230,7 @@ const safeEncodeAsync = /* @__PURE__ */ _safeEncodeAsync(ZodRealError);
3399
3230
  const safeDecodeAsync = /* @__PURE__ */ _safeDecodeAsync(ZodRealError);
3400
3231
 
3401
3232
  //#endregion
3402
- //#region ../../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/classic/schemas.js
3233
+ //#region ../../node_modules/.pnpm/zod@4.2.1/node_modules/zod/v4/classic/schemas.js
3403
3234
  const ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
3404
3235
  $ZodType.init(inst, def);
3405
3236
  Object.assign(inst["~standard"], { jsonSchema: {
@@ -3415,9 +3246,8 @@ const ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
3415
3246
  check: ch,
3416
3247
  def: { check: "custom" },
3417
3248
  onattach: []
3418
- } } : ch)] }), { parent: true });
3249
+ } } : ch)] }));
3419
3250
  };
3420
- inst.with = inst.check;
3421
3251
  inst.clone = (def$1, params) => clone(inst, def$1, params);
3422
3252
  inst.brand = () => inst;
3423
3253
  inst.register = ((reg, meta$2) => {
@@ -3441,7 +3271,6 @@ const ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
3441
3271
  inst.superRefine = (refinement) => inst.check(superRefine(refinement));
3442
3272
  inst.overwrite = (fn) => inst.check(_overwrite(fn));
3443
3273
  inst.optional = () => optional(inst);
3444
- inst.exactOptional = () => exactOptional(inst);
3445
3274
  inst.nullable = () => nullable(inst);
3446
3275
  inst.nullish = () => optional(nullable(inst));
3447
3276
  inst.nonoptional = (params) => nonoptional(inst, params);
@@ -3473,7 +3302,6 @@ const ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
3473
3302
  };
3474
3303
  inst.isOptional = () => inst.safeParse(void 0).success;
3475
3304
  inst.isNullable = () => inst.safeParse(null).success;
3476
- inst.apply = (fn) => fn(inst);
3477
3305
  return inst;
3478
3306
  });
3479
3307
  /** @internal */
@@ -3865,18 +3693,6 @@ function optional(innerType) {
3865
3693
  innerType
3866
3694
  });
3867
3695
  }
3868
- const ZodExactOptional = /* @__PURE__ */ $constructor("ZodExactOptional", (inst, def) => {
3869
- $ZodExactOptional.init(inst, def);
3870
- ZodType.init(inst, def);
3871
- inst._zod.processJSONSchema = (ctx, json$1, params) => optionalProcessor(inst, ctx, json$1, params);
3872
- inst.unwrap = () => inst._zod.def.innerType;
3873
- });
3874
- function exactOptional(innerType) {
3875
- return new ZodExactOptional({
3876
- type: "optional",
3877
- innerType
3878
- });
3879
- }
3880
3696
  const ZodNullable = /* @__PURE__ */ $constructor("ZodNullable", (inst, def) => {
3881
3697
  $ZodNullable.init(inst, def);
3882
3698
  ZodType.init(inst, def);
@@ -4003,7 +3819,7 @@ const describe = describe$1;
4003
3819
  const meta = meta$1;
4004
3820
 
4005
3821
  //#endregion
4006
- //#region ../../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/classic/coerce.js
3822
+ //#region ../../node_modules/.pnpm/zod@4.2.1/node_modules/zod/v4/classic/coerce.js
4007
3823
  function boolean(params) {
4008
3824
  return _coercedBoolean(ZodBoolean, params);
4009
3825
  }
@@ -16944,7 +16760,7 @@ async function $do$42(client$, request, options) {
16944
16760
  if (!parsed$.ok) return [parsed$, { status: "invalid" }];
16945
16761
  const payload$ = parsed$.value;
16946
16762
  const body$ = null;
16947
- const path$ = pathToFunc("/oauth/login")();
16763
+ const path$ = pathToFunc("/manage/oauth/login")();
16948
16764
  const query$ = encodeFormQuery({
16949
16765
  "projectId": payload$.projectId,
16950
16766
  "tenantId": payload$.tenantId,
@@ -17075,7 +16891,7 @@ async function $do$41(client$, request, options) {
17075
16891
  if (!parsed$.ok) return [parsed$, { status: "invalid" }];
17076
16892
  const payload$ = parsed$.value;
17077
16893
  const body$ = null;
17078
- const path$ = pathToFunc("/oauth/callback")();
16894
+ const path$ = pathToFunc("/manage/oauth/callback")();
17079
16895
  const query$ = encodeFormQuery({
17080
16896
  "code": payload$.code,
17081
16897
  "error": payload$.error,