@cortexkit/aft-opencode 0.41.0 → 0.42.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
@@ -12944,6 +12944,7 @@ class BinaryBridge {
12944
12944
  }
12945
12945
  // ../aft-bridge/dist/callgraph-format.js
12946
12946
  import { homedir as homedir3 } from "node:os";
12947
+ var UNRESOLVED_SUMMARY_NAME_LIMIT = 10;
12947
12948
  var PLAIN_CALLGRAPH_THEME = {
12948
12949
  fg: (_role, text) => text
12949
12950
  };
@@ -12979,7 +12980,26 @@ function treeLine(depth, text) {
12979
12980
  function nameMatchEdgeMarker(record, theme) {
12980
12981
  return asString(record.resolved_by) === "name_match" ? ` ${theme.fg("warning", "~")}` : "";
12981
12982
  }
12982
- function renderCallTreeNode(node, depth, lines, theme) {
12983
+ function isUnresolvedLeaf(node) {
12984
+ return node.resolved === false && asRecords(node.children).length === 0;
12985
+ }
12986
+ function unresolvedSummaryText(nodes) {
12987
+ const distinctNames = [];
12988
+ const seen = new Set;
12989
+ for (const node of nodes) {
12990
+ const name = asString(node.name) ?? "(unknown)";
12991
+ if (seen.has(name))
12992
+ continue;
12993
+ seen.add(name);
12994
+ distinctNames.push(name);
12995
+ }
12996
+ const displayed = distinctNames.slice(0, UNRESOLVED_SUMMARY_NAME_LIMIT);
12997
+ const hidden = distinctNames.length - displayed.length;
12998
+ const names = hidden > 0 ? `${displayed.join(", ")}, … (+${hidden} more)` : displayed.join(", ");
12999
+ const noun = nodes.length === 1 ? "call" : "calls";
13000
+ return `+ ${nodes.length} unresolved external ${noun}: ${names}`;
13001
+ }
13002
+ function renderCallTreeNode(node, depth, lines, theme, options) {
12983
13003
  const name = asString(node.name) ?? "(unknown)";
12984
13004
  const file = shortenPath(asString(node.file) ?? "(unknown file)");
12985
13005
  const line = asNumber(node.line);
@@ -12987,8 +13007,31 @@ function renderCallTreeNode(node, depth, lines, theme) {
12987
13007
  const nameMatch = nameMatchEdgeMarker(node, theme);
12988
13008
  const location = line !== undefined ? `[${file}:${line}]` : `[${file}]`;
12989
13009
  lines.push(treeLine(depth, `${name} ${location}${unresolved}${nameMatch}`));
12990
- asRecords(node.children).forEach((child) => {
12991
- renderCallTreeNode(child, depth + 1, lines, theme);
13010
+ const children = asRecords(node.children);
13011
+ if (options.includeUnresolved) {
13012
+ children.forEach((child) => {
13013
+ renderCallTreeNode(child, depth + 1, lines, theme, options);
13014
+ });
13015
+ return;
13016
+ }
13017
+ const unresolvedLeaves = children.filter(isUnresolvedLeaf);
13018
+ if (unresolvedLeaves.length === 0) {
13019
+ children.forEach((child) => {
13020
+ renderCallTreeNode(child, depth + 1, lines, theme, options);
13021
+ });
13022
+ return;
13023
+ }
13024
+ const unresolvedLeafSet = new Set(unresolvedLeaves);
13025
+ let summaryInserted = false;
13026
+ children.forEach((child) => {
13027
+ if (unresolvedLeafSet.has(child)) {
13028
+ if (!summaryInserted) {
13029
+ lines.push(treeLine(depth + 1, theme.fg("warning", unresolvedSummaryText(unresolvedLeaves))));
13030
+ summaryInserted = true;
13031
+ }
13032
+ return;
13033
+ }
13034
+ renderCallTreeNode(child, depth + 1, lines, theme, options);
12992
13035
  });
12993
13036
  }
12994
13037
  function depthWarning(response, theme, depthField = "depth_limited", truncatedField = "truncated") {
@@ -12999,6 +13042,11 @@ function depthWarning(response, theme, depthField = "depth_limited", truncatedFi
12999
13042
  const detail = truncated > 0 ? `, ${truncated} truncated` : "";
13000
13043
  return theme.fg("warning", `(depth limited${detail})`);
13001
13044
  }
13045
+ function hubSummaryLine(response, theme) {
13046
+ const summary = asRecord(response.hub_summary);
13047
+ const message = summary ? asString(summary.message) : undefined;
13048
+ return message ? theme.fg("warning", message) : undefined;
13049
+ }
13002
13050
  function renderTracePath(path2, index, lines, theme) {
13003
13051
  lines.push(`Path ${index + 1}`);
13004
13052
  asRecords(path2.hops).forEach((hop, hopIndex) => {
@@ -13035,13 +13083,13 @@ function renderCallersGroupLines(group, theme) {
13035
13083
  }
13036
13084
  return lines;
13037
13085
  }
13038
- function formatCallgraphSections(op, response, theme = PLAIN_CALLGRAPH_THEME) {
13086
+ function formatCallgraphSections(op, response, theme = PLAIN_CALLGRAPH_THEME, options = {}) {
13039
13087
  const record = asRecord(response);
13040
13088
  if (!record)
13041
13089
  return [theme.fg("muted", "No navigation result.")];
13042
13090
  if (op === "call_tree") {
13043
13091
  const lines = [];
13044
- renderCallTreeNode(record, 0, lines, theme);
13092
+ renderCallTreeNode(record, 0, lines, theme, options);
13045
13093
  const warning = depthWarning(record, theme);
13046
13094
  if (warning)
13047
13095
  lines.push(warning);
@@ -13050,6 +13098,7 @@ function formatCallgraphSections(op, response, theme = PLAIN_CALLGRAPH_THEME) {
13050
13098
  if (op === "callers") {
13051
13099
  const groups = asRecords(record.callers);
13052
13100
  const warning = depthWarning(record, theme);
13101
+ const hubSummary = hubSummaryLine(record, theme);
13053
13102
  const total = asNumber(record.total_callers) ?? 0;
13054
13103
  const sections2 = [
13055
13104
  joinNonEmpty([
@@ -13058,6 +13107,8 @@ function formatCallgraphSections(op, response, theme = PLAIN_CALLGRAPH_THEME) {
13058
13107
  warning
13059
13108
  ])
13060
13109
  ];
13110
+ if (hubSummary)
13111
+ sections2.push(hubSummary);
13061
13112
  groups.forEach((group) => {
13062
13113
  sections2.push(renderCallersGroupLines(group, theme).join(`
13063
13114
  `));
@@ -13085,6 +13136,7 @@ function formatCallgraphSections(op, response, theme = PLAIN_CALLGRAPH_THEME) {
13085
13136
  if (op === "trace_to") {
13086
13137
  const paths = asRecords(record.paths);
13087
13138
  const warning = depthWarning(record, theme, "max_depth_reached", "truncated_paths");
13139
+ const hubSummary = hubSummaryLine(record, theme);
13088
13140
  const totalPaths = asNumber(record.total_paths) ?? paths.length;
13089
13141
  const entryPoints = asNumber(record.entry_points_found) ?? 0;
13090
13142
  const sections2 = [
@@ -13094,6 +13146,8 @@ function formatCallgraphSections(op, response, theme = PLAIN_CALLGRAPH_THEME) {
13094
13146
  warning
13095
13147
  ])
13096
13148
  ];
13149
+ if (hubSummary)
13150
+ sections2.push(hubSummary);
13097
13151
  if (paths.length === 0)
13098
13152
  sections2.push(theme.fg("muted", "No entry paths found."));
13099
13153
  paths.forEach((path2, index) => {
@@ -13107,6 +13161,7 @@ function formatCallgraphSections(op, response, theme = PLAIN_CALLGRAPH_THEME) {
13107
13161
  if (op === "impact") {
13108
13162
  const callers = asRecords(record.callers);
13109
13163
  const warning = depthWarning(record, theme);
13164
+ const hubSummary = hubSummaryLine(record, theme);
13110
13165
  const totalAffected = asNumber(record.total_affected) ?? callers.length;
13111
13166
  const affectedFiles = asNumber(record.affected_files) ?? 0;
13112
13167
  const sections2 = [
@@ -13116,6 +13171,8 @@ function formatCallgraphSections(op, response, theme = PLAIN_CALLGRAPH_THEME) {
13116
13171
  warning
13117
13172
  ])
13118
13173
  ];
13174
+ if (hubSummary)
13175
+ sections2.push(hubSummary);
13119
13176
  if (callers.length === 0)
13120
13177
  sections2.push(theme.fg("muted", "No impacted callers found."));
13121
13178
  callers.forEach((caller) => {
@@ -15467,6 +15524,9 @@ function formatReadFooter(agentSpecifiedRange, data, options) {
15467
15524
  (Showing lines ${startLine}-${endLine} of ${totalLines}. Use ${options.rangeHint} to read other sections.)`;
15468
15525
  }
15469
15526
  // ../aft-bridge/dist/zoom-format.js
15527
+ function formatExtraCallSites(ref) {
15528
+ return Number.isInteger(ref.extra_count) && (ref.extra_count ?? 0) > 0 ? ` +${ref.extra_count}` : "";
15529
+ }
15470
15530
  function formatZoomText(targetLabel, response) {
15471
15531
  const range = response.range;
15472
15532
  const startLine = range?.start_line ?? 1;
@@ -15504,13 +15564,13 @@ function formatZoomText(targetLabel, response) {
15504
15564
  if (callsOut.length > 0) {
15505
15565
  out.push("", "──── calls_out");
15506
15566
  for (const ref of callsOut) {
15507
- out.push(` ${ref.name} (line ${ref.line})`);
15567
+ out.push(` ${ref.name} (line ${ref.line})${formatExtraCallSites(ref)}`);
15508
15568
  }
15509
15569
  }
15510
15570
  if (calledBy.length > 0) {
15511
15571
  out.push("", "──── called_by");
15512
15572
  for (const ref of calledBy) {
15513
- out.push(` ${ref.name} (line ${ref.line})`);
15573
+ out.push(` ${ref.name} (line ${ref.line})${formatExtraCallSites(ref)}`);
15514
15574
  }
15515
15575
  }
15516
15576
  return out.join(`
@@ -16411,7 +16471,7 @@ function formatDuration(completion) {
16411
16471
  import { existsSync as existsSync7, readFileSync as readFileSync6, renameSync as renameSync5, unlinkSync as unlinkSync5, writeFileSync as writeFileSync4 } from "node:fs";
16412
16472
  var import_comment_json = __toESM(require_src2(), 1);
16413
16473
 
16414
- // ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/classic/external.js
16474
+ // ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/classic/external.js
16415
16475
  var exports_external = {};
16416
16476
  __export(exports_external, {
16417
16477
  xor: () => xor,
@@ -16513,6 +16573,7 @@ __export(exports_external, {
16513
16573
  iso: () => exports_iso,
16514
16574
  ipv6: () => ipv62,
16515
16575
  ipv4: () => ipv42,
16576
+ invertCodec: () => invertCodec,
16516
16577
  intersection: () => intersection,
16517
16578
  int64: () => int64,
16518
16579
  int32: () => int32,
@@ -16591,6 +16652,7 @@ __export(exports_external, {
16591
16652
  ZodRealError: () => ZodRealError,
16592
16653
  ZodReadonly: () => ZodReadonly,
16593
16654
  ZodPromise: () => ZodPromise,
16655
+ ZodPreprocess: () => ZodPreprocess,
16594
16656
  ZodPrefault: () => ZodPrefault,
16595
16657
  ZodPipe: () => ZodPipe,
16596
16658
  ZodOptional: () => ZodOptional,
@@ -16652,7 +16714,7 @@ __export(exports_external, {
16652
16714
  $brand: () => $brand
16653
16715
  });
16654
16716
 
16655
- // ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/core/index.js
16717
+ // ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/core/index.js
16656
16718
  var exports_core2 = {};
16657
16719
  __export(exports_core2, {
16658
16720
  version: () => version,
@@ -16851,6 +16913,7 @@ __export(exports_core2, {
16851
16913
  $ZodRealError: () => $ZodRealError,
16852
16914
  $ZodReadonly: () => $ZodReadonly,
16853
16915
  $ZodPromise: () => $ZodPromise,
16916
+ $ZodPreprocess: () => $ZodPreprocess,
16854
16917
  $ZodPrefault: () => $ZodPrefault,
16855
16918
  $ZodPipe: () => $ZodPipe,
16856
16919
  $ZodOptional: () => $ZodOptional,
@@ -16930,8 +16993,9 @@ __export(exports_core2, {
16930
16993
  $ZodAny: () => $ZodAny
16931
16994
  });
16932
16995
 
16933
- // ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/core/core.js
16934
- var NEVER = Object.freeze({
16996
+ // ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/core/core.js
16997
+ var _a;
16998
+ var NEVER = /* @__PURE__ */ Object.freeze({
16935
16999
  status: "aborted"
16936
17000
  });
16937
17001
  function $constructor(name, initializer, params) {
@@ -16966,10 +17030,10 @@ function $constructor(name, initializer, params) {
16966
17030
  }
16967
17031
  Object.defineProperty(Definition, "name", { value: name });
16968
17032
  function _(def) {
16969
- var _a;
17033
+ var _a2;
16970
17034
  const inst = params?.Parent ? new Definition : this;
16971
17035
  init(inst, def);
16972
- (_a = inst._zod).deferred ?? (_a.deferred = []);
17036
+ (_a2 = inst._zod).deferred ?? (_a2.deferred = []);
16973
17037
  for (const fn of inst._zod.deferred) {
16974
17038
  fn();
16975
17039
  }
@@ -17000,13 +17064,14 @@ class $ZodEncodeError extends Error {
17000
17064
  this.name = "ZodEncodeError";
17001
17065
  }
17002
17066
  }
17003
- var globalConfig = {};
17067
+ (_a = globalThis).__zod_globalConfig ?? (_a.__zod_globalConfig = {});
17068
+ var globalConfig = globalThis.__zod_globalConfig;
17004
17069
  function config(newConfig) {
17005
17070
  if (newConfig)
17006
17071
  Object.assign(globalConfig, newConfig);
17007
17072
  return globalConfig;
17008
17073
  }
17009
- // ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/core/util.js
17074
+ // ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/core/util.js
17010
17075
  var exports_util = {};
17011
17076
  __export(exports_util, {
17012
17077
  unwrapMessage: () => unwrapMessage,
@@ -17048,6 +17113,7 @@ __export(exports_util, {
17048
17113
  floatSafeRemainder: () => floatSafeRemainder,
17049
17114
  finalizeIssue: () => finalizeIssue,
17050
17115
  extend: () => extend,
17116
+ explicitlyAborted: () => explicitlyAborted,
17051
17117
  escapeRegex: () => escapeRegex,
17052
17118
  esc: () => esc,
17053
17119
  defineLazy: () => defineLazy,
@@ -17118,21 +17184,14 @@ function cleanRegex(source) {
17118
17184
  return source.slice(start, end);
17119
17185
  }
17120
17186
  function floatSafeRemainder(val, step) {
17121
- const valDecCount = (val.toString().split(".")[1] || "").length;
17122
- const stepString = step.toString();
17123
- let stepDecCount = (stepString.split(".")[1] || "").length;
17124
- if (stepDecCount === 0 && /\d?e-\d?/.test(stepString)) {
17125
- const match = stepString.match(/\d?e-(\d?)/);
17126
- if (match?.[1]) {
17127
- stepDecCount = Number.parseInt(match[1]);
17128
- }
17129
- }
17130
- const decCount = valDecCount > stepDecCount ? valDecCount : stepDecCount;
17131
- const valInt = Number.parseInt(val.toFixed(decCount).replace(".", ""));
17132
- const stepInt = Number.parseInt(step.toFixed(decCount).replace(".", ""));
17133
- return valInt % stepInt / 10 ** decCount;
17187
+ const ratio = val / step;
17188
+ const roundedRatio = Math.round(ratio);
17189
+ const tolerance = Number.EPSILON * Math.max(Math.abs(ratio), 1);
17190
+ if (Math.abs(ratio - roundedRatio) < tolerance)
17191
+ return 0;
17192
+ return ratio - roundedRatio;
17134
17193
  }
17135
- var EVALUATING = Symbol("evaluating");
17194
+ var EVALUATING = /* @__PURE__ */ Symbol("evaluating");
17136
17195
  function defineLazy(object, key, getter) {
17137
17196
  let value = undefined;
17138
17197
  Object.defineProperty(object, key, {
@@ -17210,7 +17269,10 @@ var captureStackTrace = "captureStackTrace" in Error ? Error.captureStackTrace :
17210
17269
  function isObject(data) {
17211
17270
  return typeof data === "object" && data !== null && !Array.isArray(data);
17212
17271
  }
17213
- var allowsEval = cached(() => {
17272
+ var allowsEval = /* @__PURE__ */ cached(() => {
17273
+ if (globalConfig.jitless) {
17274
+ return false;
17275
+ }
17214
17276
  if (typeof navigator !== "undefined" && navigator?.userAgent?.includes("Cloudflare")) {
17215
17277
  return false;
17216
17278
  }
@@ -17243,6 +17305,10 @@ function shallowClone(o) {
17243
17305
  return { ...o };
17244
17306
  if (Array.isArray(o))
17245
17307
  return [...o];
17308
+ if (o instanceof Map)
17309
+ return new Map(o);
17310
+ if (o instanceof Set)
17311
+ return new Set(o);
17246
17312
  return o;
17247
17313
  }
17248
17314
  function numKeys(data) {
@@ -17298,8 +17364,15 @@ var getParsedType = (data) => {
17298
17364
  throw new Error(`Unknown data type: ${t}`);
17299
17365
  }
17300
17366
  };
17301
- var propertyKeyTypes = new Set(["string", "number", "symbol"]);
17302
- var primitiveTypes = new Set(["string", "number", "bigint", "boolean", "symbol", "undefined"]);
17367
+ var propertyKeyTypes = /* @__PURE__ */ new Set(["string", "number", "symbol"]);
17368
+ var primitiveTypes = /* @__PURE__ */ new Set([
17369
+ "string",
17370
+ "number",
17371
+ "bigint",
17372
+ "boolean",
17373
+ "symbol",
17374
+ "undefined"
17375
+ ]);
17303
17376
  function escapeRegex(str) {
17304
17377
  return str.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
17305
17378
  }
@@ -17468,6 +17541,9 @@ function safeExtend(schema, shape) {
17468
17541
  return clone(schema, def);
17469
17542
  }
17470
17543
  function merge(a, b) {
17544
+ if (a._zod.def.checks?.length) {
17545
+ throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");
17546
+ }
17471
17547
  const def = mergeDefs(a._zod.def, {
17472
17548
  get shape() {
17473
17549
  const _shape = { ...a._zod.def.shape, ...b._zod.def.shape };
@@ -17477,7 +17553,7 @@ function merge(a, b) {
17477
17553
  get catchall() {
17478
17554
  return b._zod.def.catchall;
17479
17555
  },
17480
- checks: []
17556
+ checks: b._zod.def.checks ?? []
17481
17557
  });
17482
17558
  return clone(a, def);
17483
17559
  }
@@ -17560,10 +17636,20 @@ function aborted(x, startIndex = 0) {
17560
17636
  }
17561
17637
  return false;
17562
17638
  }
17639
+ function explicitlyAborted(x, startIndex = 0) {
17640
+ if (x.aborted === true)
17641
+ return true;
17642
+ for (let i = startIndex;i < x.issues.length; i++) {
17643
+ if (x.issues[i]?.continue === false) {
17644
+ return true;
17645
+ }
17646
+ }
17647
+ return false;
17648
+ }
17563
17649
  function prefixIssues(path3, issues) {
17564
17650
  return issues.map((iss) => {
17565
- var _a;
17566
- (_a = iss).path ?? (_a.path = []);
17651
+ var _a2;
17652
+ (_a2 = iss).path ?? (_a2.path = []);
17567
17653
  iss.path.unshift(path3);
17568
17654
  return iss;
17569
17655
  });
@@ -17572,17 +17658,14 @@ function unwrapMessage(message) {
17572
17658
  return typeof message === "string" ? message : message?.message;
17573
17659
  }
17574
17660
  function finalizeIssue(iss, ctx, config2) {
17575
- const full = { ...iss, path: iss.path ?? [] };
17576
- if (!iss.message) {
17577
- const message = unwrapMessage(iss.inst?._zod.def?.error?.(iss)) ?? unwrapMessage(ctx?.error?.(iss)) ?? unwrapMessage(config2.customError?.(iss)) ?? unwrapMessage(config2.localeError?.(iss)) ?? "Invalid input";
17578
- full.message = message;
17661
+ const message = iss.message ? iss.message : unwrapMessage(iss.inst?._zod.def?.error?.(iss)) ?? unwrapMessage(ctx?.error?.(iss)) ?? unwrapMessage(config2.customError?.(iss)) ?? unwrapMessage(config2.localeError?.(iss)) ?? "Invalid input";
17662
+ const { inst: _inst, continue: _continue, input: _input, ...rest } = iss;
17663
+ rest.path ?? (rest.path = []);
17664
+ rest.message = message;
17665
+ if (ctx?.reportInput) {
17666
+ rest.input = _input;
17579
17667
  }
17580
- delete full.inst;
17581
- delete full.continue;
17582
- if (!ctx?.reportInput) {
17583
- delete full.input;
17584
- }
17585
- return full;
17668
+ return rest;
17586
17669
  }
17587
17670
  function getSizableOrigin(input) {
17588
17671
  if (input instanceof Set)
@@ -17680,7 +17763,7 @@ class Class {
17680
17763
  constructor(..._args) {}
17681
17764
  }
17682
17765
 
17683
- // ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/core/errors.js
17766
+ // ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/core/errors.js
17684
17767
  var initializer = (inst, def) => {
17685
17768
  inst.name = "$ZodError";
17686
17769
  Object.defineProperty(inst, "_zod", {
@@ -17714,30 +17797,33 @@ function flattenError(error3, mapper = (issue2) => issue2.message) {
17714
17797
  }
17715
17798
  function formatError(error3, mapper = (issue2) => issue2.message) {
17716
17799
  const fieldErrors = { _errors: [] };
17717
- const processError = (error4) => {
17800
+ const processError = (error4, path3 = []) => {
17718
17801
  for (const issue2 of error4.issues) {
17719
17802
  if (issue2.code === "invalid_union" && issue2.errors.length) {
17720
- issue2.errors.map((issues) => processError({ issues }));
17803
+ issue2.errors.map((issues) => processError({ issues }, [...path3, ...issue2.path]));
17721
17804
  } else if (issue2.code === "invalid_key") {
17722
- processError({ issues: issue2.issues });
17805
+ processError({ issues: issue2.issues }, [...path3, ...issue2.path]);
17723
17806
  } else if (issue2.code === "invalid_element") {
17724
- processError({ issues: issue2.issues });
17725
- } else if (issue2.path.length === 0) {
17726
- fieldErrors._errors.push(mapper(issue2));
17807
+ processError({ issues: issue2.issues }, [...path3, ...issue2.path]);
17727
17808
  } else {
17728
- let curr = fieldErrors;
17729
- let i = 0;
17730
- while (i < issue2.path.length) {
17731
- const el = issue2.path[i];
17732
- const terminal = i === issue2.path.length - 1;
17733
- if (!terminal) {
17734
- curr[el] = curr[el] || { _errors: [] };
17735
- } else {
17736
- curr[el] = curr[el] || { _errors: [] };
17737
- curr[el]._errors.push(mapper(issue2));
17809
+ const fullpath = [...path3, ...issue2.path];
17810
+ if (fullpath.length === 0) {
17811
+ fieldErrors._errors.push(mapper(issue2));
17812
+ } else {
17813
+ let curr = fieldErrors;
17814
+ let i = 0;
17815
+ while (i < fullpath.length) {
17816
+ const el = fullpath[i];
17817
+ const terminal = i === fullpath.length - 1;
17818
+ if (!terminal) {
17819
+ curr[el] = curr[el] || { _errors: [] };
17820
+ } else {
17821
+ curr[el] = curr[el] || { _errors: [] };
17822
+ curr[el]._errors.push(mapper(issue2));
17823
+ }
17824
+ curr = curr[el];
17825
+ i++;
17738
17826
  }
17739
- curr = curr[el];
17740
- i++;
17741
17827
  }
17742
17828
  }
17743
17829
  }
@@ -17748,14 +17834,14 @@ function formatError(error3, mapper = (issue2) => issue2.message) {
17748
17834
  function treeifyError(error3, mapper = (issue2) => issue2.message) {
17749
17835
  const result = { errors: [] };
17750
17836
  const processError = (error4, path3 = []) => {
17751
- var _a, _b;
17837
+ var _a2, _b;
17752
17838
  for (const issue2 of error4.issues) {
17753
17839
  if (issue2.code === "invalid_union" && issue2.errors.length) {
17754
- issue2.errors.map((issues) => processError({ issues }, issue2.path));
17840
+ issue2.errors.map((issues) => processError({ issues }, [...path3, ...issue2.path]));
17755
17841
  } else if (issue2.code === "invalid_key") {
17756
- processError({ issues: issue2.issues }, issue2.path);
17842
+ processError({ issues: issue2.issues }, [...path3, ...issue2.path]);
17757
17843
  } else if (issue2.code === "invalid_element") {
17758
- processError({ issues: issue2.issues }, issue2.path);
17844
+ processError({ issues: issue2.issues }, [...path3, ...issue2.path]);
17759
17845
  } else {
17760
17846
  const fullpath = [...path3, ...issue2.path];
17761
17847
  if (fullpath.length === 0) {
@@ -17769,7 +17855,7 @@ function treeifyError(error3, mapper = (issue2) => issue2.message) {
17769
17855
  const terminal = i === fullpath.length - 1;
17770
17856
  if (typeof el === "string") {
17771
17857
  curr.properties ?? (curr.properties = {});
17772
- (_a = curr.properties)[el] ?? (_a[el] = { errors: [] });
17858
+ (_a2 = curr.properties)[el] ?? (_a2[el] = { errors: [] });
17773
17859
  curr = curr.properties[el];
17774
17860
  } else {
17775
17861
  curr.items ?? (curr.items = []);
@@ -17817,9 +17903,9 @@ function prettifyError(error3) {
17817
17903
  `);
17818
17904
  }
17819
17905
 
17820
- // ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/core/parse.js
17906
+ // ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/core/parse.js
17821
17907
  var _parse = (_Err) => (schema, value, _ctx, _params) => {
17822
- const ctx = _ctx ? Object.assign(_ctx, { async: false }) : { async: false };
17908
+ const ctx = _ctx ? { ..._ctx, async: false } : { async: false };
17823
17909
  const result = schema._zod.run({ value, issues: [] }, ctx);
17824
17910
  if (result instanceof Promise) {
17825
17911
  throw new $ZodAsyncError;
@@ -17833,7 +17919,7 @@ var _parse = (_Err) => (schema, value, _ctx, _params) => {
17833
17919
  };
17834
17920
  var parse = /* @__PURE__ */ _parse($ZodRealError);
17835
17921
  var _parseAsync = (_Err) => async (schema, value, _ctx, params) => {
17836
- const ctx = _ctx ? Object.assign(_ctx, { async: true }) : { async: true };
17922
+ const ctx = _ctx ? { ..._ctx, async: true } : { async: true };
17837
17923
  let result = schema._zod.run({ value, issues: [] }, ctx);
17838
17924
  if (result instanceof Promise)
17839
17925
  result = await result;
@@ -17858,7 +17944,7 @@ var _safeParse = (_Err) => (schema, value, _ctx) => {
17858
17944
  };
17859
17945
  var safeParse = /* @__PURE__ */ _safeParse($ZodRealError);
17860
17946
  var _safeParseAsync = (_Err) => async (schema, value, _ctx) => {
17861
- const ctx = _ctx ? Object.assign(_ctx, { async: true }) : { async: true };
17947
+ const ctx = _ctx ? { ..._ctx, async: true } : { async: true };
17862
17948
  let result = schema._zod.run({ value, issues: [] }, ctx);
17863
17949
  if (result instanceof Promise)
17864
17950
  result = await result;
@@ -17869,7 +17955,7 @@ var _safeParseAsync = (_Err) => async (schema, value, _ctx) => {
17869
17955
  };
17870
17956
  var safeParseAsync = /* @__PURE__ */ _safeParseAsync($ZodRealError);
17871
17957
  var _encode = (_Err) => (schema, value, _ctx) => {
17872
- const ctx = _ctx ? Object.assign(_ctx, { direction: "backward" }) : { direction: "backward" };
17958
+ const ctx = _ctx ? { ..._ctx, direction: "backward" } : { direction: "backward" };
17873
17959
  return _parse(_Err)(schema, value, ctx);
17874
17960
  };
17875
17961
  var encode = /* @__PURE__ */ _encode($ZodRealError);
@@ -17878,7 +17964,7 @@ var _decode = (_Err) => (schema, value, _ctx) => {
17878
17964
  };
17879
17965
  var decode = /* @__PURE__ */ _decode($ZodRealError);
17880
17966
  var _encodeAsync = (_Err) => async (schema, value, _ctx) => {
17881
- const ctx = _ctx ? Object.assign(_ctx, { direction: "backward" }) : { direction: "backward" };
17967
+ const ctx = _ctx ? { ..._ctx, direction: "backward" } : { direction: "backward" };
17882
17968
  return _parseAsync(_Err)(schema, value, ctx);
17883
17969
  };
17884
17970
  var encodeAsync = /* @__PURE__ */ _encodeAsync($ZodRealError);
@@ -17887,7 +17973,7 @@ var _decodeAsync = (_Err) => async (schema, value, _ctx) => {
17887
17973
  };
17888
17974
  var decodeAsync = /* @__PURE__ */ _decodeAsync($ZodRealError);
17889
17975
  var _safeEncode = (_Err) => (schema, value, _ctx) => {
17890
- const ctx = _ctx ? Object.assign(_ctx, { direction: "backward" }) : { direction: "backward" };
17976
+ const ctx = _ctx ? { ..._ctx, direction: "backward" } : { direction: "backward" };
17891
17977
  return _safeParse(_Err)(schema, value, ctx);
17892
17978
  };
17893
17979
  var safeEncode = /* @__PURE__ */ _safeEncode($ZodRealError);
@@ -17896,7 +17982,7 @@ var _safeDecode = (_Err) => (schema, value, _ctx) => {
17896
17982
  };
17897
17983
  var safeDecode = /* @__PURE__ */ _safeDecode($ZodRealError);
17898
17984
  var _safeEncodeAsync = (_Err) => async (schema, value, _ctx) => {
17899
- const ctx = _ctx ? Object.assign(_ctx, { direction: "backward" }) : { direction: "backward" };
17985
+ const ctx = _ctx ? { ..._ctx, direction: "backward" } : { direction: "backward" };
17900
17986
  return _safeParseAsync(_Err)(schema, value, ctx);
17901
17987
  };
17902
17988
  var safeEncodeAsync = /* @__PURE__ */ _safeEncodeAsync($ZodRealError);
@@ -17904,7 +17990,7 @@ var _safeDecodeAsync = (_Err) => async (schema, value, _ctx) => {
17904
17990
  return _safeParseAsync(_Err)(schema, value, _ctx);
17905
17991
  };
17906
17992
  var safeDecodeAsync = /* @__PURE__ */ _safeDecodeAsync($ZodRealError);
17907
- // ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/core/regexes.js
17993
+ // ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/core/regexes.js
17908
17994
  var exports_regexes = {};
17909
17995
  __export(exports_regexes, {
17910
17996
  xid: () => xid,
@@ -17944,6 +18030,7 @@ __export(exports_regexes, {
17944
18030
  ipv4: () => ipv4,
17945
18031
  integer: () => integer,
17946
18032
  idnEmail: () => idnEmail,
18033
+ httpProtocol: () => httpProtocol,
17947
18034
  html5Email: () => html5Email,
17948
18035
  hostname: () => hostname,
17949
18036
  hex: () => hex,
@@ -17966,7 +18053,7 @@ __export(exports_regexes, {
17966
18053
  base64url: () => base64url,
17967
18054
  base64: () => base64
17968
18055
  });
17969
- var cuid = /^[cC][^\s-]{8,}$/;
18056
+ var cuid = /^[cC][0-9a-z]{6,}$/;
17970
18057
  var cuid2 = /^[0-9a-z]+$/;
17971
18058
  var ulid = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/;
17972
18059
  var xid = /^[0-9a-vA-V]{20}$/;
@@ -18005,6 +18092,7 @@ var base64 = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/
18005
18092
  var base64url = /^[A-Za-z0-9_-]*$/;
18006
18093
  var hostname = /^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/;
18007
18094
  var domain = /^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/;
18095
+ var httpProtocol = /^https?$/;
18008
18096
  var e164 = /^\+[1-9]\d{6,14}$/;
18009
18097
  var 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])))`;
18010
18098
  var date = /* @__PURE__ */ new RegExp(`^${dateSource}$`);
@@ -18061,12 +18149,12 @@ var sha512_hex = /^[0-9a-fA-F]{128}$/;
18061
18149
  var sha512_base64 = /* @__PURE__ */ fixedBase64(86, "==");
18062
18150
  var sha512_base64url = /* @__PURE__ */ fixedBase64url(86);
18063
18151
 
18064
- // ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/core/checks.js
18152
+ // ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/core/checks.js
18065
18153
  var $ZodCheck = /* @__PURE__ */ $constructor("$ZodCheck", (inst, def) => {
18066
- var _a;
18154
+ var _a2;
18067
18155
  inst._zod ?? (inst._zod = {});
18068
18156
  inst._zod.def = def;
18069
- (_a = inst._zod).onattach ?? (_a.onattach = []);
18157
+ (_a2 = inst._zod).onattach ?? (_a2.onattach = []);
18070
18158
  });
18071
18159
  var numericOriginMap = {
18072
18160
  number: "number",
@@ -18132,8 +18220,8 @@ var $ZodCheckGreaterThan = /* @__PURE__ */ $constructor("$ZodCheckGreaterThan",
18132
18220
  var $ZodCheckMultipleOf = /* @__PURE__ */ $constructor("$ZodCheckMultipleOf", (inst, def) => {
18133
18221
  $ZodCheck.init(inst, def);
18134
18222
  inst._zod.onattach.push((inst2) => {
18135
- var _a;
18136
- (_a = inst2._zod.bag).multipleOf ?? (_a.multipleOf = def.value);
18223
+ var _a2;
18224
+ (_a2 = inst2._zod.bag).multipleOf ?? (_a2.multipleOf = def.value);
18137
18225
  });
18138
18226
  inst._zod.check = (payload) => {
18139
18227
  if (typeof payload.value !== typeof def.value)
@@ -18266,9 +18354,9 @@ var $ZodCheckBigIntFormat = /* @__PURE__ */ $constructor("$ZodCheckBigIntFormat"
18266
18354
  };
18267
18355
  });
18268
18356
  var $ZodCheckMaxSize = /* @__PURE__ */ $constructor("$ZodCheckMaxSize", (inst, def) => {
18269
- var _a;
18357
+ var _a2;
18270
18358
  $ZodCheck.init(inst, def);
18271
- (_a = inst._zod.def).when ?? (_a.when = (payload) => {
18359
+ (_a2 = inst._zod.def).when ?? (_a2.when = (payload) => {
18272
18360
  const val = payload.value;
18273
18361
  return !nullish(val) && val.size !== undefined;
18274
18362
  });
@@ -18294,9 +18382,9 @@ var $ZodCheckMaxSize = /* @__PURE__ */ $constructor("$ZodCheckMaxSize", (inst, d
18294
18382
  };
18295
18383
  });
18296
18384
  var $ZodCheckMinSize = /* @__PURE__ */ $constructor("$ZodCheckMinSize", (inst, def) => {
18297
- var _a;
18385
+ var _a2;
18298
18386
  $ZodCheck.init(inst, def);
18299
- (_a = inst._zod.def).when ?? (_a.when = (payload) => {
18387
+ (_a2 = inst._zod.def).when ?? (_a2.when = (payload) => {
18300
18388
  const val = payload.value;
18301
18389
  return !nullish(val) && val.size !== undefined;
18302
18390
  });
@@ -18322,9 +18410,9 @@ var $ZodCheckMinSize = /* @__PURE__ */ $constructor("$ZodCheckMinSize", (inst, d
18322
18410
  };
18323
18411
  });
18324
18412
  var $ZodCheckSizeEquals = /* @__PURE__ */ $constructor("$ZodCheckSizeEquals", (inst, def) => {
18325
- var _a;
18413
+ var _a2;
18326
18414
  $ZodCheck.init(inst, def);
18327
- (_a = inst._zod.def).when ?? (_a.when = (payload) => {
18415
+ (_a2 = inst._zod.def).when ?? (_a2.when = (payload) => {
18328
18416
  const val = payload.value;
18329
18417
  return !nullish(val) && val.size !== undefined;
18330
18418
  });
@@ -18352,9 +18440,9 @@ var $ZodCheckSizeEquals = /* @__PURE__ */ $constructor("$ZodCheckSizeEquals", (i
18352
18440
  };
18353
18441
  });
18354
18442
  var $ZodCheckMaxLength = /* @__PURE__ */ $constructor("$ZodCheckMaxLength", (inst, def) => {
18355
- var _a;
18443
+ var _a2;
18356
18444
  $ZodCheck.init(inst, def);
18357
- (_a = inst._zod.def).when ?? (_a.when = (payload) => {
18445
+ (_a2 = inst._zod.def).when ?? (_a2.when = (payload) => {
18358
18446
  const val = payload.value;
18359
18447
  return !nullish(val) && val.length !== undefined;
18360
18448
  });
@@ -18381,9 +18469,9 @@ var $ZodCheckMaxLength = /* @__PURE__ */ $constructor("$ZodCheckMaxLength", (ins
18381
18469
  };
18382
18470
  });
18383
18471
  var $ZodCheckMinLength = /* @__PURE__ */ $constructor("$ZodCheckMinLength", (inst, def) => {
18384
- var _a;
18472
+ var _a2;
18385
18473
  $ZodCheck.init(inst, def);
18386
- (_a = inst._zod.def).when ?? (_a.when = (payload) => {
18474
+ (_a2 = inst._zod.def).when ?? (_a2.when = (payload) => {
18387
18475
  const val = payload.value;
18388
18476
  return !nullish(val) && val.length !== undefined;
18389
18477
  });
@@ -18410,9 +18498,9 @@ var $ZodCheckMinLength = /* @__PURE__ */ $constructor("$ZodCheckMinLength", (ins
18410
18498
  };
18411
18499
  });
18412
18500
  var $ZodCheckLengthEquals = /* @__PURE__ */ $constructor("$ZodCheckLengthEquals", (inst, def) => {
18413
- var _a;
18501
+ var _a2;
18414
18502
  $ZodCheck.init(inst, def);
18415
- (_a = inst._zod.def).when ?? (_a.when = (payload) => {
18503
+ (_a2 = inst._zod.def).when ?? (_a2.when = (payload) => {
18416
18504
  const val = payload.value;
18417
18505
  return !nullish(val) && val.length !== undefined;
18418
18506
  });
@@ -18441,7 +18529,7 @@ var $ZodCheckLengthEquals = /* @__PURE__ */ $constructor("$ZodCheckLengthEquals"
18441
18529
  };
18442
18530
  });
18443
18531
  var $ZodCheckStringFormat = /* @__PURE__ */ $constructor("$ZodCheckStringFormat", (inst, def) => {
18444
- var _a, _b;
18532
+ var _a2, _b;
18445
18533
  $ZodCheck.init(inst, def);
18446
18534
  inst._zod.onattach.push((inst2) => {
18447
18535
  const bag = inst2._zod.bag;
@@ -18452,7 +18540,7 @@ var $ZodCheckStringFormat = /* @__PURE__ */ $constructor("$ZodCheckStringFormat"
18452
18540
  }
18453
18541
  });
18454
18542
  if (def.pattern)
18455
- (_a = inst._zod).check ?? (_a.check = (payload) => {
18543
+ (_a2 = inst._zod).check ?? (_a2.check = (payload) => {
18456
18544
  def.pattern.lastIndex = 0;
18457
18545
  if (def.pattern.test(payload.value))
18458
18546
  return;
@@ -18608,7 +18696,7 @@ var $ZodCheckOverwrite = /* @__PURE__ */ $constructor("$ZodCheckOverwrite", (ins
18608
18696
  };
18609
18697
  });
18610
18698
 
18611
- // ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/core/doc.js
18699
+ // ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/core/doc.js
18612
18700
  class Doc {
18613
18701
  constructor(args = []) {
18614
18702
  this.content = [];
@@ -18646,16 +18734,16 @@ class Doc {
18646
18734
  }
18647
18735
  }
18648
18736
 
18649
- // ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/core/versions.js
18737
+ // ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/core/versions.js
18650
18738
  var version = {
18651
18739
  major: 4,
18652
- minor: 3,
18653
- patch: 6
18740
+ minor: 4,
18741
+ patch: 3
18654
18742
  };
18655
18743
 
18656
- // ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/core/schemas.js
18744
+ // ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/core/schemas.js
18657
18745
  var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
18658
- var _a;
18746
+ var _a2;
18659
18747
  inst ?? (inst = {});
18660
18748
  inst._zod.def = def;
18661
18749
  inst._zod.bag = inst._zod.bag || {};
@@ -18670,7 +18758,7 @@ var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
18670
18758
  }
18671
18759
  }
18672
18760
  if (checks.length === 0) {
18673
- (_a = inst._zod).deferred ?? (_a.deferred = []);
18761
+ (_a2 = inst._zod).deferred ?? (_a2.deferred = []);
18674
18762
  inst._zod.deferred?.push(() => {
18675
18763
  inst._zod.run = inst._zod.parse;
18676
18764
  });
@@ -18680,6 +18768,8 @@ var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
18680
18768
  let asyncResult;
18681
18769
  for (const ch of checks2) {
18682
18770
  if (ch._zod.def.when) {
18771
+ if (explicitlyAborted(payload))
18772
+ continue;
18683
18773
  const shouldRun = ch._zod.def.when(payload);
18684
18774
  if (!shouldRun)
18685
18775
  continue;
@@ -18819,6 +18909,19 @@ var $ZodURL = /* @__PURE__ */ $constructor("$ZodURL", (inst, def) => {
18819
18909
  inst._zod.check = (payload) => {
18820
18910
  try {
18821
18911
  const trimmed = payload.value.trim();
18912
+ if (!def.normalize && def.protocol?.source === httpProtocol.source) {
18913
+ if (!/^https?:\/\//i.test(trimmed)) {
18914
+ payload.issues.push({
18915
+ code: "invalid_format",
18916
+ format: "url",
18917
+ note: "Invalid URL format",
18918
+ input: payload.value,
18919
+ inst,
18920
+ continue: !def.abort
18921
+ });
18922
+ return;
18923
+ }
18924
+ }
18822
18925
  const url = new URL(trimmed);
18823
18926
  if (def.hostname) {
18824
18927
  def.hostname.lastIndex = 0;
@@ -18972,6 +19075,8 @@ var $ZodCIDRv6 = /* @__PURE__ */ $constructor("$ZodCIDRv6", (inst, def) => {
18972
19075
  function isValidBase64(data) {
18973
19076
  if (data === "")
18974
19077
  return true;
19078
+ if (/\s/.test(data))
19079
+ return false;
18975
19080
  if (data.length % 4 !== 0)
18976
19081
  return false;
18977
19082
  try {
@@ -19161,8 +19266,6 @@ var $ZodUndefined = /* @__PURE__ */ $constructor("$ZodUndefined", (inst, def) =>
19161
19266
  $ZodType.init(inst, def);
19162
19267
  inst._zod.pattern = _undefined;
19163
19268
  inst._zod.values = new Set([undefined]);
19164
- inst._zod.optin = "optional";
19165
- inst._zod.optout = "optional";
19166
19269
  inst._zod.parse = (payload, _ctx) => {
19167
19270
  const input = payload.value;
19168
19271
  if (typeof input === "undefined")
@@ -19290,15 +19393,27 @@ var $ZodArray = /* @__PURE__ */ $constructor("$ZodArray", (inst, def) => {
19290
19393
  return payload;
19291
19394
  };
19292
19395
  });
19293
- function handlePropertyResult(result, final, key, input, isOptionalOut) {
19396
+ function handlePropertyResult(result, final, key, input, isOptionalIn, isOptionalOut) {
19397
+ const isPresent = key in input;
19294
19398
  if (result.issues.length) {
19295
- if (isOptionalOut && !(key in input)) {
19399
+ if (isOptionalIn && isOptionalOut && !isPresent) {
19296
19400
  return;
19297
19401
  }
19298
19402
  final.issues.push(...prefixIssues(key, result.issues));
19299
19403
  }
19404
+ if (!isPresent && !isOptionalIn) {
19405
+ if (!result.issues.length) {
19406
+ final.issues.push({
19407
+ code: "invalid_type",
19408
+ expected: "nonoptional",
19409
+ input: undefined,
19410
+ path: [key]
19411
+ });
19412
+ }
19413
+ return;
19414
+ }
19300
19415
  if (result.value === undefined) {
19301
- if (key in input) {
19416
+ if (isPresent) {
19302
19417
  final.value[key] = undefined;
19303
19418
  }
19304
19419
  } else {
@@ -19326,8 +19441,11 @@ function handleCatchall(proms, input, payload, ctx, def, inst) {
19326
19441
  const keySet = def.keySet;
19327
19442
  const _catchall = def.catchall._zod;
19328
19443
  const t = _catchall.def.type;
19444
+ const isOptionalIn = _catchall.optin === "optional";
19329
19445
  const isOptionalOut = _catchall.optout === "optional";
19330
19446
  for (const key in input) {
19447
+ if (key === "__proto__")
19448
+ continue;
19331
19449
  if (keySet.has(key))
19332
19450
  continue;
19333
19451
  if (t === "never") {
@@ -19336,9 +19454,9 @@ function handleCatchall(proms, input, payload, ctx, def, inst) {
19336
19454
  }
19337
19455
  const r = _catchall.run({ value: input[key], issues: [] }, ctx);
19338
19456
  if (r instanceof Promise) {
19339
- proms.push(r.then((r2) => handlePropertyResult(r2, payload, key, input, isOptionalOut)));
19457
+ proms.push(r.then((r2) => handlePropertyResult(r2, payload, key, input, isOptionalIn, isOptionalOut)));
19340
19458
  } else {
19341
- handlePropertyResult(r, payload, key, input, isOptionalOut);
19459
+ handlePropertyResult(r, payload, key, input, isOptionalIn, isOptionalOut);
19342
19460
  }
19343
19461
  }
19344
19462
  if (unrecognized.length) {
@@ -19404,12 +19522,13 @@ var $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => {
19404
19522
  const shape = value.shape;
19405
19523
  for (const key of value.keys) {
19406
19524
  const el = shape[key];
19525
+ const isOptionalIn = el._zod.optin === "optional";
19407
19526
  const isOptionalOut = el._zod.optout === "optional";
19408
19527
  const r = el._zod.run({ value: input[key], issues: [] }, ctx);
19409
19528
  if (r instanceof Promise) {
19410
- proms.push(r.then((r2) => handlePropertyResult(r2, payload, key, input, isOptionalOut)));
19529
+ proms.push(r.then((r2) => handlePropertyResult(r2, payload, key, input, isOptionalIn, isOptionalOut)));
19411
19530
  } else {
19412
- handlePropertyResult(r, payload, key, input, isOptionalOut);
19531
+ handlePropertyResult(r, payload, key, input, isOptionalIn, isOptionalOut);
19413
19532
  }
19414
19533
  }
19415
19534
  if (!catchall) {
@@ -19440,9 +19559,10 @@ var $ZodObjectJIT = /* @__PURE__ */ $constructor("$ZodObjectJIT", (inst, def) =>
19440
19559
  const id = ids[key];
19441
19560
  const k = esc(key);
19442
19561
  const schema = shape[key];
19562
+ const isOptionalIn = schema?._zod?.optin === "optional";
19443
19563
  const isOptionalOut = schema?._zod?.optout === "optional";
19444
19564
  doc.write(`const ${id} = ${parseStr(key)};`);
19445
- if (isOptionalOut) {
19565
+ if (isOptionalIn && isOptionalOut) {
19446
19566
  doc.write(`
19447
19567
  if (${id}.issues.length) {
19448
19568
  if (${k} in input) {
@@ -19461,6 +19581,33 @@ var $ZodObjectJIT = /* @__PURE__ */ $constructor("$ZodObjectJIT", (inst, def) =>
19461
19581
  newResult[${k}] = ${id}.value;
19462
19582
  }
19463
19583
 
19584
+ `);
19585
+ } else if (!isOptionalIn) {
19586
+ doc.write(`
19587
+ const ${id}_present = ${k} in input;
19588
+ if (${id}.issues.length) {
19589
+ payload.issues = payload.issues.concat(${id}.issues.map(iss => ({
19590
+ ...iss,
19591
+ path: iss.path ? [${k}, ...iss.path] : [${k}]
19592
+ })));
19593
+ }
19594
+ if (!${id}_present && !${id}.issues.length) {
19595
+ payload.issues.push({
19596
+ code: "invalid_type",
19597
+ expected: "nonoptional",
19598
+ input: undefined,
19599
+ path: [${k}]
19600
+ });
19601
+ }
19602
+
19603
+ if (${id}_present) {
19604
+ if (${id}.value === undefined) {
19605
+ newResult[${k}] = undefined;
19606
+ } else {
19607
+ newResult[${k}] = ${id}.value;
19608
+ }
19609
+ }
19610
+
19464
19611
  `);
19465
19612
  } else {
19466
19613
  doc.write(`
@@ -19554,10 +19701,9 @@ var $ZodUnion = /* @__PURE__ */ $constructor("$ZodUnion", (inst, def) => {
19554
19701
  }
19555
19702
  return;
19556
19703
  });
19557
- const single = def.options.length === 1;
19558
- const first = def.options[0]._zod.run;
19704
+ const first = def.options.length === 1 ? def.options[0]._zod.run : null;
19559
19705
  inst._zod.parse = (payload, ctx) => {
19560
- if (single) {
19706
+ if (first) {
19561
19707
  return first(payload, ctx);
19562
19708
  }
19563
19709
  let async = false;
@@ -19610,10 +19756,9 @@ function handleExclusiveUnionResults(results, final, inst, ctx) {
19610
19756
  var $ZodXor = /* @__PURE__ */ $constructor("$ZodXor", (inst, def) => {
19611
19757
  $ZodUnion.init(inst, def);
19612
19758
  def.inclusive = false;
19613
- const single = def.options.length === 1;
19614
- const first = def.options[0]._zod.run;
19759
+ const first = def.options.length === 1 ? def.options[0]._zod.run : null;
19615
19760
  inst._zod.parse = (payload, ctx) => {
19616
- if (single) {
19761
+ if (first) {
19617
19762
  return first(payload, ctx);
19618
19763
  }
19619
19764
  let async = false;
@@ -19688,7 +19833,7 @@ var $ZodDiscriminatedUnion = /* @__PURE__ */ $constructor("$ZodDiscriminatedUnio
19688
19833
  if (opt) {
19689
19834
  return opt._zod.run(payload, ctx);
19690
19835
  }
19691
- if (def.unionFallback) {
19836
+ if (def.unionFallback || ctx.direction === "backward") {
19692
19837
  return _super(payload, ctx);
19693
19838
  }
19694
19839
  payload.issues.push({
@@ -19696,6 +19841,7 @@ var $ZodDiscriminatedUnion = /* @__PURE__ */ $constructor("$ZodDiscriminatedUnio
19696
19841
  errors: [],
19697
19842
  note: "No matching discriminator",
19698
19843
  discriminator: def.discriminator,
19844
+ options: Array.from(disc.value.keys()),
19699
19845
  input,
19700
19846
  path: [def.discriminator],
19701
19847
  inst
@@ -19817,64 +19963,96 @@ var $ZodTuple = /* @__PURE__ */ $constructor("$ZodTuple", (inst, def) => {
19817
19963
  }
19818
19964
  payload.value = [];
19819
19965
  const proms = [];
19820
- const reversedIndex = [...items].reverse().findIndex((item) => item._zod.optin !== "optional");
19821
- const optStart = reversedIndex === -1 ? 0 : items.length - reversedIndex;
19966
+ const optinStart = getTupleOptStart(items, "optin");
19967
+ const optoutStart = getTupleOptStart(items, "optout");
19822
19968
  if (!def.rest) {
19823
- const tooBig = input.length > items.length;
19824
- const tooSmall = input.length < optStart - 1;
19825
- if (tooBig || tooSmall) {
19969
+ if (input.length < optinStart) {
19826
19970
  payload.issues.push({
19827
- ...tooBig ? { code: "too_big", maximum: items.length, inclusive: true } : { code: "too_small", minimum: items.length },
19971
+ code: "too_small",
19972
+ minimum: optinStart,
19973
+ inclusive: true,
19828
19974
  input,
19829
19975
  inst,
19830
19976
  origin: "array"
19831
19977
  });
19832
19978
  return payload;
19833
19979
  }
19834
- }
19835
- let i = -1;
19836
- for (const item of items) {
19837
- i++;
19838
- if (i >= input.length) {
19839
- if (i >= optStart)
19840
- continue;
19980
+ if (input.length > items.length) {
19981
+ payload.issues.push({
19982
+ code: "too_big",
19983
+ maximum: items.length,
19984
+ inclusive: true,
19985
+ input,
19986
+ inst,
19987
+ origin: "array"
19988
+ });
19841
19989
  }
19842
- const result = item._zod.run({
19843
- value: input[i],
19844
- issues: []
19845
- }, ctx);
19846
- if (result instanceof Promise) {
19847
- proms.push(result.then((result2) => handleTupleResult(result2, payload, i)));
19990
+ }
19991
+ const itemResults = new Array(items.length);
19992
+ for (let i = 0;i < items.length; i++) {
19993
+ const r = items[i]._zod.run({ value: input[i], issues: [] }, ctx);
19994
+ if (r instanceof Promise) {
19995
+ proms.push(r.then((rr) => {
19996
+ itemResults[i] = rr;
19997
+ }));
19848
19998
  } else {
19849
- handleTupleResult(result, payload, i);
19999
+ itemResults[i] = r;
19850
20000
  }
19851
20001
  }
19852
20002
  if (def.rest) {
20003
+ let i = items.length - 1;
19853
20004
  const rest = input.slice(items.length);
19854
20005
  for (const el of rest) {
19855
20006
  i++;
19856
- const result = def.rest._zod.run({
19857
- value: el,
19858
- issues: []
19859
- }, ctx);
20007
+ const result = def.rest._zod.run({ value: el, issues: [] }, ctx);
19860
20008
  if (result instanceof Promise) {
19861
- proms.push(result.then((result2) => handleTupleResult(result2, payload, i)));
20009
+ proms.push(result.then((r) => handleTupleResult(r, payload, i)));
19862
20010
  } else {
19863
20011
  handleTupleResult(result, payload, i);
19864
20012
  }
19865
20013
  }
19866
20014
  }
19867
- if (proms.length)
19868
- return Promise.all(proms).then(() => payload);
19869
- return payload;
20015
+ if (proms.length) {
20016
+ return Promise.all(proms).then(() => handleTupleResults(itemResults, payload, items, input, optoutStart));
20017
+ }
20018
+ return handleTupleResults(itemResults, payload, items, input, optoutStart);
19870
20019
  };
19871
20020
  });
20021
+ function getTupleOptStart(items, key) {
20022
+ for (let i = items.length - 1;i >= 0; i--) {
20023
+ if (items[i]._zod[key] !== "optional")
20024
+ return i + 1;
20025
+ }
20026
+ return 0;
20027
+ }
19872
20028
  function handleTupleResult(result, final, index) {
19873
20029
  if (result.issues.length) {
19874
20030
  final.issues.push(...prefixIssues(index, result.issues));
19875
20031
  }
19876
20032
  final.value[index] = result.value;
19877
20033
  }
20034
+ function handleTupleResults(itemResults, final, items, input, optoutStart) {
20035
+ for (let i = 0;i < items.length; i++) {
20036
+ const r = itemResults[i];
20037
+ const isPresent = i < input.length;
20038
+ if (r.issues.length) {
20039
+ if (!isPresent && i >= optoutStart) {
20040
+ final.value.length = i;
20041
+ break;
20042
+ }
20043
+ final.issues.push(...prefixIssues(i, r.issues));
20044
+ }
20045
+ final.value[i] = r.value;
20046
+ }
20047
+ for (let i = final.value.length - 1;i >= input.length; i--) {
20048
+ if (items[i]._zod.optout === "optional" && final.value[i] === undefined) {
20049
+ final.value.length = i;
20050
+ } else {
20051
+ break;
20052
+ }
20053
+ }
20054
+ return final;
20055
+ }
19878
20056
  var $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
19879
20057
  $ZodType.init(inst, def);
19880
20058
  inst._zod.parse = (payload, ctx) => {
@@ -19896,19 +20074,35 @@ var $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
19896
20074
  for (const key of values) {
19897
20075
  if (typeof key === "string" || typeof key === "number" || typeof key === "symbol") {
19898
20076
  recordKeys.add(typeof key === "number" ? key.toString() : key);
20077
+ const keyResult = def.keyType._zod.run({ value: key, issues: [] }, ctx);
20078
+ if (keyResult instanceof Promise) {
20079
+ throw new Error("Async schemas not supported in object keys currently");
20080
+ }
20081
+ if (keyResult.issues.length) {
20082
+ payload.issues.push({
20083
+ code: "invalid_key",
20084
+ origin: "record",
20085
+ issues: keyResult.issues.map((iss) => finalizeIssue(iss, ctx, config())),
20086
+ input: key,
20087
+ path: [key],
20088
+ inst
20089
+ });
20090
+ continue;
20091
+ }
20092
+ const outKey = keyResult.value;
19899
20093
  const result = def.valueType._zod.run({ value: input[key], issues: [] }, ctx);
19900
20094
  if (result instanceof Promise) {
19901
20095
  proms.push(result.then((result2) => {
19902
20096
  if (result2.issues.length) {
19903
20097
  payload.issues.push(...prefixIssues(key, result2.issues));
19904
20098
  }
19905
- payload.value[key] = result2.value;
20099
+ payload.value[outKey] = result2.value;
19906
20100
  }));
19907
20101
  } else {
19908
20102
  if (result.issues.length) {
19909
20103
  payload.issues.push(...prefixIssues(key, result.issues));
19910
20104
  }
19911
- payload.value[key] = result.value;
20105
+ payload.value[outKey] = result.value;
19912
20106
  }
19913
20107
  }
19914
20108
  }
@@ -19932,6 +20126,8 @@ var $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
19932
20126
  for (const key of Reflect.ownKeys(input)) {
19933
20127
  if (key === "__proto__")
19934
20128
  continue;
20129
+ if (!Object.prototype.propertyIsEnumerable.call(input, key))
20130
+ continue;
19935
20131
  let keyResult = def.keyType._zod.run({ value: key, issues: [] }, ctx);
19936
20132
  if (keyResult instanceof Promise) {
19937
20133
  throw new Error("Async schemas not supported in object keys currently");
@@ -20136,6 +20332,7 @@ var $ZodFile = /* @__PURE__ */ $constructor("$ZodFile", (inst, def) => {
20136
20332
  });
20137
20333
  var $ZodTransform = /* @__PURE__ */ $constructor("$ZodTransform", (inst, def) => {
20138
20334
  $ZodType.init(inst, def);
20335
+ inst._zod.optin = "optional";
20139
20336
  inst._zod.parse = (payload, ctx) => {
20140
20337
  if (ctx.direction === "backward") {
20141
20338
  throw new $ZodEncodeError(inst.constructor.name);
@@ -20145,6 +20342,7 @@ var $ZodTransform = /* @__PURE__ */ $constructor("$ZodTransform", (inst, def) =>
20145
20342
  const output = _out instanceof Promise ? _out : Promise.resolve(_out);
20146
20343
  return output.then((output2) => {
20147
20344
  payload.value = output2;
20345
+ payload.fallback = true;
20148
20346
  return payload;
20149
20347
  });
20150
20348
  }
@@ -20152,11 +20350,12 @@ var $ZodTransform = /* @__PURE__ */ $constructor("$ZodTransform", (inst, def) =>
20152
20350
  throw new $ZodAsyncError;
20153
20351
  }
20154
20352
  payload.value = _out;
20353
+ payload.fallback = true;
20155
20354
  return payload;
20156
20355
  };
20157
20356
  });
20158
20357
  function handleOptionalResult(result, input) {
20159
- if (result.issues.length && input === undefined) {
20358
+ if (input === undefined && (result.issues.length || result.fallback)) {
20160
20359
  return { issues: [], value: undefined };
20161
20360
  }
20162
20361
  return result;
@@ -20174,10 +20373,11 @@ var $ZodOptional = /* @__PURE__ */ $constructor("$ZodOptional", (inst, def) => {
20174
20373
  });
20175
20374
  inst._zod.parse = (payload, ctx) => {
20176
20375
  if (def.innerType._zod.optin === "optional") {
20376
+ const input = payload.value;
20177
20377
  const result = def.innerType._zod.run(payload, ctx);
20178
20378
  if (result instanceof Promise)
20179
- return result.then((r) => handleOptionalResult(r, payload.value));
20180
- return handleOptionalResult(result, payload.value);
20379
+ return result.then((r) => handleOptionalResult(r, input));
20380
+ return handleOptionalResult(result, input);
20181
20381
  }
20182
20382
  if (payload.value === undefined) {
20183
20383
  return payload;
@@ -20293,7 +20493,7 @@ var $ZodSuccess = /* @__PURE__ */ $constructor("$ZodSuccess", (inst, def) => {
20293
20493
  });
20294
20494
  var $ZodCatch = /* @__PURE__ */ $constructor("$ZodCatch", (inst, def) => {
20295
20495
  $ZodType.init(inst, def);
20296
- defineLazy(inst._zod, "optin", () => def.innerType._zod.optin);
20496
+ inst._zod.optin = "optional";
20297
20497
  defineLazy(inst._zod, "optout", () => def.innerType._zod.optout);
20298
20498
  defineLazy(inst._zod, "values", () => def.innerType._zod.values);
20299
20499
  inst._zod.parse = (payload, ctx) => {
@@ -20313,6 +20513,7 @@ var $ZodCatch = /* @__PURE__ */ $constructor("$ZodCatch", (inst, def) => {
20313
20513
  input: payload.value
20314
20514
  });
20315
20515
  payload.issues = [];
20516
+ payload.fallback = true;
20316
20517
  }
20317
20518
  return payload;
20318
20519
  });
@@ -20327,6 +20528,7 @@ var $ZodCatch = /* @__PURE__ */ $constructor("$ZodCatch", (inst, def) => {
20327
20528
  input: payload.value
20328
20529
  });
20329
20530
  payload.issues = [];
20531
+ payload.fallback = true;
20330
20532
  }
20331
20533
  return payload;
20332
20534
  };
@@ -20372,7 +20574,7 @@ function handlePipeResult(left, next, ctx) {
20372
20574
  left.aborted = true;
20373
20575
  return left;
20374
20576
  }
20375
- return next._zod.run({ value: left.value, issues: left.issues }, ctx);
20577
+ return next._zod.run({ value: left.value, issues: left.issues, fallback: left.fallback }, ctx);
20376
20578
  }
20377
20579
  var $ZodCodec = /* @__PURE__ */ $constructor("$ZodCodec", (inst, def) => {
20378
20580
  $ZodType.init(inst, def);
@@ -20424,6 +20626,9 @@ function handleCodecTxResult(left, value, nextSchema, ctx) {
20424
20626
  }
20425
20627
  return nextSchema._zod.run({ value, issues: left.issues }, ctx);
20426
20628
  }
20629
+ var $ZodPreprocess = /* @__PURE__ */ $constructor("$ZodPreprocess", (inst, def) => {
20630
+ $ZodPipe.init(inst, def);
20631
+ });
20427
20632
  var $ZodReadonly = /* @__PURE__ */ $constructor("$ZodReadonly", (inst, def) => {
20428
20633
  $ZodType.init(inst, def);
20429
20634
  defineLazy(inst._zod, "propValues", () => def.innerType._zod.propValues);
@@ -20575,7 +20780,12 @@ var $ZodPromise = /* @__PURE__ */ $constructor("$ZodPromise", (inst, def) => {
20575
20780
  });
20576
20781
  var $ZodLazy = /* @__PURE__ */ $constructor("$ZodLazy", (inst, def) => {
20577
20782
  $ZodType.init(inst, def);
20578
- defineLazy(inst._zod, "innerType", () => def.getter());
20783
+ defineLazy(inst._zod, "innerType", () => {
20784
+ const d = def;
20785
+ if (!d._cachedInner)
20786
+ d._cachedInner = def.getter();
20787
+ return d._cachedInner;
20788
+ });
20579
20789
  defineLazy(inst._zod, "pattern", () => inst._zod.innerType?._zod?.pattern);
20580
20790
  defineLazy(inst._zod, "propValues", () => inst._zod.innerType?._zod?.propValues);
20581
20791
  defineLazy(inst._zod, "optin", () => inst._zod.innerType?._zod?.optin ?? undefined);
@@ -20615,7 +20825,7 @@ function handleRefineResult(result, payload, input, inst) {
20615
20825
  payload.issues.push(issue(_iss));
20616
20826
  }
20617
20827
  }
20618
- // ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/locales/index.js
20828
+ // ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/locales/index.js
20619
20829
  var exports_locales = {};
20620
20830
  __export(exports_locales, {
20621
20831
  zhTW: () => zh_TW_default,
@@ -20632,6 +20842,7 @@ __export(exports_locales, {
20632
20842
  sv: () => sv_default,
20633
20843
  sl: () => sl_default,
20634
20844
  ru: () => ru_default,
20845
+ ro: () => ro_default,
20635
20846
  pt: () => pt_default,
20636
20847
  ps: () => ps_default,
20637
20848
  pl: () => pl_default,
@@ -20651,6 +20862,7 @@ __export(exports_locales, {
20651
20862
  id: () => id_default,
20652
20863
  hy: () => hy_default,
20653
20864
  hu: () => hu_default,
20865
+ hr: () => hr_default,
20654
20866
  he: () => he_default,
20655
20867
  frCA: () => fr_CA_default,
20656
20868
  fr: () => fr_default,
@@ -20659,6 +20871,7 @@ __export(exports_locales, {
20659
20871
  es: () => es_default,
20660
20872
  eo: () => eo_default,
20661
20873
  en: () => en_default,
20874
+ el: () => el_default,
20662
20875
  de: () => de_default,
20663
20876
  da: () => da_default,
20664
20877
  cs: () => cs_default,
@@ -20669,7 +20882,7 @@ __export(exports_locales, {
20669
20882
  ar: () => ar_default
20670
20883
  });
20671
20884
 
20672
- // ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/locales/ar.js
20885
+ // ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/locales/ar.js
20673
20886
  var error3 = () => {
20674
20887
  const Sizable = {
20675
20888
  string: { unit: "حرف", verb: "أن يحوي" },
@@ -20775,7 +20988,7 @@ function ar_default() {
20775
20988
  localeError: error3()
20776
20989
  };
20777
20990
  }
20778
- // ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/locales/az.js
20991
+ // ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/locales/az.js
20779
20992
  var error4 = () => {
20780
20993
  const Sizable = {
20781
20994
  string: { unit: "simvol", verb: "olmalıdır" },
@@ -20880,7 +21093,7 @@ function az_default() {
20880
21093
  localeError: error4()
20881
21094
  };
20882
21095
  }
20883
- // ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/locales/be.js
21096
+ // ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/locales/be.js
20884
21097
  function getBelarusianPlural(count, one, few, many) {
20885
21098
  const absCount = Math.abs(count);
20886
21099
  const lastDigit = absCount % 10;
@@ -21036,7 +21249,7 @@ function be_default() {
21036
21249
  localeError: error5()
21037
21250
  };
21038
21251
  }
21039
- // ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/locales/bg.js
21252
+ // ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/locales/bg.js
21040
21253
  var error6 = () => {
21041
21254
  const Sizable = {
21042
21255
  string: { unit: "символа", verb: "да съдържа" },
@@ -21156,7 +21369,7 @@ function bg_default() {
21156
21369
  localeError: error6()
21157
21370
  };
21158
21371
  }
21159
- // ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/locales/ca.js
21372
+ // ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/locales/ca.js
21160
21373
  var error7 = () => {
21161
21374
  const Sizable = {
21162
21375
  string: { unit: "caràcters", verb: "contenir" },
@@ -21263,7 +21476,7 @@ function ca_default() {
21263
21476
  localeError: error7()
21264
21477
  };
21265
21478
  }
21266
- // ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/locales/cs.js
21479
+ // ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/locales/cs.js
21267
21480
  var error8 = () => {
21268
21481
  const Sizable = {
21269
21482
  string: { unit: "znaků", verb: "mít" },
@@ -21374,7 +21587,7 @@ function cs_default() {
21374
21587
  localeError: error8()
21375
21588
  };
21376
21589
  }
21377
- // ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/locales/da.js
21590
+ // ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/locales/da.js
21378
21591
  var error9 = () => {
21379
21592
  const Sizable = {
21380
21593
  string: { unit: "tegn", verb: "havde" },
@@ -21489,7 +21702,7 @@ function da_default() {
21489
21702
  localeError: error9()
21490
21703
  };
21491
21704
  }
21492
- // ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/locales/de.js
21705
+ // ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/locales/de.js
21493
21706
  var error10 = () => {
21494
21707
  const Sizable = {
21495
21708
  string: { unit: "Zeichen", verb: "zu haben" },
@@ -21597,8 +21810,117 @@ function de_default() {
21597
21810
  localeError: error10()
21598
21811
  };
21599
21812
  }
21600
- // ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/locales/en.js
21813
+ // ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/locales/el.js
21601
21814
  var error11 = () => {
21815
+ const Sizable = {
21816
+ string: { unit: "χαρακτήρες", verb: "να έχει" },
21817
+ file: { unit: "bytes", verb: "να έχει" },
21818
+ array: { unit: "στοιχεία", verb: "να έχει" },
21819
+ set: { unit: "στοιχεία", verb: "να έχει" },
21820
+ map: { unit: "καταχωρήσεις", verb: "να έχει" }
21821
+ };
21822
+ function getSizing(origin) {
21823
+ return Sizable[origin] ?? null;
21824
+ }
21825
+ const FormatDictionary = {
21826
+ regex: "είσοδος",
21827
+ email: "διεύθυνση email",
21828
+ url: "URL",
21829
+ emoji: "emoji",
21830
+ uuid: "UUID",
21831
+ uuidv4: "UUIDv4",
21832
+ uuidv6: "UUIDv6",
21833
+ nanoid: "nanoid",
21834
+ guid: "GUID",
21835
+ cuid: "cuid",
21836
+ cuid2: "cuid2",
21837
+ ulid: "ULID",
21838
+ xid: "XID",
21839
+ ksuid: "KSUID",
21840
+ datetime: "ISO ημερομηνία και ώρα",
21841
+ date: "ISO ημερομηνία",
21842
+ time: "ISO ώρα",
21843
+ duration: "ISO διάρκεια",
21844
+ ipv4: "διεύθυνση IPv4",
21845
+ ipv6: "διεύθυνση IPv6",
21846
+ mac: "διεύθυνση MAC",
21847
+ cidrv4: "εύρος IPv4",
21848
+ cidrv6: "εύρος IPv6",
21849
+ base64: "συμβολοσειρά κωδικοποιημένη σε base64",
21850
+ base64url: "συμβολοσειρά κωδικοποιημένη σε base64url",
21851
+ json_string: "συμβολοσειρά JSON",
21852
+ e164: "αριθμός E.164",
21853
+ jwt: "JWT",
21854
+ template_literal: "είσοδος"
21855
+ };
21856
+ const TypeDictionary = {
21857
+ nan: "NaN"
21858
+ };
21859
+ return (issue2) => {
21860
+ switch (issue2.code) {
21861
+ case "invalid_type": {
21862
+ const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
21863
+ const receivedType = parsedType(issue2.input);
21864
+ const received = TypeDictionary[receivedType] ?? receivedType;
21865
+ if (typeof issue2.expected === "string" && /^[A-Z]/.test(issue2.expected)) {
21866
+ return `Μη έγκυρη είσοδος: αναμενόταν instanceof ${issue2.expected}, λήφθηκε ${received}`;
21867
+ }
21868
+ return `Μη έγκυρη είσοδος: αναμενόταν ${expected}, λήφθηκε ${received}`;
21869
+ }
21870
+ case "invalid_value":
21871
+ if (issue2.values.length === 1)
21872
+ return `Μη έγκυρη είσοδος: αναμενόταν ${stringifyPrimitive(issue2.values[0])}`;
21873
+ return `Μη έγκυρη επιλογή: αναμενόταν ένα από ${joinValues(issue2.values, "|")}`;
21874
+ case "too_big": {
21875
+ const adj = issue2.inclusive ? "<=" : "<";
21876
+ const sizing = getSizing(issue2.origin);
21877
+ if (sizing)
21878
+ return `Πολύ μεγάλο: αναμενόταν ${issue2.origin ?? "τιμή"} να έχει ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "στοιχεία"}`;
21879
+ return `Πολύ μεγάλο: αναμενόταν ${issue2.origin ?? "τιμή"} να είναι ${adj}${issue2.maximum.toString()}`;
21880
+ }
21881
+ case "too_small": {
21882
+ const adj = issue2.inclusive ? ">=" : ">";
21883
+ const sizing = getSizing(issue2.origin);
21884
+ if (sizing) {
21885
+ return `Πολύ μικρό: αναμενόταν ${issue2.origin} να έχει ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
21886
+ }
21887
+ return `Πολύ μικρό: αναμενόταν ${issue2.origin} να είναι ${adj}${issue2.minimum.toString()}`;
21888
+ }
21889
+ case "invalid_format": {
21890
+ const _issue = issue2;
21891
+ if (_issue.format === "starts_with") {
21892
+ return `Μη έγκυρη συμβολοσειρά: πρέπει να ξεκινά με "${_issue.prefix}"`;
21893
+ }
21894
+ if (_issue.format === "ends_with")
21895
+ return `Μη έγκυρη συμβολοσειρά: πρέπει να τελειώνει με "${_issue.suffix}"`;
21896
+ if (_issue.format === "includes")
21897
+ return `Μη έγκυρη συμβολοσειρά: πρέπει να περιέχει "${_issue.includes}"`;
21898
+ if (_issue.format === "regex")
21899
+ return `Μη έγκυρη συμβολοσειρά: πρέπει να ταιριάζει με το μοτίβο ${_issue.pattern}`;
21900
+ return `Μη έγκυρο: ${FormatDictionary[_issue.format] ?? issue2.format}`;
21901
+ }
21902
+ case "not_multiple_of":
21903
+ return `Μη έγκυρος αριθμός: πρέπει να είναι πολλαπλάσιο του ${issue2.divisor}`;
21904
+ case "unrecognized_keys":
21905
+ return `Άγνωστ${issue2.keys.length > 1 ? "α" : "ο"} κλειδ${issue2.keys.length > 1 ? "ιά" : "ί"}: ${joinValues(issue2.keys, ", ")}`;
21906
+ case "invalid_key":
21907
+ return `Μη έγκυρο κλειδί στο ${issue2.origin}`;
21908
+ case "invalid_union":
21909
+ return "Μη έγκυρη είσοδος";
21910
+ case "invalid_element":
21911
+ return `Μη έγκυρη τιμή στο ${issue2.origin}`;
21912
+ default:
21913
+ return `Μη έγκυρη είσοδος`;
21914
+ }
21915
+ };
21916
+ };
21917
+ function el_default() {
21918
+ return {
21919
+ localeError: error11()
21920
+ };
21921
+ }
21922
+ // ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/locales/en.js
21923
+ var error12 = () => {
21602
21924
  const Sizable = {
21603
21925
  string: { unit: "characters", verb: "to have" },
21604
21926
  file: { unit: "bytes", verb: "to have" },
@@ -21690,6 +22012,10 @@ var error11 = () => {
21690
22012
  case "invalid_key":
21691
22013
  return `Invalid key in ${issue2.origin}`;
21692
22014
  case "invalid_union":
22015
+ if (issue2.options && Array.isArray(issue2.options) && issue2.options.length > 0) {
22016
+ const opts = issue2.options.map((o) => `'${o}'`).join(" | ");
22017
+ return `Invalid discriminator value. Expected ${opts}`;
22018
+ }
21693
22019
  return "Invalid input";
21694
22020
  case "invalid_element":
21695
22021
  return `Invalid value in ${issue2.origin}`;
@@ -21700,11 +22026,11 @@ var error11 = () => {
21700
22026
  };
21701
22027
  function en_default() {
21702
22028
  return {
21703
- localeError: error11()
22029
+ localeError: error12()
21704
22030
  };
21705
22031
  }
21706
- // ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/locales/eo.js
21707
- var error12 = () => {
22032
+ // ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/locales/eo.js
22033
+ var error13 = () => {
21708
22034
  const Sizable = {
21709
22035
  string: { unit: "karaktrojn", verb: "havi" },
21710
22036
  file: { unit: "bajtojn", verb: "havi" },
@@ -21809,11 +22135,11 @@ var error12 = () => {
21809
22135
  };
21810
22136
  function eo_default() {
21811
22137
  return {
21812
- localeError: error12()
22138
+ localeError: error13()
21813
22139
  };
21814
22140
  }
21815
- // ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/locales/es.js
21816
- var error13 = () => {
22141
+ // ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/locales/es.js
22142
+ var error14 = () => {
21817
22143
  const Sizable = {
21818
22144
  string: { unit: "caracteres", verb: "tener" },
21819
22145
  file: { unit: "bytes", verb: "tener" },
@@ -21941,11 +22267,11 @@ var error13 = () => {
21941
22267
  };
21942
22268
  function es_default() {
21943
22269
  return {
21944
- localeError: error13()
22270
+ localeError: error14()
21945
22271
  };
21946
22272
  }
21947
- // ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/locales/fa.js
21948
- var error14 = () => {
22273
+ // ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/locales/fa.js
22274
+ var error15 = () => {
21949
22275
  const Sizable = {
21950
22276
  string: { unit: "کاراکتر", verb: "داشته باشد" },
21951
22277
  file: { unit: "بایت", verb: "داشته باشد" },
@@ -22055,11 +22381,11 @@ var error14 = () => {
22055
22381
  };
22056
22382
  function fa_default() {
22057
22383
  return {
22058
- localeError: error14()
22384
+ localeError: error15()
22059
22385
  };
22060
22386
  }
22061
- // ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/locales/fi.js
22062
- var error15 = () => {
22387
+ // ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/locales/fi.js
22388
+ var error16 = () => {
22063
22389
  const Sizable = {
22064
22390
  string: { unit: "merkkiä", subject: "merkkijonon" },
22065
22391
  file: { unit: "tavua", subject: "tiedoston" },
@@ -22167,11 +22493,11 @@ var error15 = () => {
22167
22493
  };
22168
22494
  function fi_default() {
22169
22495
  return {
22170
- localeError: error15()
22496
+ localeError: error16()
22171
22497
  };
22172
22498
  }
22173
- // ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/locales/fr.js
22174
- var error16 = () => {
22499
+ // ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/locales/fr.js
22500
+ var error17 = () => {
22175
22501
  const Sizable = {
22176
22502
  string: { unit: "caractères", verb: "avoir" },
22177
22503
  file: { unit: "octets", verb: "avoir" },
@@ -22212,9 +22538,27 @@ var error16 = () => {
22212
22538
  template_literal: "entrée"
22213
22539
  };
22214
22540
  const TypeDictionary = {
22215
- nan: "NaN",
22541
+ string: "chaîne",
22216
22542
  number: "nombre",
22217
- array: "tableau"
22543
+ int: "entier",
22544
+ boolean: "booléen",
22545
+ bigint: "grand entier",
22546
+ symbol: "symbole",
22547
+ undefined: "indéfini",
22548
+ null: "null",
22549
+ never: "jamais",
22550
+ void: "vide",
22551
+ date: "date",
22552
+ array: "tableau",
22553
+ object: "objet",
22554
+ tuple: "tuple",
22555
+ record: "enregistrement",
22556
+ map: "carte",
22557
+ set: "ensemble",
22558
+ file: "fichier",
22559
+ nonoptional: "non-optionnel",
22560
+ nan: "NaN",
22561
+ function: "fonction"
22218
22562
  };
22219
22563
  return (issue2) => {
22220
22564
  switch (issue2.code) {
@@ -22235,16 +22579,15 @@ var error16 = () => {
22235
22579
  const adj = issue2.inclusive ? "<=" : "<";
22236
22580
  const sizing = getSizing(issue2.origin);
22237
22581
  if (sizing)
22238
- return `Trop grand : ${issue2.origin ?? "valeur"} doit ${sizing.verb} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "élément(s)"}`;
22239
- return `Trop grand : ${issue2.origin ?? "valeur"} doit être ${adj}${issue2.maximum.toString()}`;
22582
+ return `Trop grand : ${TypeDictionary[issue2.origin] ?? "valeur"} doit ${sizing.verb} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "élément(s)"}`;
22583
+ return `Trop grand : ${TypeDictionary[issue2.origin] ?? "valeur"} doit être ${adj}${issue2.maximum.toString()}`;
22240
22584
  }
22241
22585
  case "too_small": {
22242
22586
  const adj = issue2.inclusive ? ">=" : ">";
22243
22587
  const sizing = getSizing(issue2.origin);
22244
- if (sizing) {
22245
- return `Trop petit : ${issue2.origin} doit ${sizing.verb} ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
22246
- }
22247
- return `Trop petit : ${issue2.origin} doit être ${adj}${issue2.minimum.toString()}`;
22588
+ if (sizing)
22589
+ return `Trop petit : ${TypeDictionary[issue2.origin] ?? "valeur"} doit ${sizing.verb} ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
22590
+ return `Trop petit : ${TypeDictionary[issue2.origin] ?? "valeur"} doit être ${adj}${issue2.minimum.toString()}`;
22248
22591
  }
22249
22592
  case "invalid_format": {
22250
22593
  const _issue = issue2;
@@ -22275,11 +22618,11 @@ var error16 = () => {
22275
22618
  };
22276
22619
  function fr_default() {
22277
22620
  return {
22278
- localeError: error16()
22621
+ localeError: error17()
22279
22622
  };
22280
22623
  }
22281
- // ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/locales/fr-CA.js
22282
- var error17 = () => {
22624
+ // ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/locales/fr-CA.js
22625
+ var error18 = () => {
22283
22626
  const Sizable = {
22284
22627
  string: { unit: "caractères", verb: "avoir" },
22285
22628
  file: { unit: "octets", verb: "avoir" },
@@ -22382,11 +22725,11 @@ var error17 = () => {
22382
22725
  };
22383
22726
  function fr_CA_default() {
22384
22727
  return {
22385
- localeError: error17()
22728
+ localeError: error18()
22386
22729
  };
22387
22730
  }
22388
- // ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/locales/he.js
22389
- var error18 = () => {
22731
+ // ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/locales/he.js
22732
+ var error19 = () => {
22390
22733
  const TypeNames = {
22391
22734
  string: { label: "מחרוזת", gender: "f" },
22392
22735
  number: { label: "מספר", gender: "m" },
@@ -22575,11 +22918,133 @@ var error18 = () => {
22575
22918
  };
22576
22919
  function he_default() {
22577
22920
  return {
22578
- localeError: error18()
22921
+ localeError: error19()
22579
22922
  };
22580
22923
  }
22581
- // ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/locales/hu.js
22582
- var error19 = () => {
22924
+ // ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/locales/hr.js
22925
+ var error20 = () => {
22926
+ const Sizable = {
22927
+ string: { unit: "znakova", verb: "imati" },
22928
+ file: { unit: "bajtova", verb: "imati" },
22929
+ array: { unit: "stavki", verb: "imati" },
22930
+ set: { unit: "stavki", verb: "imati" }
22931
+ };
22932
+ function getSizing(origin) {
22933
+ return Sizable[origin] ?? null;
22934
+ }
22935
+ const FormatDictionary = {
22936
+ regex: "unos",
22937
+ email: "email adresa",
22938
+ url: "URL",
22939
+ emoji: "emoji",
22940
+ uuid: "UUID",
22941
+ uuidv4: "UUIDv4",
22942
+ uuidv6: "UUIDv6",
22943
+ nanoid: "nanoid",
22944
+ guid: "GUID",
22945
+ cuid: "cuid",
22946
+ cuid2: "cuid2",
22947
+ ulid: "ULID",
22948
+ xid: "XID",
22949
+ ksuid: "KSUID",
22950
+ datetime: "ISO datum i vrijeme",
22951
+ date: "ISO datum",
22952
+ time: "ISO vrijeme",
22953
+ duration: "ISO trajanje",
22954
+ ipv4: "IPv4 adresa",
22955
+ ipv6: "IPv6 adresa",
22956
+ cidrv4: "IPv4 raspon",
22957
+ cidrv6: "IPv6 raspon",
22958
+ base64: "base64 kodirani tekst",
22959
+ base64url: "base64url kodirani tekst",
22960
+ json_string: "JSON tekst",
22961
+ e164: "E.164 broj",
22962
+ jwt: "JWT",
22963
+ template_literal: "unos"
22964
+ };
22965
+ const TypeDictionary = {
22966
+ nan: "NaN",
22967
+ string: "tekst",
22968
+ number: "broj",
22969
+ boolean: "boolean",
22970
+ array: "niz",
22971
+ object: "objekt",
22972
+ set: "skup",
22973
+ file: "datoteka",
22974
+ date: "datum",
22975
+ bigint: "bigint",
22976
+ symbol: "simbol",
22977
+ undefined: "undefined",
22978
+ null: "null",
22979
+ function: "funkcija",
22980
+ map: "mapa"
22981
+ };
22982
+ return (issue2) => {
22983
+ switch (issue2.code) {
22984
+ case "invalid_type": {
22985
+ const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
22986
+ const receivedType = parsedType(issue2.input);
22987
+ const received = TypeDictionary[receivedType] ?? receivedType;
22988
+ if (/^[A-Z]/.test(issue2.expected)) {
22989
+ return `Neispravan unos: očekuje se instanceof ${issue2.expected}, a primljeno je ${received}`;
22990
+ }
22991
+ return `Neispravan unos: očekuje se ${expected}, a primljeno je ${received}`;
22992
+ }
22993
+ case "invalid_value":
22994
+ if (issue2.values.length === 1)
22995
+ return `Neispravna vrijednost: očekivano ${stringifyPrimitive(issue2.values[0])}`;
22996
+ return `Neispravna opcija: očekivano jedno od ${joinValues(issue2.values, "|")}`;
22997
+ case "too_big": {
22998
+ const adj = issue2.inclusive ? "<=" : "<";
22999
+ const sizing = getSizing(issue2.origin);
23000
+ const origin = TypeDictionary[issue2.origin] ?? issue2.origin;
23001
+ if (sizing)
23002
+ return `Preveliko: očekivano da ${origin ?? "vrijednost"} ima ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elemenata"}`;
23003
+ return `Preveliko: očekivano da ${origin ?? "vrijednost"} bude ${adj}${issue2.maximum.toString()}`;
23004
+ }
23005
+ case "too_small": {
23006
+ const adj = issue2.inclusive ? ">=" : ">";
23007
+ const sizing = getSizing(issue2.origin);
23008
+ const origin = TypeDictionary[issue2.origin] ?? issue2.origin;
23009
+ if (sizing) {
23010
+ return `Premalo: očekivano da ${origin} ima ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
23011
+ }
23012
+ return `Premalo: očekivano da ${origin} bude ${adj}${issue2.minimum.toString()}`;
23013
+ }
23014
+ case "invalid_format": {
23015
+ const _issue = issue2;
23016
+ if (_issue.format === "starts_with")
23017
+ return `Neispravan tekst: mora započinjati s "${_issue.prefix}"`;
23018
+ if (_issue.format === "ends_with")
23019
+ return `Neispravan tekst: mora završavati s "${_issue.suffix}"`;
23020
+ if (_issue.format === "includes")
23021
+ return `Neispravan tekst: mora sadržavati "${_issue.includes}"`;
23022
+ if (_issue.format === "regex")
23023
+ return `Neispravan tekst: mora odgovarati uzorku ${_issue.pattern}`;
23024
+ return `Neispravna ${FormatDictionary[_issue.format] ?? issue2.format}`;
23025
+ }
23026
+ case "not_multiple_of":
23027
+ return `Neispravan broj: mora biti višekratnik od ${issue2.divisor}`;
23028
+ case "unrecognized_keys":
23029
+ return `Neprepoznat${issue2.keys.length > 1 ? "i ključevi" : " ključ"}: ${joinValues(issue2.keys, ", ")}`;
23030
+ case "invalid_key":
23031
+ return `Neispravan ključ u ${TypeDictionary[issue2.origin] ?? issue2.origin}`;
23032
+ case "invalid_union":
23033
+ return "Neispravan unos";
23034
+ case "invalid_element":
23035
+ return `Neispravna vrijednost u ${TypeDictionary[issue2.origin] ?? issue2.origin}`;
23036
+ default:
23037
+ return `Neispravan unos`;
23038
+ }
23039
+ };
23040
+ };
23041
+ function hr_default() {
23042
+ return {
23043
+ localeError: error20()
23044
+ };
23045
+ }
23046
+ // ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/locales/hu.js
23047
+ var error21 = () => {
22583
23048
  const Sizable = {
22584
23049
  string: { unit: "karakter", verb: "legyen" },
22585
23050
  file: { unit: "byte", verb: "legyen" },
@@ -22683,10 +23148,10 @@ var error19 = () => {
22683
23148
  };
22684
23149
  function hu_default() {
22685
23150
  return {
22686
- localeError: error19()
23151
+ localeError: error21()
22687
23152
  };
22688
23153
  }
22689
- // ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/locales/hy.js
23154
+ // ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/locales/hy.js
22690
23155
  function getArmenianPlural(count, one, many) {
22691
23156
  return Math.abs(count) === 1 ? one : many;
22692
23157
  }
@@ -22697,7 +23162,7 @@ function withDefiniteArticle(word) {
22697
23162
  const lastChar = word[word.length - 1];
22698
23163
  return word + (vowels.includes(lastChar) ? "ն" : "ը");
22699
23164
  }
22700
- var error20 = () => {
23165
+ var error22 = () => {
22701
23166
  const Sizable = {
22702
23167
  string: {
22703
23168
  unit: {
@@ -22830,11 +23295,11 @@ var error20 = () => {
22830
23295
  };
22831
23296
  function hy_default() {
22832
23297
  return {
22833
- localeError: error20()
23298
+ localeError: error22()
22834
23299
  };
22835
23300
  }
22836
- // ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/locales/id.js
22837
- var error21 = () => {
23301
+ // ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/locales/id.js
23302
+ var error23 = () => {
22838
23303
  const Sizable = {
22839
23304
  string: { unit: "karakter", verb: "memiliki" },
22840
23305
  file: { unit: "byte", verb: "memiliki" },
@@ -22936,11 +23401,11 @@ var error21 = () => {
22936
23401
  };
22937
23402
  function id_default() {
22938
23403
  return {
22939
- localeError: error21()
23404
+ localeError: error23()
22940
23405
  };
22941
23406
  }
22942
- // ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/locales/is.js
22943
- var error22 = () => {
23407
+ // ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/locales/is.js
23408
+ var error24 = () => {
22944
23409
  const Sizable = {
22945
23410
  string: { unit: "stafi", verb: "að hafa" },
22946
23411
  file: { unit: "bæti", verb: "að hafa" },
@@ -23045,11 +23510,11 @@ var error22 = () => {
23045
23510
  };
23046
23511
  function is_default() {
23047
23512
  return {
23048
- localeError: error22()
23513
+ localeError: error24()
23049
23514
  };
23050
23515
  }
23051
- // ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/locales/it.js
23052
- var error23 = () => {
23516
+ // ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/locales/it.js
23517
+ var error25 = () => {
23053
23518
  const Sizable = {
23054
23519
  string: { unit: "caratteri", verb: "avere" },
23055
23520
  file: { unit: "byte", verb: "avere" },
@@ -23134,7 +23599,7 @@ var error23 = () => {
23134
23599
  return `Stringa non valida: deve includere "${_issue.includes}"`;
23135
23600
  if (_issue.format === "regex")
23136
23601
  return `Stringa non valida: deve corrispondere al pattern ${_issue.pattern}`;
23137
- return `Invalid ${FormatDictionary[_issue.format] ?? issue2.format}`;
23602
+ return `Input non valido: ${FormatDictionary[_issue.format] ?? issue2.format}`;
23138
23603
  }
23139
23604
  case "not_multiple_of":
23140
23605
  return `Numero non valido: deve essere un multiplo di ${issue2.divisor}`;
@@ -23153,11 +23618,11 @@ var error23 = () => {
23153
23618
  };
23154
23619
  function it_default() {
23155
23620
  return {
23156
- localeError: error23()
23621
+ localeError: error25()
23157
23622
  };
23158
23623
  }
23159
- // ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/locales/ja.js
23160
- var error24 = () => {
23624
+ // ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/locales/ja.js
23625
+ var error26 = () => {
23161
23626
  const Sizable = {
23162
23627
  string: { unit: "文字", verb: "である" },
23163
23628
  file: { unit: "バイト", verb: "である" },
@@ -23260,11 +23725,11 @@ var error24 = () => {
23260
23725
  };
23261
23726
  function ja_default() {
23262
23727
  return {
23263
- localeError: error24()
23728
+ localeError: error26()
23264
23729
  };
23265
23730
  }
23266
- // ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/locales/ka.js
23267
- var error25 = () => {
23731
+ // ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/locales/ka.js
23732
+ var error27 = () => {
23268
23733
  const Sizable = {
23269
23734
  string: { unit: "სიმბოლო", verb: "უნდა შეიცავდეს" },
23270
23735
  file: { unit: "ბაიტი", verb: "უნდა შეიცავდეს" },
@@ -23297,9 +23762,9 @@ var error25 = () => {
23297
23762
  ipv6: "IPv6 მისამართი",
23298
23763
  cidrv4: "IPv4 დიაპაზონი",
23299
23764
  cidrv6: "IPv6 დიაპაზონი",
23300
- base64: "base64-კოდირებული სტრინგი",
23301
- base64url: "base64url-კოდირებული სტრინგი",
23302
- json_string: "JSON სტრინგი",
23765
+ base64: "base64-კოდირებული ველი",
23766
+ base64url: "base64url-კოდირებული ველი",
23767
+ json_string: "JSON ველი",
23303
23768
  e164: "E.164 ნომერი",
23304
23769
  jwt: "JWT",
23305
23770
  template_literal: "შეყვანა"
@@ -23307,7 +23772,7 @@ var error25 = () => {
23307
23772
  const TypeDictionary = {
23308
23773
  nan: "NaN",
23309
23774
  number: "რიცხვი",
23310
- string: "სტრინგი",
23775
+ string: "ველი",
23311
23776
  boolean: "ბულეანი",
23312
23777
  function: "ფუნქცია",
23313
23778
  array: "მასივი"
@@ -23345,14 +23810,14 @@ var error25 = () => {
23345
23810
  case "invalid_format": {
23346
23811
  const _issue = issue2;
23347
23812
  if (_issue.format === "starts_with") {
23348
- return `არასწორი სტრინგი: უნდა იწყებოდეს "${_issue.prefix}"-ით`;
23813
+ return `არასწორი ველი: უნდა იწყებოდეს "${_issue.prefix}"-ით`;
23349
23814
  }
23350
23815
  if (_issue.format === "ends_with")
23351
- return `არასწორი სტრინგი: უნდა მთავრდებოდეს "${_issue.suffix}"-ით`;
23816
+ return `არასწორი ველი: უნდა მთავრდებოდეს "${_issue.suffix}"-ით`;
23352
23817
  if (_issue.format === "includes")
23353
- return `არასწორი სტრინგი: უნდა შეიცავდეს "${_issue.includes}"-ს`;
23818
+ return `არასწორი ველი: უნდა შეიცავდეს "${_issue.includes}"-ს`;
23354
23819
  if (_issue.format === "regex")
23355
- return `არასწორი სტრინგი: უნდა შეესაბამებოდეს შაბლონს ${_issue.pattern}`;
23820
+ return `არასწორი ველი: უნდა შეესაბამებოდეს შაბლონს ${_issue.pattern}`;
23356
23821
  return `არასწორი ${FormatDictionary[_issue.format] ?? issue2.format}`;
23357
23822
  }
23358
23823
  case "not_multiple_of":
@@ -23372,11 +23837,11 @@ var error25 = () => {
23372
23837
  };
23373
23838
  function ka_default() {
23374
23839
  return {
23375
- localeError: error25()
23840
+ localeError: error27()
23376
23841
  };
23377
23842
  }
23378
- // ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/locales/km.js
23379
- var error26 = () => {
23843
+ // ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/locales/km.js
23844
+ var error28 = () => {
23380
23845
  const Sizable = {
23381
23846
  string: { unit: "តួអក្សរ", verb: "គួរមាន" },
23382
23847
  file: { unit: "បៃ", verb: "គួរមាន" },
@@ -23482,16 +23947,16 @@ var error26 = () => {
23482
23947
  };
23483
23948
  function km_default() {
23484
23949
  return {
23485
- localeError: error26()
23950
+ localeError: error28()
23486
23951
  };
23487
23952
  }
23488
23953
 
23489
- // ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/locales/kh.js
23954
+ // ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/locales/kh.js
23490
23955
  function kh_default() {
23491
23956
  return km_default();
23492
23957
  }
23493
- // ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/locales/ko.js
23494
- var error27 = () => {
23958
+ // ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/locales/ko.js
23959
+ var error29 = () => {
23495
23960
  const Sizable = {
23496
23961
  string: { unit: "문자", verb: "to have" },
23497
23962
  file: { unit: "바이트", verb: "to have" },
@@ -23598,10 +24063,10 @@ var error27 = () => {
23598
24063
  };
23599
24064
  function ko_default() {
23600
24065
  return {
23601
- localeError: error27()
24066
+ localeError: error29()
23602
24067
  };
23603
24068
  }
23604
- // ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/locales/lt.js
24069
+ // ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/locales/lt.js
23605
24070
  var capitalizeFirstCharacter = (text) => {
23606
24071
  return text.charAt(0).toUpperCase() + text.slice(1);
23607
24072
  };
@@ -23615,7 +24080,7 @@ function getUnitTypeFromNumber(number2) {
23615
24080
  return "one";
23616
24081
  return "few";
23617
24082
  }
23618
- var error28 = () => {
24083
+ var error30 = () => {
23619
24084
  const Sizable = {
23620
24085
  string: {
23621
24086
  unit: {
@@ -23801,11 +24266,11 @@ var error28 = () => {
23801
24266
  };
23802
24267
  function lt_default() {
23803
24268
  return {
23804
- localeError: error28()
24269
+ localeError: error30()
23805
24270
  };
23806
24271
  }
23807
- // ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/locales/mk.js
23808
- var error29 = () => {
24272
+ // ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/locales/mk.js
24273
+ var error31 = () => {
23809
24274
  const Sizable = {
23810
24275
  string: { unit: "знаци", verb: "да имаат" },
23811
24276
  file: { unit: "бајти", verb: "да имаат" },
@@ -23910,11 +24375,11 @@ var error29 = () => {
23910
24375
  };
23911
24376
  function mk_default() {
23912
24377
  return {
23913
- localeError: error29()
24378
+ localeError: error31()
23914
24379
  };
23915
24380
  }
23916
- // ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/locales/ms.js
23917
- var error30 = () => {
24381
+ // ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/locales/ms.js
24382
+ var error32 = () => {
23918
24383
  const Sizable = {
23919
24384
  string: { unit: "aksara", verb: "mempunyai" },
23920
24385
  file: { unit: "bait", verb: "mempunyai" },
@@ -24017,11 +24482,11 @@ var error30 = () => {
24017
24482
  };
24018
24483
  function ms_default() {
24019
24484
  return {
24020
- localeError: error30()
24485
+ localeError: error32()
24021
24486
  };
24022
24487
  }
24023
- // ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/locales/nl.js
24024
- var error31 = () => {
24488
+ // ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/locales/nl.js
24489
+ var error33 = () => {
24025
24490
  const Sizable = {
24026
24491
  string: { unit: "tekens", verb: "heeft" },
24027
24492
  file: { unit: "bytes", verb: "heeft" },
@@ -24127,11 +24592,11 @@ var error31 = () => {
24127
24592
  };
24128
24593
  function nl_default() {
24129
24594
  return {
24130
- localeError: error31()
24595
+ localeError: error33()
24131
24596
  };
24132
24597
  }
24133
- // ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/locales/no.js
24134
- var error32 = () => {
24598
+ // ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/locales/no.js
24599
+ var error34 = () => {
24135
24600
  const Sizable = {
24136
24601
  string: { unit: "tegn", verb: "å ha" },
24137
24602
  file: { unit: "bytes", verb: "å ha" },
@@ -24235,11 +24700,11 @@ var error32 = () => {
24235
24700
  };
24236
24701
  function no_default() {
24237
24702
  return {
24238
- localeError: error32()
24703
+ localeError: error34()
24239
24704
  };
24240
24705
  }
24241
- // ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/locales/ota.js
24242
- var error33 = () => {
24706
+ // ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/locales/ota.js
24707
+ var error35 = () => {
24243
24708
  const Sizable = {
24244
24709
  string: { unit: "harf", verb: "olmalıdır" },
24245
24710
  file: { unit: "bayt", verb: "olmalıdır" },
@@ -24344,11 +24809,11 @@ var error33 = () => {
24344
24809
  };
24345
24810
  function ota_default() {
24346
24811
  return {
24347
- localeError: error33()
24812
+ localeError: error35()
24348
24813
  };
24349
24814
  }
24350
- // ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/locales/ps.js
24351
- var error34 = () => {
24815
+ // ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/locales/ps.js
24816
+ var error36 = () => {
24352
24817
  const Sizable = {
24353
24818
  string: { unit: "توکي", verb: "ولري" },
24354
24819
  file: { unit: "بایټس", verb: "ولري" },
@@ -24458,11 +24923,11 @@ var error34 = () => {
24458
24923
  };
24459
24924
  function ps_default() {
24460
24925
  return {
24461
- localeError: error34()
24926
+ localeError: error36()
24462
24927
  };
24463
24928
  }
24464
- // ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/locales/pl.js
24465
- var error35 = () => {
24929
+ // ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/locales/pl.js
24930
+ var error37 = () => {
24466
24931
  const Sizable = {
24467
24932
  string: { unit: "znaków", verb: "mieć" },
24468
24933
  file: { unit: "bajtów", verb: "mieć" },
@@ -24565,25 +25030,134 @@ var error35 = () => {
24565
25030
  }
24566
25031
  };
24567
25032
  };
24568
- function pl_default() {
25033
+ function pl_default() {
25034
+ return {
25035
+ localeError: error37()
25036
+ };
25037
+ }
25038
+ // ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/locales/pt.js
25039
+ var error38 = () => {
25040
+ const Sizable = {
25041
+ string: { unit: "caracteres", verb: "ter" },
25042
+ file: { unit: "bytes", verb: "ter" },
25043
+ array: { unit: "itens", verb: "ter" },
25044
+ set: { unit: "itens", verb: "ter" }
25045
+ };
25046
+ function getSizing(origin) {
25047
+ return Sizable[origin] ?? null;
25048
+ }
25049
+ const FormatDictionary = {
25050
+ regex: "padrão",
25051
+ email: "endereço de e-mail",
25052
+ url: "URL",
25053
+ emoji: "emoji",
25054
+ uuid: "UUID",
25055
+ uuidv4: "UUIDv4",
25056
+ uuidv6: "UUIDv6",
25057
+ nanoid: "nanoid",
25058
+ guid: "GUID",
25059
+ cuid: "cuid",
25060
+ cuid2: "cuid2",
25061
+ ulid: "ULID",
25062
+ xid: "XID",
25063
+ ksuid: "KSUID",
25064
+ datetime: "data e hora ISO",
25065
+ date: "data ISO",
25066
+ time: "hora ISO",
25067
+ duration: "duração ISO",
25068
+ ipv4: "endereço IPv4",
25069
+ ipv6: "endereço IPv6",
25070
+ cidrv4: "faixa de IPv4",
25071
+ cidrv6: "faixa de IPv6",
25072
+ base64: "texto codificado em base64",
25073
+ base64url: "URL codificada em base64",
25074
+ json_string: "texto JSON",
25075
+ e164: "número E.164",
25076
+ jwt: "JWT",
25077
+ template_literal: "entrada"
25078
+ };
25079
+ const TypeDictionary = {
25080
+ nan: "NaN",
25081
+ number: "número",
25082
+ null: "nulo"
25083
+ };
25084
+ return (issue2) => {
25085
+ switch (issue2.code) {
25086
+ case "invalid_type": {
25087
+ const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
25088
+ const receivedType = parsedType(issue2.input);
25089
+ const received = TypeDictionary[receivedType] ?? receivedType;
25090
+ if (/^[A-Z]/.test(issue2.expected)) {
25091
+ return `Tipo inválido: esperado instanceof ${issue2.expected}, recebido ${received}`;
25092
+ }
25093
+ return `Tipo inválido: esperado ${expected}, recebido ${received}`;
25094
+ }
25095
+ case "invalid_value":
25096
+ if (issue2.values.length === 1)
25097
+ return `Entrada inválida: esperado ${stringifyPrimitive(issue2.values[0])}`;
25098
+ return `Opção inválida: esperada uma das ${joinValues(issue2.values, "|")}`;
25099
+ case "too_big": {
25100
+ const adj = issue2.inclusive ? "<=" : "<";
25101
+ const sizing = getSizing(issue2.origin);
25102
+ if (sizing)
25103
+ return `Muito grande: esperado que ${issue2.origin ?? "valor"} tivesse ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elementos"}`;
25104
+ return `Muito grande: esperado que ${issue2.origin ?? "valor"} fosse ${adj}${issue2.maximum.toString()}`;
25105
+ }
25106
+ case "too_small": {
25107
+ const adj = issue2.inclusive ? ">=" : ">";
25108
+ const sizing = getSizing(issue2.origin);
25109
+ if (sizing) {
25110
+ return `Muito pequeno: esperado que ${issue2.origin} tivesse ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
25111
+ }
25112
+ return `Muito pequeno: esperado que ${issue2.origin} fosse ${adj}${issue2.minimum.toString()}`;
25113
+ }
25114
+ case "invalid_format": {
25115
+ const _issue = issue2;
25116
+ if (_issue.format === "starts_with")
25117
+ return `Texto inválido: deve começar com "${_issue.prefix}"`;
25118
+ if (_issue.format === "ends_with")
25119
+ return `Texto inválido: deve terminar com "${_issue.suffix}"`;
25120
+ if (_issue.format === "includes")
25121
+ return `Texto inválido: deve incluir "${_issue.includes}"`;
25122
+ if (_issue.format === "regex")
25123
+ return `Texto inválido: deve corresponder ao padrão ${_issue.pattern}`;
25124
+ return `${FormatDictionary[_issue.format] ?? issue2.format} inválido`;
25125
+ }
25126
+ case "not_multiple_of":
25127
+ return `Número inválido: deve ser múltiplo de ${issue2.divisor}`;
25128
+ case "unrecognized_keys":
25129
+ return `Chave${issue2.keys.length > 1 ? "s" : ""} desconhecida${issue2.keys.length > 1 ? "s" : ""}: ${joinValues(issue2.keys, ", ")}`;
25130
+ case "invalid_key":
25131
+ return `Chave inválida em ${issue2.origin}`;
25132
+ case "invalid_union":
25133
+ return "Entrada inválida";
25134
+ case "invalid_element":
25135
+ return `Valor inválido em ${issue2.origin}`;
25136
+ default:
25137
+ return `Campo inválido`;
25138
+ }
25139
+ };
25140
+ };
25141
+ function pt_default() {
24569
25142
  return {
24570
- localeError: error35()
25143
+ localeError: error38()
24571
25144
  };
24572
25145
  }
24573
- // ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/locales/pt.js
24574
- var error36 = () => {
25146
+ // ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/locales/ro.js
25147
+ var error39 = () => {
24575
25148
  const Sizable = {
24576
- string: { unit: "caracteres", verb: "ter" },
24577
- file: { unit: "bytes", verb: "ter" },
24578
- array: { unit: "itens", verb: "ter" },
24579
- set: { unit: "itens", verb: "ter" }
25149
+ string: { unit: "caractere", verb: "să aibă" },
25150
+ file: { unit: "octeți", verb: "să aibă" },
25151
+ array: { unit: "elemente", verb: "să aibă" },
25152
+ set: { unit: "elemente", verb: "să aibă" },
25153
+ map: { unit: "intrări", verb: "să aibă" }
24580
25154
  };
24581
25155
  function getSizing(origin) {
24582
25156
  return Sizable[origin] ?? null;
24583
25157
  }
24584
25158
  const FormatDictionary = {
24585
- regex: "padrão",
24586
- email: "endereço de e-mail",
25159
+ regex: "intrare",
25160
+ email: "adresă de email",
24587
25161
  url: "URL",
24588
25162
  emoji: "emoji",
24589
25163
  uuid: "UUID",
@@ -24596,25 +25170,37 @@ var error36 = () => {
24596
25170
  ulid: "ULID",
24597
25171
  xid: "XID",
24598
25172
  ksuid: "KSUID",
24599
- datetime: "data e hora ISO",
24600
- date: "data ISO",
24601
- time: "hora ISO",
24602
- duration: "duração ISO",
24603
- ipv4: "endereço IPv4",
24604
- ipv6: "endereço IPv6",
24605
- cidrv4: "faixa de IPv4",
24606
- cidrv6: "faixa de IPv6",
24607
- base64: "texto codificado em base64",
24608
- base64url: "URL codificada em base64",
24609
- json_string: "texto JSON",
24610
- e164: "número E.164",
25173
+ datetime: "dată și oră ISO",
25174
+ date: "dată ISO",
25175
+ time: "oră ISO",
25176
+ duration: "durată ISO",
25177
+ ipv4: "adresă IPv4",
25178
+ ipv6: "adresă IPv6",
25179
+ mac: "adresă MAC",
25180
+ cidrv4: "interval IPv4",
25181
+ cidrv6: "interval IPv6",
25182
+ base64: "șir codat base64",
25183
+ base64url: "șir codat base64url",
25184
+ json_string: "șir JSON",
25185
+ e164: "număr E.164",
24611
25186
  jwt: "JWT",
24612
- template_literal: "entrada"
25187
+ template_literal: "intrare"
24613
25188
  };
24614
25189
  const TypeDictionary = {
24615
25190
  nan: "NaN",
24616
- number: "número",
24617
- null: "nulo"
25191
+ string: "șir",
25192
+ number: "număr",
25193
+ boolean: "boolean",
25194
+ function: "funcție",
25195
+ array: "matrice",
25196
+ object: "obiect",
25197
+ undefined: "nedefinit",
25198
+ symbol: "simbol",
25199
+ bigint: "număr mare",
25200
+ void: "void",
25201
+ never: "never",
25202
+ map: "hartă",
25203
+ set: "set"
24618
25204
  };
24619
25205
  return (issue2) => {
24620
25206
  switch (issue2.code) {
@@ -24622,63 +25208,61 @@ var error36 = () => {
24622
25208
  const expected = TypeDictionary[issue2.expected] ?? issue2.expected;
24623
25209
  const receivedType = parsedType(issue2.input);
24624
25210
  const received = TypeDictionary[receivedType] ?? receivedType;
24625
- if (/^[A-Z]/.test(issue2.expected)) {
24626
- return `Tipo inválido: esperado instanceof ${issue2.expected}, recebido ${received}`;
24627
- }
24628
- return `Tipo inválido: esperado ${expected}, recebido ${received}`;
25211
+ return `Intrare invalidă: așteptat ${expected}, primit ${received}`;
24629
25212
  }
24630
25213
  case "invalid_value":
24631
25214
  if (issue2.values.length === 1)
24632
- return `Entrada inválida: esperado ${stringifyPrimitive(issue2.values[0])}`;
24633
- return `Opção inválida: esperada uma das ${joinValues(issue2.values, "|")}`;
25215
+ return `Intrare invalidă: așteptat ${stringifyPrimitive(issue2.values[0])}`;
25216
+ return `Opțiune invalidă: așteptat una dintre ${joinValues(issue2.values, "|")}`;
24634
25217
  case "too_big": {
24635
25218
  const adj = issue2.inclusive ? "<=" : "<";
24636
25219
  const sizing = getSizing(issue2.origin);
24637
25220
  if (sizing)
24638
- return `Muito grande: esperado que ${issue2.origin ?? "valor"} tivesse ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elementos"}`;
24639
- return `Muito grande: esperado que ${issue2.origin ?? "valor"} fosse ${adj}${issue2.maximum.toString()}`;
25221
+ return `Prea mare: așteptat ca ${issue2.origin ?? "valoarea"} ${sizing.verb} ${adj}${issue2.maximum.toString()} ${sizing.unit ?? "elemente"}`;
25222
+ return `Prea mare: așteptat ca ${issue2.origin ?? "valoarea"} fie ${adj}${issue2.maximum.toString()}`;
24640
25223
  }
24641
25224
  case "too_small": {
24642
25225
  const adj = issue2.inclusive ? ">=" : ">";
24643
25226
  const sizing = getSizing(issue2.origin);
24644
25227
  if (sizing) {
24645
- return `Muito pequeno: esperado que ${issue2.origin} tivesse ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
25228
+ return `Prea mic: așteptat ca ${issue2.origin} ${sizing.verb} ${adj}${issue2.minimum.toString()} ${sizing.unit}`;
24646
25229
  }
24647
- return `Muito pequeno: esperado que ${issue2.origin} fosse ${adj}${issue2.minimum.toString()}`;
25230
+ return `Prea mic: așteptat ca ${issue2.origin} fie ${adj}${issue2.minimum.toString()}`;
24648
25231
  }
24649
25232
  case "invalid_format": {
24650
25233
  const _issue = issue2;
24651
- if (_issue.format === "starts_with")
24652
- return `Texto inválido: deve começar com "${_issue.prefix}"`;
25234
+ if (_issue.format === "starts_with") {
25235
+ return `Șir invalid: trebuie înceapă cu "${_issue.prefix}"`;
25236
+ }
24653
25237
  if (_issue.format === "ends_with")
24654
- return `Texto inválido: deve terminar com "${_issue.suffix}"`;
25238
+ return `Șir invalid: trebuie se termine cu "${_issue.suffix}"`;
24655
25239
  if (_issue.format === "includes")
24656
- return `Texto inválido: deve incluir "${_issue.includes}"`;
25240
+ return `Șir invalid: trebuie includă "${_issue.includes}"`;
24657
25241
  if (_issue.format === "regex")
24658
- return `Texto inválido: deve corresponder ao padrão ${_issue.pattern}`;
24659
- return `${FormatDictionary[_issue.format] ?? issue2.format} inválido`;
25242
+ return `Șir invalid: trebuie se potrivească cu modelul ${_issue.pattern}`;
25243
+ return `Format invalid: ${FormatDictionary[_issue.format] ?? issue2.format}`;
24660
25244
  }
24661
25245
  case "not_multiple_of":
24662
- return `Número inválido: deve ser múltiplo de ${issue2.divisor}`;
25246
+ return `Număr invalid: trebuie fie multiplu de ${issue2.divisor}`;
24663
25247
  case "unrecognized_keys":
24664
- return `Chave${issue2.keys.length > 1 ? "s" : ""} desconhecida${issue2.keys.length > 1 ? "s" : ""}: ${joinValues(issue2.keys, ", ")}`;
25248
+ return `Chei nerecunoscute: ${joinValues(issue2.keys, ", ")}`;
24665
25249
  case "invalid_key":
24666
- return `Chave inválida em ${issue2.origin}`;
25250
+ return `Cheie invalidă în ${issue2.origin}`;
24667
25251
  case "invalid_union":
24668
- return "Entrada inválida";
25252
+ return "Intrare invalidă";
24669
25253
  case "invalid_element":
24670
- return `Valor inválido em ${issue2.origin}`;
25254
+ return `Valoare invalidă în ${issue2.origin}`;
24671
25255
  default:
24672
- return `Campo inválido`;
25256
+ return `Intrare invalidă`;
24673
25257
  }
24674
25258
  };
24675
25259
  };
24676
- function pt_default() {
25260
+ function ro_default() {
24677
25261
  return {
24678
- localeError: error36()
25262
+ localeError: error39()
24679
25263
  };
24680
25264
  }
24681
- // ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/locales/ru.js
25265
+ // ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/locales/ru.js
24682
25266
  function getRussianPlural(count, one, few, many) {
24683
25267
  const absCount = Math.abs(count);
24684
25268
  const lastDigit = absCount % 10;
@@ -24694,7 +25278,7 @@ function getRussianPlural(count, one, few, many) {
24694
25278
  }
24695
25279
  return many;
24696
25280
  }
24697
- var error37 = () => {
25281
+ var error40 = () => {
24698
25282
  const Sizable = {
24699
25283
  string: {
24700
25284
  unit: {
@@ -24831,11 +25415,11 @@ var error37 = () => {
24831
25415
  };
24832
25416
  function ru_default() {
24833
25417
  return {
24834
- localeError: error37()
25418
+ localeError: error40()
24835
25419
  };
24836
25420
  }
24837
- // ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/locales/sl.js
24838
- var error38 = () => {
25421
+ // ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/locales/sl.js
25422
+ var error41 = () => {
24839
25423
  const Sizable = {
24840
25424
  string: { unit: "znakov", verb: "imeti" },
24841
25425
  file: { unit: "bajtov", verb: "imeti" },
@@ -24940,11 +25524,11 @@ var error38 = () => {
24940
25524
  };
24941
25525
  function sl_default() {
24942
25526
  return {
24943
- localeError: error38()
25527
+ localeError: error41()
24944
25528
  };
24945
25529
  }
24946
- // ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/locales/sv.js
24947
- var error39 = () => {
25530
+ // ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/locales/sv.js
25531
+ var error42 = () => {
24948
25532
  const Sizable = {
24949
25533
  string: { unit: "tecken", verb: "att ha" },
24950
25534
  file: { unit: "bytes", verb: "att ha" },
@@ -25050,11 +25634,11 @@ var error39 = () => {
25050
25634
  };
25051
25635
  function sv_default() {
25052
25636
  return {
25053
- localeError: error39()
25637
+ localeError: error42()
25054
25638
  };
25055
25639
  }
25056
- // ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/locales/ta.js
25057
- var error40 = () => {
25640
+ // ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/locales/ta.js
25641
+ var error43 = () => {
25058
25642
  const Sizable = {
25059
25643
  string: { unit: "எழுத்துக்கள்", verb: "கொண்டிருக்க வேண்டும்" },
25060
25644
  file: { unit: "பைட்டுகள்", verb: "கொண்டிருக்க வேண்டும்" },
@@ -25160,11 +25744,11 @@ var error40 = () => {
25160
25744
  };
25161
25745
  function ta_default() {
25162
25746
  return {
25163
- localeError: error40()
25747
+ localeError: error43()
25164
25748
  };
25165
25749
  }
25166
- // ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/locales/th.js
25167
- var error41 = () => {
25750
+ // ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/locales/th.js
25751
+ var error44 = () => {
25168
25752
  const Sizable = {
25169
25753
  string: { unit: "ตัวอักษร", verb: "ควรมี" },
25170
25754
  file: { unit: "ไบต์", verb: "ควรมี" },
@@ -25270,11 +25854,11 @@ var error41 = () => {
25270
25854
  };
25271
25855
  function th_default() {
25272
25856
  return {
25273
- localeError: error41()
25857
+ localeError: error44()
25274
25858
  };
25275
25859
  }
25276
- // ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/locales/tr.js
25277
- var error42 = () => {
25860
+ // ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/locales/tr.js
25861
+ var error45 = () => {
25278
25862
  const Sizable = {
25279
25863
  string: { unit: "karakter", verb: "olmalı" },
25280
25864
  file: { unit: "bayt", verb: "olmalı" },
@@ -25375,11 +25959,11 @@ var error42 = () => {
25375
25959
  };
25376
25960
  function tr_default() {
25377
25961
  return {
25378
- localeError: error42()
25962
+ localeError: error45()
25379
25963
  };
25380
25964
  }
25381
- // ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/locales/uk.js
25382
- var error43 = () => {
25965
+ // ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/locales/uk.js
25966
+ var error46 = () => {
25383
25967
  const Sizable = {
25384
25968
  string: { unit: "символів", verb: "матиме" },
25385
25969
  file: { unit: "байтів", verb: "матиме" },
@@ -25483,16 +26067,16 @@ var error43 = () => {
25483
26067
  };
25484
26068
  function uk_default() {
25485
26069
  return {
25486
- localeError: error43()
26070
+ localeError: error46()
25487
26071
  };
25488
26072
  }
25489
26073
 
25490
- // ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/locales/ua.js
26074
+ // ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/locales/ua.js
25491
26075
  function ua_default() {
25492
26076
  return uk_default();
25493
26077
  }
25494
- // ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/locales/ur.js
25495
- var error44 = () => {
26078
+ // ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/locales/ur.js
26079
+ var error47 = () => {
25496
26080
  const Sizable = {
25497
26081
  string: { unit: "حروف", verb: "ہونا" },
25498
26082
  file: { unit: "بائٹس", verb: "ہونا" },
@@ -25598,16 +26182,17 @@ var error44 = () => {
25598
26182
  };
25599
26183
  function ur_default() {
25600
26184
  return {
25601
- localeError: error44()
26185
+ localeError: error47()
25602
26186
  };
25603
26187
  }
25604
- // ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/locales/uz.js
25605
- var error45 = () => {
26188
+ // ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/locales/uz.js
26189
+ var error48 = () => {
25606
26190
  const Sizable = {
25607
26191
  string: { unit: "belgi", verb: "bo‘lishi kerak" },
25608
26192
  file: { unit: "bayt", verb: "bo‘lishi kerak" },
25609
26193
  array: { unit: "element", verb: "bo‘lishi kerak" },
25610
- set: { unit: "element", verb: "bo‘lishi kerak" }
26194
+ set: { unit: "element", verb: "bo‘lishi kerak" },
26195
+ map: { unit: "yozuv", verb: "bo‘lishi kerak" }
25611
26196
  };
25612
26197
  function getSizing(origin) {
25613
26198
  return Sizable[origin] ?? null;
@@ -25707,11 +26292,11 @@ var error45 = () => {
25707
26292
  };
25708
26293
  function uz_default() {
25709
26294
  return {
25710
- localeError: error45()
26295
+ localeError: error48()
25711
26296
  };
25712
26297
  }
25713
- // ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/locales/vi.js
25714
- var error46 = () => {
26298
+ // ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/locales/vi.js
26299
+ var error49 = () => {
25715
26300
  const Sizable = {
25716
26301
  string: { unit: "ký tự", verb: "có" },
25717
26302
  file: { unit: "byte", verb: "có" },
@@ -25815,11 +26400,11 @@ var error46 = () => {
25815
26400
  };
25816
26401
  function vi_default() {
25817
26402
  return {
25818
- localeError: error46()
26403
+ localeError: error49()
25819
26404
  };
25820
26405
  }
25821
- // ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/locales/zh-CN.js
25822
- var error47 = () => {
26406
+ // ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/locales/zh-CN.js
26407
+ var error50 = () => {
25823
26408
  const Sizable = {
25824
26409
  string: { unit: "字符", verb: "包含" },
25825
26410
  file: { unit: "字节", verb: "包含" },
@@ -25924,11 +26509,11 @@ var error47 = () => {
25924
26509
  };
25925
26510
  function zh_CN_default() {
25926
26511
  return {
25927
- localeError: error47()
26512
+ localeError: error50()
25928
26513
  };
25929
26514
  }
25930
- // ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/locales/zh-TW.js
25931
- var error48 = () => {
26515
+ // ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/locales/zh-TW.js
26516
+ var error51 = () => {
25932
26517
  const Sizable = {
25933
26518
  string: { unit: "字元", verb: "擁有" },
25934
26519
  file: { unit: "位元組", verb: "擁有" },
@@ -26031,11 +26616,11 @@ var error48 = () => {
26031
26616
  };
26032
26617
  function zh_TW_default() {
26033
26618
  return {
26034
- localeError: error48()
26619
+ localeError: error51()
26035
26620
  };
26036
26621
  }
26037
- // ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/locales/yo.js
26038
- var error49 = () => {
26622
+ // ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/locales/yo.js
26623
+ var error52 = () => {
26039
26624
  const Sizable = {
26040
26625
  string: { unit: "àmi", verb: "ní" },
26041
26626
  file: { unit: "bytes", verb: "ní" },
@@ -26138,11 +26723,11 @@ var error49 = () => {
26138
26723
  };
26139
26724
  function yo_default() {
26140
26725
  return {
26141
- localeError: error49()
26726
+ localeError: error52()
26142
26727
  };
26143
26728
  }
26144
- // ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/core/registries.js
26145
- var _a;
26729
+ // ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/core/registries.js
26730
+ var _a2;
26146
26731
  var $output = Symbol("ZodOutput");
26147
26732
  var $input = Symbol("ZodInput");
26148
26733
 
@@ -26189,9 +26774,9 @@ class $ZodRegistry {
26189
26774
  function registry() {
26190
26775
  return new $ZodRegistry;
26191
26776
  }
26192
- (_a = globalThis).__zod_globalRegistry ?? (_a.__zod_globalRegistry = registry());
26777
+ (_a2 = globalThis).__zod_globalRegistry ?? (_a2.__zod_globalRegistry = registry());
26193
26778
  var globalRegistry = globalThis.__zod_globalRegistry;
26194
- // ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/core/api.js
26779
+ // ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/core/api.js
26195
26780
  function _string(Class2, params) {
26196
26781
  return new Class2({
26197
26782
  type: "string",
@@ -26995,7 +27580,7 @@ function _refine(Class2, fn, _params) {
26995
27580
  });
26996
27581
  return schema;
26997
27582
  }
26998
- function _superRefine(fn) {
27583
+ function _superRefine(fn, params) {
26999
27584
  const ch = _check((payload) => {
27000
27585
  payload.addIssue = (issue2) => {
27001
27586
  if (typeof issue2 === "string") {
@@ -27012,7 +27597,7 @@ function _superRefine(fn) {
27012
27597
  }
27013
27598
  };
27014
27599
  return fn(payload.value, payload);
27015
- });
27600
+ }, params);
27016
27601
  return ch;
27017
27602
  }
27018
27603
  function _check(fn, params) {
@@ -27111,7 +27696,7 @@ function _stringFormat(Class2, format, fnOrRegex, _params = {}) {
27111
27696
  const inst = new Class2(def);
27112
27697
  return inst;
27113
27698
  }
27114
- // ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/core/to-json-schema.js
27699
+ // ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/core/to-json-schema.js
27115
27700
  function initializeContext(params) {
27116
27701
  let target = params?.target ?? "draft-2020-12";
27117
27702
  if (target === "draft-4")
@@ -27133,7 +27718,7 @@ function initializeContext(params) {
27133
27718
  };
27134
27719
  }
27135
27720
  function process2(schema, ctx, _params = { path: [], schemaPath: [] }) {
27136
- var _a2;
27721
+ var _a3;
27137
27722
  const def = schema._zod.def;
27138
27723
  const seen = ctx.seen.get(schema);
27139
27724
  if (seen) {
@@ -27180,8 +27765,8 @@ function process2(schema, ctx, _params = { path: [], schemaPath: [] }) {
27180
27765
  delete result.schema.examples;
27181
27766
  delete result.schema.default;
27182
27767
  }
27183
- if (ctx.io === "input" && result.schema._prefault)
27184
- (_a2 = result.schema).default ?? (_a2.default = result.schema._prefault);
27768
+ if (ctx.io === "input" && "_prefault" in result.schema)
27769
+ (_a3 = result.schema).default ?? (_a3.default = result.schema._prefault);
27185
27770
  delete result.schema._prefault;
27186
27771
  const _result = ctx.seen.get(schema);
27187
27772
  return _result.schema;
@@ -27358,10 +27943,15 @@ function finalize(ctx, schema) {
27358
27943
  result.$id = ctx.external.uri(id);
27359
27944
  }
27360
27945
  Object.assign(result, root.def ?? root.schema);
27946
+ const rootMetaId = ctx.metadataRegistry.get(schema)?.id;
27947
+ if (rootMetaId !== undefined && result.id === rootMetaId)
27948
+ delete result.id;
27361
27949
  const defs = ctx.external?.defs ?? {};
27362
27950
  for (const entry of ctx.seen.entries()) {
27363
27951
  const seen = entry[1];
27364
27952
  if (seen.def && seen.defId) {
27953
+ if (seen.def.id === seen.defId)
27954
+ delete seen.def.id;
27365
27955
  defs[seen.defId] = seen.def;
27366
27956
  }
27367
27957
  }
@@ -27416,6 +28006,8 @@ function isTransforming(_schema, _ctx) {
27416
28006
  return isTransforming(def.keyType, ctx) || isTransforming(def.valueType, ctx);
27417
28007
  }
27418
28008
  if (def.type === "pipe") {
28009
+ if (_schema._zod.traits.has("$ZodCodec"))
28010
+ return true;
27419
28011
  return isTransforming(def.in, ctx) || isTransforming(def.out, ctx);
27420
28012
  }
27421
28013
  if (def.type === "object") {
@@ -27456,7 +28048,7 @@ var createStandardJSONSchemaMethod = (schema, io, processors = {}) => (params) =
27456
28048
  extractDefs(ctx, schema);
27457
28049
  return finalize(ctx, schema);
27458
28050
  };
27459
- // ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/core/json-schema-processors.js
28051
+ // ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/core/json-schema-processors.js
27460
28052
  var formatMap = {
27461
28053
  guid: "uuid",
27462
28054
  url: "uri",
@@ -27503,39 +28095,28 @@ var numberProcessor = (schema, ctx, _json, _params) => {
27503
28095
  json.type = "integer";
27504
28096
  else
27505
28097
  json.type = "number";
27506
- if (typeof exclusiveMinimum === "number") {
27507
- if (ctx.target === "draft-04" || ctx.target === "openapi-3.0") {
28098
+ const exMin = typeof exclusiveMinimum === "number" && exclusiveMinimum >= (minimum ?? Number.NEGATIVE_INFINITY);
28099
+ const exMax = typeof exclusiveMaximum === "number" && exclusiveMaximum <= (maximum ?? Number.POSITIVE_INFINITY);
28100
+ const legacy = ctx.target === "draft-04" || ctx.target === "openapi-3.0";
28101
+ if (exMin) {
28102
+ if (legacy) {
27508
28103
  json.minimum = exclusiveMinimum;
27509
28104
  json.exclusiveMinimum = true;
27510
28105
  } else {
27511
28106
  json.exclusiveMinimum = exclusiveMinimum;
27512
28107
  }
27513
- }
27514
- if (typeof minimum === "number") {
28108
+ } else if (typeof minimum === "number") {
27515
28109
  json.minimum = minimum;
27516
- if (typeof exclusiveMinimum === "number" && ctx.target !== "draft-04") {
27517
- if (exclusiveMinimum >= minimum)
27518
- delete json.minimum;
27519
- else
27520
- delete json.exclusiveMinimum;
27521
- }
27522
28110
  }
27523
- if (typeof exclusiveMaximum === "number") {
27524
- if (ctx.target === "draft-04" || ctx.target === "openapi-3.0") {
28111
+ if (exMax) {
28112
+ if (legacy) {
27525
28113
  json.maximum = exclusiveMaximum;
27526
28114
  json.exclusiveMaximum = true;
27527
28115
  } else {
27528
28116
  json.exclusiveMaximum = exclusiveMaximum;
27529
28117
  }
27530
- }
27531
- if (typeof maximum === "number") {
28118
+ } else if (typeof maximum === "number") {
27532
28119
  json.maximum = maximum;
27533
- if (typeof exclusiveMaximum === "number" && ctx.target !== "draft-04") {
27534
- if (exclusiveMaximum <= maximum)
27535
- delete json.maximum;
27536
- else
27537
- delete json.exclusiveMaximum;
27538
- }
27539
28120
  }
27540
28121
  if (typeof multipleOf === "number")
27541
28122
  json.multipleOf = multipleOf;
@@ -27703,7 +28284,10 @@ var arrayProcessor = (schema, ctx, _json, params) => {
27703
28284
  if (typeof maximum === "number")
27704
28285
  json.maxItems = maximum;
27705
28286
  json.type = "array";
27706
- json.items = process2(def.element, ctx, { ...params, path: [...params.path, "items"] });
28287
+ json.items = process2(def.element, ctx, {
28288
+ ...params,
28289
+ path: [...params.path, "items"]
28290
+ });
27707
28291
  };
27708
28292
  var objectProcessor = (schema, ctx, _json, params) => {
27709
28293
  const json = _json;
@@ -27896,7 +28480,8 @@ var catchProcessor = (schema, ctx, json, params) => {
27896
28480
  };
27897
28481
  var pipeProcessor = (schema, ctx, _json, params) => {
27898
28482
  const def = schema._zod.def;
27899
- const innerType = ctx.io === "input" ? def.in._zod.def.type === "transform" ? def.out : def.in : def.out;
28483
+ const inIsTransform = def.in._zod.traits.has("$ZodTransform");
28484
+ const innerType = ctx.io === "input" ? inIsTransform ? def.out : def.in : def.out;
27900
28485
  process2(innerType, ctx, params);
27901
28486
  const seen = ctx.seen.get(schema);
27902
28487
  seen.ref = innerType;
@@ -28001,7 +28586,7 @@ function toJSONSchema(input, params) {
28001
28586
  extractDefs(ctx, input);
28002
28587
  return finalize(ctx, input);
28003
28588
  }
28004
- // ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/core/json-schema-generator.js
28589
+ // ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/core/json-schema-generator.js
28005
28590
  class JSONSchemaGenerator {
28006
28591
  get metadataRegistry() {
28007
28592
  return this.ctx.metadataRegistry;
@@ -28060,9 +28645,9 @@ class JSONSchemaGenerator {
28060
28645
  return plainResult;
28061
28646
  }
28062
28647
  }
28063
- // ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/core/json-schema.js
28648
+ // ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/core/json-schema.js
28064
28649
  var exports_json_schema = {};
28065
- // ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/classic/schemas.js
28650
+ // ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/classic/schemas.js
28066
28651
  var exports_schemas2 = {};
28067
28652
  __export(exports_schemas2, {
28068
28653
  xor: () => xor,
@@ -28122,6 +28707,7 @@ __export(exports_schemas2, {
28122
28707
  json: () => json,
28123
28708
  ipv6: () => ipv62,
28124
28709
  ipv4: () => ipv42,
28710
+ invertCodec: () => invertCodec,
28125
28711
  intersection: () => intersection,
28126
28712
  int64: () => int64,
28127
28713
  int32: () => int32,
@@ -28182,6 +28768,7 @@ __export(exports_schemas2, {
28182
28768
  ZodRecord: () => ZodRecord,
28183
28769
  ZodReadonly: () => ZodReadonly,
28184
28770
  ZodPromise: () => ZodPromise,
28771
+ ZodPreprocess: () => ZodPreprocess,
28185
28772
  ZodPrefault: () => ZodPrefault,
28186
28773
  ZodPipe: () => ZodPipe,
28187
28774
  ZodOptional: () => ZodOptional,
@@ -28231,7 +28818,7 @@ __export(exports_schemas2, {
28231
28818
  ZodAny: () => ZodAny
28232
28819
  });
28233
28820
 
28234
- // ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/classic/checks.js
28821
+ // ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/classic/checks.js
28235
28822
  var exports_checks2 = {};
28236
28823
  __export(exports_checks2, {
28237
28824
  uppercase: () => _uppercase,
@@ -28265,7 +28852,7 @@ __export(exports_checks2, {
28265
28852
  endsWith: () => _endsWith
28266
28853
  });
28267
28854
 
28268
- // ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/classic/iso.js
28855
+ // ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/classic/iso.js
28269
28856
  var exports_iso = {};
28270
28857
  __export(exports_iso, {
28271
28858
  time: () => time2,
@@ -28306,7 +28893,7 @@ function duration2(params) {
28306
28893
  return _isoDuration(ZodISODuration, params);
28307
28894
  }
28308
28895
 
28309
- // ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/classic/errors.js
28896
+ // ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/classic/errors.js
28310
28897
  var initializer2 = (inst, issues) => {
28311
28898
  $ZodError.init(inst, issues);
28312
28899
  inst.name = "ZodError";
@@ -28336,12 +28923,12 @@ var initializer2 = (inst, issues) => {
28336
28923
  }
28337
28924
  });
28338
28925
  };
28339
- var ZodError = $constructor("ZodError", initializer2);
28340
- var ZodRealError = $constructor("ZodError", initializer2, {
28926
+ var ZodError = /* @__PURE__ */ $constructor("ZodError", initializer2);
28927
+ var ZodRealError = /* @__PURE__ */ $constructor("ZodError", initializer2, {
28341
28928
  Parent: Error
28342
28929
  });
28343
28930
 
28344
- // ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/classic/parse.js
28931
+ // ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/classic/parse.js
28345
28932
  var parse3 = /* @__PURE__ */ _parse(ZodRealError);
28346
28933
  var parseAsync2 = /* @__PURE__ */ _parseAsync(ZodRealError);
28347
28934
  var safeParse2 = /* @__PURE__ */ _safeParse(ZodRealError);
@@ -28355,7 +28942,44 @@ var safeDecode2 = /* @__PURE__ */ _safeDecode(ZodRealError);
28355
28942
  var safeEncodeAsync2 = /* @__PURE__ */ _safeEncodeAsync(ZodRealError);
28356
28943
  var safeDecodeAsync2 = /* @__PURE__ */ _safeDecodeAsync(ZodRealError);
28357
28944
 
28358
- // ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/classic/schemas.js
28945
+ // ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/classic/schemas.js
28946
+ var _installedGroups = /* @__PURE__ */ new WeakMap;
28947
+ function _installLazyMethods(inst, group, methods) {
28948
+ const proto = Object.getPrototypeOf(inst);
28949
+ let installed = _installedGroups.get(proto);
28950
+ if (!installed) {
28951
+ installed = new Set;
28952
+ _installedGroups.set(proto, installed);
28953
+ }
28954
+ if (installed.has(group))
28955
+ return;
28956
+ installed.add(group);
28957
+ for (const key in methods) {
28958
+ const fn = methods[key];
28959
+ Object.defineProperty(proto, key, {
28960
+ configurable: true,
28961
+ enumerable: false,
28962
+ get() {
28963
+ const bound = fn.bind(this);
28964
+ Object.defineProperty(this, key, {
28965
+ configurable: true,
28966
+ writable: true,
28967
+ enumerable: true,
28968
+ value: bound
28969
+ });
28970
+ return bound;
28971
+ },
28972
+ set(v) {
28973
+ Object.defineProperty(this, key, {
28974
+ configurable: true,
28975
+ writable: true,
28976
+ enumerable: true,
28977
+ value: v
28978
+ });
28979
+ }
28980
+ });
28981
+ }
28982
+ }
28359
28983
  var ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
28360
28984
  $ZodType.init(inst, def);
28361
28985
  Object.assign(inst["~standard"], {
@@ -28368,23 +28992,6 @@ var ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
28368
28992
  inst.def = def;
28369
28993
  inst.type = def.type;
28370
28994
  Object.defineProperty(inst, "_def", { value: def });
28371
- inst.check = (...checks2) => {
28372
- return inst.clone(exports_util.mergeDefs(def, {
28373
- checks: [
28374
- ...def.checks ?? [],
28375
- ...checks2.map((ch) => typeof ch === "function" ? { _zod: { check: ch, def: { check: "custom" }, onattach: [] } } : ch)
28376
- ]
28377
- }), {
28378
- parent: true
28379
- });
28380
- };
28381
- inst.with = inst.check;
28382
- inst.clone = (def2, params) => clone(inst, def2, params);
28383
- inst.brand = () => inst;
28384
- inst.register = (reg, meta2) => {
28385
- reg.add(inst, meta2);
28386
- return inst;
28387
- };
28388
28995
  inst.parse = (data, params) => parse3(inst, data, params, { callee: inst.parse });
28389
28996
  inst.safeParse = (data, params) => safeParse2(inst, data, params);
28390
28997
  inst.parseAsync = async (data, params) => parseAsync2(inst, data, params, { callee: inst.parseAsync });
@@ -28398,45 +29005,108 @@ var ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
28398
29005
  inst.safeDecode = (data, params) => safeDecode2(inst, data, params);
28399
29006
  inst.safeEncodeAsync = async (data, params) => safeEncodeAsync2(inst, data, params);
28400
29007
  inst.safeDecodeAsync = async (data, params) => safeDecodeAsync2(inst, data, params);
28401
- inst.refine = (check, params) => inst.check(refine(check, params));
28402
- inst.superRefine = (refinement) => inst.check(superRefine(refinement));
28403
- inst.overwrite = (fn) => inst.check(_overwrite(fn));
28404
- inst.optional = () => optional(inst);
28405
- inst.exactOptional = () => exactOptional(inst);
28406
- inst.nullable = () => nullable(inst);
28407
- inst.nullish = () => optional(nullable(inst));
28408
- inst.nonoptional = (params) => nonoptional(inst, params);
28409
- inst.array = () => array(inst);
28410
- inst.or = (arg) => union([inst, arg]);
28411
- inst.and = (arg) => intersection(inst, arg);
28412
- inst.transform = (tx) => pipe(inst, transform(tx));
28413
- inst.default = (def2) => _default2(inst, def2);
28414
- inst.prefault = (def2) => prefault(inst, def2);
28415
- inst.catch = (params) => _catch2(inst, params);
28416
- inst.pipe = (target) => pipe(inst, target);
28417
- inst.readonly = () => readonly(inst);
28418
- inst.describe = (description) => {
28419
- const cl = inst.clone();
28420
- globalRegistry.add(cl, { description });
28421
- return cl;
28422
- };
29008
+ _installLazyMethods(inst, "ZodType", {
29009
+ check(...chks) {
29010
+ const def2 = this.def;
29011
+ return this.clone(exports_util.mergeDefs(def2, {
29012
+ checks: [
29013
+ ...def2.checks ?? [],
29014
+ ...chks.map((ch) => typeof ch === "function" ? { _zod: { check: ch, def: { check: "custom" }, onattach: [] } } : ch)
29015
+ ]
29016
+ }), { parent: true });
29017
+ },
29018
+ with(...chks) {
29019
+ return this.check(...chks);
29020
+ },
29021
+ clone(def2, params) {
29022
+ return clone(this, def2, params);
29023
+ },
29024
+ brand() {
29025
+ return this;
29026
+ },
29027
+ register(reg, meta2) {
29028
+ reg.add(this, meta2);
29029
+ return this;
29030
+ },
29031
+ refine(check, params) {
29032
+ return this.check(refine(check, params));
29033
+ },
29034
+ superRefine(refinement, params) {
29035
+ return this.check(superRefine(refinement, params));
29036
+ },
29037
+ overwrite(fn) {
29038
+ return this.check(_overwrite(fn));
29039
+ },
29040
+ optional() {
29041
+ return optional(this);
29042
+ },
29043
+ exactOptional() {
29044
+ return exactOptional(this);
29045
+ },
29046
+ nullable() {
29047
+ return nullable(this);
29048
+ },
29049
+ nullish() {
29050
+ return optional(nullable(this));
29051
+ },
29052
+ nonoptional(params) {
29053
+ return nonoptional(this, params);
29054
+ },
29055
+ array() {
29056
+ return array(this);
29057
+ },
29058
+ or(arg) {
29059
+ return union([this, arg]);
29060
+ },
29061
+ and(arg) {
29062
+ return intersection(this, arg);
29063
+ },
29064
+ transform(tx) {
29065
+ return pipe(this, transform(tx));
29066
+ },
29067
+ default(d) {
29068
+ return _default2(this, d);
29069
+ },
29070
+ prefault(d) {
29071
+ return prefault(this, d);
29072
+ },
29073
+ catch(params) {
29074
+ return _catch2(this, params);
29075
+ },
29076
+ pipe(target) {
29077
+ return pipe(this, target);
29078
+ },
29079
+ readonly() {
29080
+ return readonly(this);
29081
+ },
29082
+ describe(description) {
29083
+ const cl = this.clone();
29084
+ globalRegistry.add(cl, { description });
29085
+ return cl;
29086
+ },
29087
+ meta(...args) {
29088
+ if (args.length === 0)
29089
+ return globalRegistry.get(this);
29090
+ const cl = this.clone();
29091
+ globalRegistry.add(cl, args[0]);
29092
+ return cl;
29093
+ },
29094
+ isOptional() {
29095
+ return this.safeParse(undefined).success;
29096
+ },
29097
+ isNullable() {
29098
+ return this.safeParse(null).success;
29099
+ },
29100
+ apply(fn) {
29101
+ return fn(this);
29102
+ }
29103
+ });
28423
29104
  Object.defineProperty(inst, "description", {
28424
29105
  get() {
28425
29106
  return globalRegistry.get(inst)?.description;
28426
29107
  },
28427
29108
  configurable: true
28428
29109
  });
28429
- inst.meta = (...args) => {
28430
- if (args.length === 0) {
28431
- return globalRegistry.get(inst);
28432
- }
28433
- const cl = inst.clone();
28434
- globalRegistry.add(cl, args[0]);
28435
- return cl;
28436
- };
28437
- inst.isOptional = () => inst.safeParse(undefined).success;
28438
- inst.isNullable = () => inst.safeParse(null).success;
28439
- inst.apply = (fn) => fn(inst);
28440
29110
  return inst;
28441
29111
  });
28442
29112
  var _ZodString = /* @__PURE__ */ $constructor("_ZodString", (inst, def) => {
@@ -28447,21 +29117,53 @@ var _ZodString = /* @__PURE__ */ $constructor("_ZodString", (inst, def) => {
28447
29117
  inst.format = bag.format ?? null;
28448
29118
  inst.minLength = bag.minimum ?? null;
28449
29119
  inst.maxLength = bag.maximum ?? null;
28450
- inst.regex = (...args) => inst.check(_regex(...args));
28451
- inst.includes = (...args) => inst.check(_includes(...args));
28452
- inst.startsWith = (...args) => inst.check(_startsWith(...args));
28453
- inst.endsWith = (...args) => inst.check(_endsWith(...args));
28454
- inst.min = (...args) => inst.check(_minLength(...args));
28455
- inst.max = (...args) => inst.check(_maxLength(...args));
28456
- inst.length = (...args) => inst.check(_length(...args));
28457
- inst.nonempty = (...args) => inst.check(_minLength(1, ...args));
28458
- inst.lowercase = (params) => inst.check(_lowercase(params));
28459
- inst.uppercase = (params) => inst.check(_uppercase(params));
28460
- inst.trim = () => inst.check(_trim());
28461
- inst.normalize = (...args) => inst.check(_normalize(...args));
28462
- inst.toLowerCase = () => inst.check(_toLowerCase());
28463
- inst.toUpperCase = () => inst.check(_toUpperCase());
28464
- inst.slugify = () => inst.check(_slugify());
29120
+ _installLazyMethods(inst, "_ZodString", {
29121
+ regex(...args) {
29122
+ return this.check(_regex(...args));
29123
+ },
29124
+ includes(...args) {
29125
+ return this.check(_includes(...args));
29126
+ },
29127
+ startsWith(...args) {
29128
+ return this.check(_startsWith(...args));
29129
+ },
29130
+ endsWith(...args) {
29131
+ return this.check(_endsWith(...args));
29132
+ },
29133
+ min(...args) {
29134
+ return this.check(_minLength(...args));
29135
+ },
29136
+ max(...args) {
29137
+ return this.check(_maxLength(...args));
29138
+ },
29139
+ length(...args) {
29140
+ return this.check(_length(...args));
29141
+ },
29142
+ nonempty(...args) {
29143
+ return this.check(_minLength(1, ...args));
29144
+ },
29145
+ lowercase(params) {
29146
+ return this.check(_lowercase(params));
29147
+ },
29148
+ uppercase(params) {
29149
+ return this.check(_uppercase(params));
29150
+ },
29151
+ trim() {
29152
+ return this.check(_trim());
29153
+ },
29154
+ normalize(...args) {
29155
+ return this.check(_normalize(...args));
29156
+ },
29157
+ toLowerCase() {
29158
+ return this.check(_toLowerCase());
29159
+ },
29160
+ toUpperCase() {
29161
+ return this.check(_toUpperCase());
29162
+ },
29163
+ slugify() {
29164
+ return this.check(_slugify());
29165
+ }
29166
+ });
28465
29167
  });
28466
29168
  var ZodString = /* @__PURE__ */ $constructor("ZodString", (inst, def) => {
28467
29169
  $ZodString.init(inst, def);
@@ -28540,7 +29242,7 @@ function url(params) {
28540
29242
  }
28541
29243
  function httpUrl(params) {
28542
29244
  return _url(ZodURL, {
28543
- protocol: /^https?$/,
29245
+ protocol: exports_regexes.httpProtocol,
28544
29246
  hostname: exports_regexes.domain,
28545
29247
  ...exports_util.normalizeParams(params)
28546
29248
  });
@@ -28682,21 +29384,53 @@ var ZodNumber = /* @__PURE__ */ $constructor("ZodNumber", (inst, def) => {
28682
29384
  $ZodNumber.init(inst, def);
28683
29385
  ZodType.init(inst, def);
28684
29386
  inst._zod.processJSONSchema = (ctx, json, params) => numberProcessor(inst, ctx, json, params);
28685
- inst.gt = (value, params) => inst.check(_gt(value, params));
28686
- inst.gte = (value, params) => inst.check(_gte(value, params));
28687
- inst.min = (value, params) => inst.check(_gte(value, params));
28688
- inst.lt = (value, params) => inst.check(_lt(value, params));
28689
- inst.lte = (value, params) => inst.check(_lte(value, params));
28690
- inst.max = (value, params) => inst.check(_lte(value, params));
28691
- inst.int = (params) => inst.check(int(params));
28692
- inst.safe = (params) => inst.check(int(params));
28693
- inst.positive = (params) => inst.check(_gt(0, params));
28694
- inst.nonnegative = (params) => inst.check(_gte(0, params));
28695
- inst.negative = (params) => inst.check(_lt(0, params));
28696
- inst.nonpositive = (params) => inst.check(_lte(0, params));
28697
- inst.multipleOf = (value, params) => inst.check(_multipleOf(value, params));
28698
- inst.step = (value, params) => inst.check(_multipleOf(value, params));
28699
- inst.finite = () => inst;
29387
+ _installLazyMethods(inst, "ZodNumber", {
29388
+ gt(value, params) {
29389
+ return this.check(_gt(value, params));
29390
+ },
29391
+ gte(value, params) {
29392
+ return this.check(_gte(value, params));
29393
+ },
29394
+ min(value, params) {
29395
+ return this.check(_gte(value, params));
29396
+ },
29397
+ lt(value, params) {
29398
+ return this.check(_lt(value, params));
29399
+ },
29400
+ lte(value, params) {
29401
+ return this.check(_lte(value, params));
29402
+ },
29403
+ max(value, params) {
29404
+ return this.check(_lte(value, params));
29405
+ },
29406
+ int(params) {
29407
+ return this.check(int(params));
29408
+ },
29409
+ safe(params) {
29410
+ return this.check(int(params));
29411
+ },
29412
+ positive(params) {
29413
+ return this.check(_gt(0, params));
29414
+ },
29415
+ nonnegative(params) {
29416
+ return this.check(_gte(0, params));
29417
+ },
29418
+ negative(params) {
29419
+ return this.check(_lt(0, params));
29420
+ },
29421
+ nonpositive(params) {
29422
+ return this.check(_lte(0, params));
29423
+ },
29424
+ multipleOf(value, params) {
29425
+ return this.check(_multipleOf(value, params));
29426
+ },
29427
+ step(value, params) {
29428
+ return this.check(_multipleOf(value, params));
29429
+ },
29430
+ finite() {
29431
+ return this;
29432
+ }
29433
+ });
28700
29434
  const bag = inst._zod.bag;
28701
29435
  inst.minValue = Math.max(bag.minimum ?? Number.NEGATIVE_INFINITY, bag.exclusiveMinimum ?? Number.NEGATIVE_INFINITY) ?? null;
28702
29436
  inst.maxValue = Math.min(bag.maximum ?? Number.POSITIVE_INFINITY, bag.exclusiveMaximum ?? Number.POSITIVE_INFINITY) ?? null;
@@ -28843,11 +29577,23 @@ var ZodArray = /* @__PURE__ */ $constructor("ZodArray", (inst, def) => {
28843
29577
  ZodType.init(inst, def);
28844
29578
  inst._zod.processJSONSchema = (ctx, json, params) => arrayProcessor(inst, ctx, json, params);
28845
29579
  inst.element = def.element;
28846
- inst.min = (minLength, params) => inst.check(_minLength(minLength, params));
28847
- inst.nonempty = (params) => inst.check(_minLength(1, params));
28848
- inst.max = (maxLength, params) => inst.check(_maxLength(maxLength, params));
28849
- inst.length = (len, params) => inst.check(_length(len, params));
28850
- inst.unwrap = () => inst.element;
29580
+ _installLazyMethods(inst, "ZodArray", {
29581
+ min(n, params) {
29582
+ return this.check(_minLength(n, params));
29583
+ },
29584
+ nonempty(params) {
29585
+ return this.check(_minLength(1, params));
29586
+ },
29587
+ max(n, params) {
29588
+ return this.check(_maxLength(n, params));
29589
+ },
29590
+ length(n, params) {
29591
+ return this.check(_length(n, params));
29592
+ },
29593
+ unwrap() {
29594
+ return this.element;
29595
+ }
29596
+ });
28851
29597
  });
28852
29598
  function array(element, params) {
28853
29599
  return _array(ZodArray, element, params);
@@ -28863,23 +29609,47 @@ var ZodObject = /* @__PURE__ */ $constructor("ZodObject", (inst, def) => {
28863
29609
  exports_util.defineLazy(inst, "shape", () => {
28864
29610
  return def.shape;
28865
29611
  });
28866
- inst.keyof = () => _enum2(Object.keys(inst._zod.def.shape));
28867
- inst.catchall = (catchall) => inst.clone({ ...inst._zod.def, catchall });
28868
- inst.passthrough = () => inst.clone({ ...inst._zod.def, catchall: unknown() });
28869
- inst.loose = () => inst.clone({ ...inst._zod.def, catchall: unknown() });
28870
- inst.strict = () => inst.clone({ ...inst._zod.def, catchall: never() });
28871
- inst.strip = () => inst.clone({ ...inst._zod.def, catchall: undefined });
28872
- inst.extend = (incoming) => {
28873
- return exports_util.extend(inst, incoming);
28874
- };
28875
- inst.safeExtend = (incoming) => {
28876
- return exports_util.safeExtend(inst, incoming);
28877
- };
28878
- inst.merge = (other) => exports_util.merge(inst, other);
28879
- inst.pick = (mask) => exports_util.pick(inst, mask);
28880
- inst.omit = (mask) => exports_util.omit(inst, mask);
28881
- inst.partial = (...args) => exports_util.partial(ZodOptional, inst, args[0]);
28882
- inst.required = (...args) => exports_util.required(ZodNonOptional, inst, args[0]);
29612
+ _installLazyMethods(inst, "ZodObject", {
29613
+ keyof() {
29614
+ return _enum2(Object.keys(this._zod.def.shape));
29615
+ },
29616
+ catchall(catchall) {
29617
+ return this.clone({ ...this._zod.def, catchall });
29618
+ },
29619
+ passthrough() {
29620
+ return this.clone({ ...this._zod.def, catchall: unknown() });
29621
+ },
29622
+ loose() {
29623
+ return this.clone({ ...this._zod.def, catchall: unknown() });
29624
+ },
29625
+ strict() {
29626
+ return this.clone({ ...this._zod.def, catchall: never() });
29627
+ },
29628
+ strip() {
29629
+ return this.clone({ ...this._zod.def, catchall: undefined });
29630
+ },
29631
+ extend(incoming) {
29632
+ return exports_util.extend(this, incoming);
29633
+ },
29634
+ safeExtend(incoming) {
29635
+ return exports_util.safeExtend(this, incoming);
29636
+ },
29637
+ merge(other) {
29638
+ return exports_util.merge(this, other);
29639
+ },
29640
+ pick(mask) {
29641
+ return exports_util.pick(this, mask);
29642
+ },
29643
+ omit(mask) {
29644
+ return exports_util.omit(this, mask);
29645
+ },
29646
+ partial(...args) {
29647
+ return exports_util.partial(ZodOptional, this, args[0]);
29648
+ },
29649
+ required(...args) {
29650
+ return exports_util.required(ZodNonOptional, this, args[0]);
29651
+ }
29652
+ });
28883
29653
  });
28884
29654
  function object(shape, params) {
28885
29655
  const def = {
@@ -28984,6 +29754,14 @@ var ZodRecord = /* @__PURE__ */ $constructor("ZodRecord", (inst, def) => {
28984
29754
  inst.valueType = def.valueType;
28985
29755
  });
28986
29756
  function record(keyType, valueType, params) {
29757
+ if (!valueType || !valueType._zod) {
29758
+ return new ZodRecord({
29759
+ type: "record",
29760
+ keyType: string2(),
29761
+ valueType: keyType,
29762
+ ...exports_util.normalizeParams(valueType)
29763
+ });
29764
+ }
28987
29765
  return new ZodRecord({
28988
29766
  type: "record",
28989
29767
  keyType,
@@ -29155,10 +29933,12 @@ var ZodTransform = /* @__PURE__ */ $constructor("ZodTransform", (inst, def) => {
29155
29933
  if (output instanceof Promise) {
29156
29934
  return output.then((output2) => {
29157
29935
  payload.value = output2;
29936
+ payload.fallback = true;
29158
29937
  return payload;
29159
29938
  });
29160
29939
  }
29161
29940
  payload.value = output;
29941
+ payload.fallback = true;
29162
29942
  return payload;
29163
29943
  };
29164
29944
  });
@@ -29312,6 +30092,20 @@ function codec(in_, out, params) {
29312
30092
  reverseTransform: params.encode
29313
30093
  });
29314
30094
  }
30095
+ function invertCodec(codec2) {
30096
+ const def = codec2._zod.def;
30097
+ return new ZodCodec({
30098
+ type: "pipe",
30099
+ in: def.out,
30100
+ out: def.in,
30101
+ transform: def.reverseTransform,
30102
+ reverseTransform: def.transform
30103
+ });
30104
+ }
30105
+ var ZodPreprocess = /* @__PURE__ */ $constructor("ZodPreprocess", (inst, def) => {
30106
+ ZodPipe.init(inst, def);
30107
+ $ZodPreprocess.init(inst, def);
30108
+ });
29315
30109
  var ZodReadonly = /* @__PURE__ */ $constructor("ZodReadonly", (inst, def) => {
29316
30110
  $ZodReadonly.init(inst, def);
29317
30111
  ZodType.init(inst, def);
@@ -29390,8 +30184,8 @@ function custom(fn, _params) {
29390
30184
  function refine(fn, _params = {}) {
29391
30185
  return _refine(ZodCustom, fn, _params);
29392
30186
  }
29393
- function superRefine(fn) {
29394
- return _superRefine(fn);
30187
+ function superRefine(fn, params) {
30188
+ return _superRefine(fn, params);
29395
30189
  }
29396
30190
  var describe2 = describe;
29397
30191
  var meta2 = meta;
@@ -29429,9 +30223,13 @@ function json(params) {
29429
30223
  return jsonSchema;
29430
30224
  }
29431
30225
  function preprocess(fn, schema) {
29432
- return pipe(transform(fn), schema);
30226
+ return new ZodPreprocess({
30227
+ type: "pipe",
30228
+ in: transform(fn),
30229
+ out: schema
30230
+ });
29433
30231
  }
29434
- // ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/classic/compat.js
30232
+ // ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/classic/compat.js
29435
30233
  var ZodIssueCode = {
29436
30234
  invalid_type: "invalid_type",
29437
30235
  too_big: "too_big",
@@ -29455,13 +30253,13 @@ function getErrorMap() {
29455
30253
  }
29456
30254
  var ZodFirstPartyTypeKind;
29457
30255
  (function(ZodFirstPartyTypeKind2) {})(ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {}));
29458
- // ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/classic/from-json-schema.js
30256
+ // ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/classic/from-json-schema.js
29459
30257
  var z = {
29460
30258
  ...exports_schemas2,
29461
30259
  ...exports_checks2,
29462
30260
  iso: exports_iso
29463
30261
  };
29464
- var RECOGNIZED_KEYS = new Set([
30262
+ var RECOGNIZED_KEYS = /* @__PURE__ */ new Set([
29465
30263
  "$schema",
29466
30264
  "$ref",
29467
30265
  "$defs",
@@ -29835,12 +30633,6 @@ function convertBaseSchema(schema, ctx) {
29835
30633
  default:
29836
30634
  throw new Error(`Unsupported type: ${type}`);
29837
30635
  }
29838
- if (schema.description) {
29839
- zodSchema = zodSchema.describe(schema.description);
29840
- }
29841
- if (schema.default !== undefined) {
29842
- zodSchema = zodSchema.default(schema.default);
29843
- }
29844
30636
  return zodSchema;
29845
30637
  }
29846
30638
  function convertSchema(schema, ctx) {
@@ -29877,6 +30669,9 @@ function convertSchema(schema, ctx) {
29877
30669
  if (schema.readOnly === true) {
29878
30670
  baseSchema = z.readonly(baseSchema);
29879
30671
  }
30672
+ if (schema.default !== undefined) {
30673
+ baseSchema = baseSchema.default(schema.default);
30674
+ }
29880
30675
  const extraMeta = {};
29881
30676
  const coreMetadataKeys = ["$id", "id", "$comment", "$anchor", "$vocabulary", "$dynamicRef", "$dynamicAnchor"];
29882
30677
  for (const key of coreMetadataKeys) {
@@ -29898,25 +30693,34 @@ function convertSchema(schema, ctx) {
29898
30693
  if (Object.keys(extraMeta).length > 0) {
29899
30694
  ctx.registry.add(baseSchema, extraMeta);
29900
30695
  }
30696
+ if (schema.description) {
30697
+ baseSchema = baseSchema.describe(schema.description);
30698
+ }
29901
30699
  return baseSchema;
29902
30700
  }
29903
30701
  function fromJSONSchema(schema, params) {
29904
30702
  if (typeof schema === "boolean") {
29905
30703
  return schema ? z.any() : z.never();
29906
30704
  }
29907
- const version2 = detectVersion(schema, params?.defaultTarget);
29908
- const defs = schema.$defs || schema.definitions || {};
30705
+ let normalized;
30706
+ try {
30707
+ normalized = JSON.parse(JSON.stringify(schema));
30708
+ } catch {
30709
+ throw new Error("fromJSONSchema input is not valid JSON (possibly cyclic); use $defs/$ref for recursive schemas");
30710
+ }
30711
+ const version2 = detectVersion(normalized, params?.defaultTarget);
30712
+ const defs = normalized.$defs || normalized.definitions || {};
29909
30713
  const ctx = {
29910
30714
  version: version2,
29911
30715
  defs,
29912
30716
  refs: new Map,
29913
30717
  processing: new Set,
29914
- rootSchema: schema,
30718
+ rootSchema: normalized,
29915
30719
  registry: params?.registry ?? globalRegistry
29916
30720
  };
29917
- return convertSchema(schema, ctx);
30721
+ return convertSchema(normalized, ctx);
29918
30722
  }
29919
- // ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/classic/coerce.js
30723
+ // ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/classic/coerce.js
29920
30724
  var exports_coerce = {};
29921
30725
  __export(exports_coerce, {
29922
30726
  string: () => string3,
@@ -29941,7 +30745,7 @@ function date4(params) {
29941
30745
  return _coercedDate(ZodDate, params);
29942
30746
  }
29943
30747
 
29944
- // ../../node_modules/.bun/zod@4.3.6/node_modules/zod/v4/classic/external.js
30748
+ // ../../node_modules/.bun/zod@4.4.3/node_modules/zod/v4/classic/external.js
29945
30749
  config(en_default());
29946
30750
  // src/config.ts
29947
30751
  var FormatterEnum = exports_external.enum([
@@ -30044,6 +30848,11 @@ var InspectConfigSchema = exports_external.object({
30044
30848
  }).optional()
30045
30849
  }).optional()
30046
30850
  });
30851
+ var BackupConfigSchema = exports_external.object({
30852
+ enabled: exports_external.boolean().optional(),
30853
+ max_depth: exports_external.number().int().positive().optional(),
30854
+ max_file_size: exports_external.number().int().positive().optional()
30855
+ });
30047
30856
  var AftConfigSchema = exports_external.object({
30048
30857
  $schema: exports_external.string().optional(),
30049
30858
  format_on_edit: exports_external.boolean().optional(),
@@ -30061,6 +30870,7 @@ var AftConfigSchema = exports_external.object({
30061
30870
  callgraph_store: exports_external.boolean().optional(),
30062
30871
  callgraph_chunk_size: exports_external.number().optional(),
30063
30872
  inspect: InspectConfigSchema.optional(),
30873
+ backup: BackupConfigSchema.optional(),
30064
30874
  bash: BashConfigSchema.optional(),
30065
30875
  experimental: ExperimentalConfigSchema.optional(),
30066
30876
  lsp: LspConfigSchema.optional(),
@@ -30485,10 +31295,17 @@ function getStrippedTopLevelKeys(override) {
30485
31295
  stripped.push("auto_update");
30486
31296
  if (override.bridge !== undefined)
30487
31297
  stripped.push("bridge");
31298
+ if (override.backup !== undefined)
31299
+ stripped.push("backup");
31300
+ if (override.disabled_tools?.includes("aft_safety"))
31301
+ stripped.push("disabled_tools.aft_safety");
30488
31302
  return stripped;
30489
31303
  }
30490
31304
  function mergeConfigs(base, override) {
30491
- const disabledTools = [...base.disabled_tools ?? [], ...override.disabled_tools ?? []];
31305
+ const disabledTools = [
31306
+ ...base.disabled_tools ?? [],
31307
+ ...(override.disabled_tools ?? []).filter((tool) => tool !== "aft_safety")
31308
+ ];
30492
31309
  const formatter = { ...base.formatter, ...override.formatter };
30493
31310
  const checker = { ...base.checker, ...override.checker };
30494
31311
  const semantic = mergeSemanticConfig(base.semantic, override.semantic);
@@ -34277,8 +35094,8 @@ function ensureTuiPluginEntry() {
34277
35094
  `);
34278
35095
  log2(`[aft-plugin] added TUI plugin entry to ${configPath}`);
34279
35096
  return true;
34280
- } catch (error50) {
34281
- log2(`[aft-plugin] failed to update tui.json: ${error50 instanceof Error ? error50.message : String(error50)}`);
35097
+ } catch (error53) {
35098
+ log2(`[aft-plugin] failed to update tui.json: ${error53 instanceof Error ? error53.message : String(error53)}`);
34282
35099
  return false;
34283
35100
  }
34284
35101
  }
@@ -34593,9 +35410,9 @@ async function askEditPermission(context, patterns, metadata = {}) {
34593
35410
  metadata
34594
35411
  }));
34595
35412
  return;
34596
- } catch (error50) {
34597
- if (error50 instanceof Error && error50.message) {
34598
- return error50.message;
35413
+ } catch (error53) {
35414
+ if (error53 instanceof Error && error53.message) {
35415
+ return error53.message;
34599
35416
  }
34600
35417
  return "Permission denied.";
34601
35418
  }
@@ -34666,9 +35483,9 @@ async function assertExternalDirectoryPermission(ctx, context, target, options)
34666
35483
  }
34667
35484
  }));
34668
35485
  return;
34669
- } catch (error50) {
34670
- if (error50 instanceof Error && error50.message) {
34671
- return error50.message;
35486
+ } catch (error53) {
35487
+ if (error53 instanceof Error && error53.message) {
35488
+ return error53.message;
34672
35489
  }
34673
35490
  return "Permission denied (external directory).";
34674
35491
  }
@@ -34684,9 +35501,9 @@ async function askGrepPermission(context, pattern, metadata = {}) {
34684
35501
  metadata: { pattern, ...metadata }
34685
35502
  }));
34686
35503
  return;
34687
- } catch (error50) {
34688
- if (error50 instanceof Error && error50.message) {
34689
- return error50.message;
35504
+ } catch (error53) {
35505
+ if (error53 instanceof Error && error53.message) {
35506
+ return error53.message;
34690
35507
  }
34691
35508
  return "Permission denied (grep).";
34692
35509
  }
@@ -34702,9 +35519,9 @@ async function askGlobPermission(context, pattern, metadata = {}) {
34702
35519
  metadata: { pattern, ...metadata }
34703
35520
  }));
34704
35521
  return;
34705
- } catch (error50) {
34706
- if (error50 instanceof Error && error50.message) {
34707
- return error50.message;
35522
+ } catch (error53) {
35523
+ if (error53 instanceof Error && error53.message) {
35524
+ return error53.message;
34708
35525
  }
34709
35526
  return "Permission denied (glob).";
34710
35527
  }
@@ -36447,11 +37264,11 @@ function diagnosticsOnEditDefault(ctx) {
36447
37264
  async function readCurrentFileForPreview(filePath) {
36448
37265
  try {
36449
37266
  return await fs5.promises.readFile(filePath, "utf-8");
36450
- } catch (error50) {
36451
- if (error50 && typeof error50 === "object" && "code" in error50 && error50.code === "ENOENT") {
37267
+ } catch (error53) {
37268
+ if (error53 && typeof error53 === "object" && "code" in error53 && error53.code === "ENOENT") {
36452
37269
  return "";
36453
37270
  }
36454
- throw error50;
37271
+ throw error53;
36455
37272
  }
36456
37273
  }
36457
37274
  function previewDiffFromResponse(data, filePath) {
@@ -36477,8 +37294,8 @@ async function readPatchPreviewContent(virtualFiles, filePath, action, patchPath
36477
37294
  }
36478
37295
  try {
36479
37296
  return await fs5.promises.readFile(filePath, "utf-8");
36480
- } catch (error50) {
36481
- throw new Error(`Failed to ${action} ${patchPath}: ${formatError2(error50)}`);
37297
+ } catch (error53) {
37298
+ throw new Error(`Failed to ${action} ${patchPath}: ${formatError2(error53)}`);
36482
37299
  }
36483
37300
  }
36484
37301
  async function buildApplyPatchPreview(hunks, projectRoot) {
@@ -36514,8 +37331,8 @@ async function buildApplyPatchPreview(hunks, projectRoot) {
36514
37331
  let after;
36515
37332
  try {
36516
37333
  after = applyUpdateChunks(before, filePath, hunk.chunks);
36517
- } catch (error50) {
36518
- throw new Error(`Failed to update ${hunk.path}: ${formatError2(error50)}`);
37334
+ } catch (error53) {
37335
+ throw new Error(`Failed to update ${hunk.path}: ${formatError2(error53)}`);
36519
37336
  }
36520
37337
  const targetPath = hunk.move_path ? resolvePathFromProjectRoot(projectRoot, hunk.move_path) : filePath;
36521
37338
  patches.push(buildUnifiedDiff(targetPath, before, after));
@@ -36573,9 +37390,9 @@ function createReadTool(ctx) {
36573
37390
  always: ["*"],
36574
37391
  metadata: {}
36575
37392
  }));
36576
- } catch (error50) {
36577
- if (error50 instanceof Error && error50.message)
36578
- return permissionDeniedResponse(error50.message);
37393
+ } catch (error53) {
37394
+ if (error53 instanceof Error && error53.message)
37395
+ return permissionDeniedResponse(error53.message);
36579
37396
  return permissionDeniedResponse("Permission denied.");
36580
37397
  }
36581
37398
  const rawStartLine = coerceOptionalInt(args.startLine, "startLine", 1, Number.MAX_SAFE_INTEGER);
@@ -36647,12 +37464,13 @@ function createReadTool(ctx) {
36647
37464
  }
36648
37465
  };
36649
37466
  }
36650
- function getWriteDescription(editToolName) {
36651
- return `Write content to a file, creating it and parent directories automatically. Existing files are backed up before overwriting (undo via aft_safety) and auto-formatted when the project has a formatter configured. Use it to create files or replace whole contents; for partial edits, use the \`${editToolName}\` tool.`;
37467
+ function getWriteDescription(ctx, editToolName) {
37468
+ const backupText = ctx.config.backup?.enabled === false ? "Backup capture is disabled by user config." : "Existing files are backed up before overwriting (undo via aft_safety).";
37469
+ return `Write content to a file, creating it and parent directories automatically. ${backupText} Auto-formats when the project has a formatter configured. Use it to create files or replace whole contents; for partial edits, use the \`${editToolName}\` tool.`;
36652
37470
  }
36653
37471
  function createWriteTool(ctx, editToolName = "edit") {
36654
37472
  return {
36655
- description: getWriteDescription(editToolName),
37473
+ description: getWriteDescription(ctx, editToolName),
36656
37474
  args: {
36657
37475
  filePath: z8.string().describe("Path to the file to write (absolute or relative to project root)"),
36658
37476
  content: z8.string().describe("The full content to write to the file")
@@ -36743,7 +37561,8 @@ Note: LSP server(s) exited during this edit: ${exitedServers.join(", ")}. Their
36743
37561
  }
36744
37562
  };
36745
37563
  }
36746
- function getEditDescription(writeToolName) {
37564
+ function getEditDescription(ctx, writeToolName) {
37565
+ const backupBehavior = ctx.config.backup?.enabled === false ? "- Backup capture is disabled by user config" : "- Backs up files before editing (recoverable via aft_safety undo)";
36747
37566
  return `Edit a file by finding and replacing text, or by targeting named symbols. To write or overwrite a whole file, use the \`${writeToolName}\` tool — \`edit\` requires an explicit edit mode and will not silently overwrite a file from \`content\` alone.
36748
37567
 
36749
37568
  **Modes** (determined by which parameters you provide):
@@ -36783,7 +37602,7 @@ Mode priority: appendContent > edits > symbol (without oldString) > oldString (f
36783
37602
  Note: Modes 5 and 6 are options on mode 4 (find/replace) — they require \`oldString\`.
36784
37603
 
36785
37604
  **Behavior:**
36786
- - Backs up files before editing (recoverable via aft_safety undo)
37605
+ ${backupBehavior}
36787
37606
  - Auto-formats using project formatter if configured
36788
37607
  - Tree-sitter syntax validation on all edits
36789
37608
  - Symbol replace includes decorators, attributes, and doc comments in range
@@ -36791,7 +37610,7 @@ Note: Modes 5 and 6 are options on mode 4 (find/replace) — they require \`oldS
36791
37610
  }
36792
37611
  function createEditTool(ctx, writeToolName = "write") {
36793
37612
  return {
36794
- description: getEditDescription(writeToolName),
37613
+ description: getEditDescription(ctx, writeToolName),
36795
37614
  args: {
36796
37615
  filePath: z8.string().optional().describe("Path to the file to edit (absolute or relative to project root)"),
36797
37616
  oldString: z8.string().optional().describe("Text to find (exact match, with fuzzy fallback)"),
@@ -36952,7 +37771,9 @@ function formatGlobSkipReasonsNote(reasons) {
36952
37771
  return;
36953
37772
  return `Note: formatter skipped some glob edit result file(s): ${[...new Set(actionable)].sort().join(", ")}. See per-file format_skipped_reason values for details.`;
36954
37773
  }
36955
- var APPLY_PATCH_DESCRIPTION = `Use the \`apply_patch\` tool to edit files. Your patch language is a stripped‑down, file‑oriented diff format designed to be easy to parse and safe to apply. You can think of it as a high‑level envelope:
37774
+ function applyPatchDescription(ctx) {
37775
+ const backupBehavior = ctx.config.backup?.enabled === false ? "- Backup capture is disabled by user config; applied file changes are not recorded in the undo stack." : "- Per-file commit: each file's edits apply independently. If a later file fails, earlier successful changes are kept. A pre-patch checkpoint is created automatically — use `aft_safety` undo if you need to revert.\n- Files are backed up before modification";
37776
+ return `Use the \`apply_patch\` tool to edit files. Your patch language is a stripped‑down, file‑oriented diff format designed to be easy to parse and safe to apply. You can think of it as a high‑level envelope:
36956
37777
 
36957
37778
  *** Begin Patch
36958
37779
  [ one or more file sections ]
@@ -36984,8 +37805,7 @@ Example patch:
36984
37805
  \`\`\`
36985
37806
 
36986
37807
  **Behavior:**
36987
- - Per-file commit: each file's edits apply independently. If a later file fails, earlier successful changes are kept. A pre-patch checkpoint is created automatically — use \`aft_safety\` undo if you need to revert.
36988
- - Files are backed up before modification
37808
+ ${backupBehavior}
36989
37809
  - Parent directories are created automatically for new files
36990
37810
  - Fuzzy matching for context anchors (handles whitespace and Unicode differences)
36991
37811
 
@@ -36995,9 +37815,10 @@ Example patch:
36995
37815
  - You must prefix new lines with \`+\` even when creating a new file
36996
37816
 
36997
37817
  Edits return as soon as the write completes unless \`lsp.diagnostics_on_edit\` or a per-call \`diagnostics: true\` requests legacy sync-wait behavior. Call \`aft_inspect\` afterward to check diagnostics across a batch of edits.`;
37818
+ }
36998
37819
  function createApplyPatchTool(ctx) {
36999
37820
  return {
37000
- description: APPLY_PATCH_DESCRIPTION,
37821
+ description: applyPatchDescription(ctx),
37001
37822
  args: {
37002
37823
  patchText: z8.string().describe("The full patch text including Begin/End markers")
37003
37824
  },
@@ -37339,16 +38160,17 @@ ${fileList}`;
37339
38160
  }
37340
38161
  };
37341
38162
  }
37342
- var DELETE_DESCRIPTION = `Delete one or more files (or directories) with backup.
37343
-
37344
- ` + "Each file is backed up before deletion — use aft_safety undo to recover any of them. " + `For directories, every file inside is individually backed up before the tree is removed.
38163
+ function deleteDescription(ctx) {
38164
+ const backupText = ctx.config.backup?.enabled === false ? "Backup capture is disabled by user config, so this tool does not create undo snapshots. " : "Each file is backed up before deletion — use aft_safety undo to recover any of them. For directories, every file inside is individually backed up before the tree is removed. ";
38165
+ return `Delete one or more files (or directories).
37345
38166
 
37346
- ` + `Directory deletion requires recursive: true. Without it, passing a directory returns an error.
38167
+ ` + backupText + `Directory deletion requires recursive: true. Without it, passing a directory returns an error.
37347
38168
 
37348
38169
  ` + "Partial success is allowed: deletable files are deleted; failed ones are reported in `skipped_files` with `complete: false`.";
38170
+ }
37349
38171
  function createDeleteTool(ctx) {
37350
38172
  return {
37351
- description: DELETE_DESCRIPTION,
38173
+ description: deleteDescription(ctx),
37352
38174
  args: {
37353
38175
  files: z8.array(z8.string()).min(1).describe("Paths to delete (one or more). May include directories when recursive=true."),
37354
38176
  recursive: z8.boolean().optional().describe("Required to delete a directory and its contents. Defaults to false; passing a directory without this returns an error.")
@@ -37402,11 +38224,14 @@ function createDeleteTool(ctx) {
37402
38224
  }
37403
38225
  };
37404
38226
  }
37405
- var MOVE_DESCRIPTION = `Move or rename a file with backup. Creates parent directories for destination automatically
38227
+ function moveDescription(ctx) {
38228
+ const backupText = ctx.config.backup?.enabled === false ? "Backup capture is disabled by user config. " : "Creates an undo backup before moving. ";
38229
+ return `Move or rename a file. ${backupText}Creates parent directories for destination automatically
37406
38230
  ` + "Note: This moves/renames files at the OS level. To move a code symbol (function, class, type) between files while updating imports, use `aft_refactor` op='move' instead.";
38231
+ }
37407
38232
  function createMoveTool(ctx) {
37408
38233
  return {
37409
- description: MOVE_DESCRIPTION,
38234
+ description: moveDescription(ctx),
37410
38235
  args: {
37411
38236
  filePath: z8.string().describe("Source file path to move (absolute or relative to project root)"),
37412
38237
  destination: z8.string().describe("Destination file path (absolute or relative to project root)")
@@ -37465,8 +38290,8 @@ function hoistedTools(ctx) {
37465
38290
  }
37466
38291
  return tools;
37467
38292
  }
37468
- function formatError2(error50) {
37469
- return error50 instanceof Error ? error50.message : String(error50);
38293
+ function formatError2(error53) {
38294
+ return error53 instanceof Error ? error53.message : String(error53);
37470
38295
  }
37471
38296
  function aftPrefixedTools(ctx) {
37472
38297
  const aftEditTool = createEditTool(ctx, "aft_write");
@@ -37532,6 +38357,7 @@ function aftPrefixedTools(ctx) {
37532
38357
  import { tool as tool9 } from "@opencode-ai/plugin";
37533
38358
  var z9 = tool9.schema;
37534
38359
  function importTools(ctx) {
38360
+ const organizeRecovery = ctx.config.backup?.enabled === false ? "Backup capture is disabled by user config; review broad cleanup changes before proceeding." : "Use aft_safety checkpoint/undo for recovery before broad cleanup.";
37535
38361
  return {
37536
38362
  aft_import: {
37537
38363
  description: `Language-aware import management. Supports TS, JS, TSX, Python, Rust, Go, Solidity, Java, C#, PHP, Kotlin, Scala, Swift, Ruby, Lua, C, C++, Perl, and Vue.
@@ -37539,7 +38365,7 @@ function importTools(ctx) {
37539
38365
  ` + `Ops:
37540
38366
  ` + `- 'add': Add an import. Auto-detects group (stdlib/external/internal), deduplicates. Requires 'module'. Optional 'names', 'defaultImport', 'typeOnly'.
37541
38367
  ` + `- 'remove': Remove an import or a specific named import. Requires 'module'. Provide 'removeName' to remove a single named import; omit to remove the entire import.
37542
- ` + "- 'organize': Re-sort and re-group all imports by language convention, deduplicate. Requires only 'filePath'. Use aft_safety checkpoint/undo for recovery before broad cleanup.",
38368
+ ` + `- 'organize': Re-sort and re-group all imports by language convention, deduplicate. Requires only 'filePath'. ${organizeRecovery}`,
37543
38369
  args: {
37544
38370
  op: z9.enum(["add", "remove", "organize"]).describe("Import operation"),
37545
38371
  filePath: z9.string().describe("Path to the file (absolute or relative to project root)"),
@@ -37800,7 +38626,7 @@ function navigationTools(ctx) {
37800
38626
  aft_callgraph: {
37801
38627
  description: `Answer code-relationship questions from a real call graph — instead of grep + read chains. Reach for this whenever the question is about how symbols connect: who calls X, what X calls, what breaks if X changes, how execution reaches X, or how a value flows.
37802
38628
 
37803
- ` + `Ops:
38629
+ ` + "Use aft_zoom with `callgraph:true` for one-level forward calls-out while reading source. Use aft_callgraph only for reverse callers or multi-level traces so you do not double-fetch the same relationships.\n\n" + `Ops:
37804
38630
  ` + `- 'callers': Find all call sites of a symbol. Use before renaming or changing a function's signature.
37805
38631
  ` + `- 'impact': What breaks if a symbol changes — affected callers with signatures and entry-point status (blast radius). Use before a risky edit.
37806
38632
  ` + `- 'call_tree': What a function calls (forward traversal). Use to understand a function's dependencies before modifying it.
@@ -37810,7 +38636,7 @@ function navigationTools(ctx) {
37810
38636
 
37811
38637
  ` + `All ops require both 'filePath' and 'symbol'. 'expression' is additionally required for trace_data; 'toSymbol' for trace_to_symbol.
37812
38638
 
37813
- ` + `Markers: ~ = edge resolved by name only (may point at the wrong same-named symbol); [unresolved] = callee not resolved to a definition, so the location shown is the call site. Unmarked edges are resolved exactly.
38639
+ ` + `Markers: ~ = edge resolved by name only (may point at the wrong same-named symbol); [unresolved] = callee not resolved to a definition, so the location shown is the call site. Unmarked edges are resolved exactly. By default, unresolved external/stdlib leaf calls in call_tree are collapsed into one summary per parent; pass includeUnresolved=true to show every unresolved edge individually.
37814
38640
  `,
37815
38641
  args: {
37816
38642
  op: z11.enum(["call_tree", "callers", "trace_to", "trace_to_symbol", "impact", "trace_data"]).describe("Navigation operation"),
@@ -37819,7 +38645,9 @@ function navigationTools(ctx) {
37819
38645
  depth: optionalInt(1, Number.MAX_SAFE_INTEGER).describe("Max traversal depth (default: call_tree=5, callers=1, trace_to=10, trace_to_symbol=10 capped at 16, impact=5, trace_data=5)"),
37820
38646
  expression: z11.string().optional().describe("Expression to track through data flow (required for trace_data op)"),
37821
38647
  toSymbol: z11.string().optional().describe("Target symbol name for trace_to_symbol; the returned path ends at this symbol"),
37822
- toFile: z11.string().optional().describe("Optional target file for trace_to_symbol; required when toSymbol exists in multiple files")
38648
+ toFile: z11.string().optional().describe("Optional target file for trace_to_symbol; required when toSymbol exists in multiple files"),
38649
+ includeTests: z11.boolean().optional().describe("Include test files in callers/paths. Defaults to false; tests are hidden."),
38650
+ includeUnresolved: z11.boolean().optional().describe("Show every unresolved external/stdlib call individually. Defaults to false; unresolved leaf calls are collapsed into one summary per parent.")
37823
38651
  },
37824
38652
  execute: async (args, context) => {
37825
38653
  if (isEmptyParam(args.filePath)) {
@@ -37858,6 +38686,8 @@ function navigationTools(ctx) {
37858
38686
  params.toSymbol = args.toSymbol;
37859
38687
  if (toFile !== undefined)
37860
38688
  params.toFile = toFile;
38689
+ if (!isEmptyParam(args.includeTests))
38690
+ params.include_tests = coerceBoolean(args.includeTests);
37861
38691
  const response = await callBridge(ctx, context, args.op, params);
37862
38692
  if (response.success === false) {
37863
38693
  const message = formatBridgeErrorMessage(args.op, response, params);
@@ -37867,7 +38697,9 @@ function navigationTools(ctx) {
37867
38697
  }
37868
38698
  throw new Error(message);
37869
38699
  }
37870
- return formatCallgraphSections(args.op, response).join(`
38700
+ return formatCallgraphSections(args.op, response, undefined, {
38701
+ includeUnresolved: coerceBoolean(args.includeUnresolved)
38702
+ }).join(`
37871
38703
  `);
37872
38704
  }
37873
38705
  }
@@ -37900,17 +38732,20 @@ function buildZoomTitle(args) {
37900
38732
  function readingTools(ctx) {
37901
38733
  return {
37902
38734
  aft_outline: {
37903
- description: "Structural outline of source code, documentation files, or remote URLs. For code, returns symbols (functions, classes, types) with line ranges. For Markdown and HTML, returns heading hierarchy. Use this to explore structure before reading specific sections with aft_zoom. Set `files: true` with a directory target for a flat indexed file tree with language, symbol count, and byte metadata.\n\n" + "Pass a single `target`:\n" + ` • file path → outline that file (with signatures)
38735
+ description: "Structural outline of source code, documentation files, or remote URLs. For code, returns symbols (functions, classes, types) with line ranges. For Markdown and HTML, returns heading hierarchy. Use this to explore structure before reading specific sections with aft_zoom. Set `files: true` with a directory target for a flat indexed file tree with language, symbol count, and byte metadata.\n\n" + "For understanding a specific feature, prefer aft_search + aft_zoom on named symbols; use aft_outline on a whole directory only for high-level structure mapping. aft_zoom with `callgraph:true` gives one-level forward calls-out; use aft_callgraph only for reverse callers or multi-level traces.\n\n" + "Pass a single `target`:\n" + ` • file path → outline that file (with signatures)
37904
38736
  ` + ` • directory path → outline all source files under it (recursively, up to 200 files)
37905
38737
  ` + ` • URL (http:// or https://) → fetch and outline a remote HTML/Markdown document
37906
38738
  ` + " • array of paths → outline multiple files in one call; with files:true, every path must be a directory",
37907
38739
  args: {
37908
38740
  target: z12.union([z12.string(), z12.array(z12.string())]).describe("What to outline: a file path, directory path, URL, or array of paths. The mode is auto-detected: URLs by `http://`/`https://` prefix, directories by stat, arrays as multi-file."),
37909
- files: z12.boolean().optional().describe("Directory-only mode: when true, target must be a directory or array of directories and the result is a flat file tree with path, language, symbol count, and byte size instead of a symbol outline.")
38741
+ files: z12.boolean().optional().describe("Directory-only mode: when true, target must be a directory or array of directories and the result is a flat file tree with path, language, symbol count, and byte size instead of a symbol outline."),
38742
+ includeTests: z12.boolean().optional().describe("Directory outline only: include test files. Defaults to false; tests are hidden.")
37910
38743
  },
37911
38744
  execute: async (args, context) => {
37912
38745
  const target = coerceTargetParam(args.target);
37913
38746
  const filesMode = coerceBoolean(args.files);
38747
+ const hasIncludeTests = !isEmptyParam(args.includeTests);
38748
+ const includeTests = coerceBoolean(args.includeTests);
37914
38749
  const hasUrl = typeof target === "string" && (target.startsWith("http://") || target.startsWith("https://"));
37915
38750
  const isArray = Array.isArray(target) && target.length > 0;
37916
38751
  if (filesMode) {
@@ -37985,7 +38820,10 @@ function readingTools(ctx) {
37985
38820
  if (permissionDenied)
37986
38821
  return permissionDeniedResponse(permissionDenied);
37987
38822
  if (isDirectory) {
37988
- const response2 = await callBridge(ctx, context, "outline", { directory: resolvedTarget });
38823
+ const response2 = await callBridge(ctx, context, "outline", {
38824
+ directory: resolvedTarget,
38825
+ ...hasIncludeTests ? { includeTests } : {}
38826
+ });
37989
38827
  if (response2.success === false) {
37990
38828
  throw new Error(response2.message || "outline failed");
37991
38829
  }
@@ -38820,7 +39658,7 @@ function arg3(schema) {
38820
39658
  function semanticTools(ctx) {
38821
39659
  const searchTool = {
38822
39660
  description: [
38823
- "Search code with one tool: concepts, identifiers, error strings, regex, literals, and filenames are auto-routed to the right engine and returned ranked. Use it for any code search including when you only know what the code does, not what it's named ('where is rate limiting handled', 'retry logic', '^export', 'Cargo.lock').",
39661
+ "Search code with one tool: concepts, identifiers, error strings, regex, literals, and filenames are auto-routed to the right engine and returned ranked. For conceptual 'how does X work' queries, phrase a full natural-language sentence the semantic lane is NL-aware and matches intent against docstrings and comments ('how does the ORM build and execute a query', 'where is rate limiting handled'), not just keywords. Exact names, strings, and regex stay terse ('^export', 'Cargo.lock').",
38824
39662
  "",
38825
39663
  "Set hint to 'regex', 'literal', or 'semantic' to force a lane."
38826
39664
  ].join(`
@@ -38983,11 +39821,11 @@ var PLUGIN_VERSION = (() => {
38983
39821
  return "0.0.0";
38984
39822
  }
38985
39823
  })();
38986
- var ANNOUNCEMENT_VERSION = "0.41.0";
39824
+ var ANNOUNCEMENT_VERSION = "0.42.0";
38987
39825
  var ANNOUNCEMENT_FEATURES = [
38988
- "Search now works on repositories of any size: the trigram index behind grep and aft_search is disk-backed, so it uses a fixed, small amount of memory (Chromium dropped from ~14 GB to under 800 MB) and the old 20,000-file limit that disabled it on large repos is gone.",
38989
- "Call-graph navigation (aft_callgraph, symbol move) no longer has a 5,000-file limit it works on repositories of any size.",
38990
- "Semantic search (aft_search) now covers Java, Kotlin, Ruby, Swift, Scala, Lua, Perl, and R, in addition to the languages already supported."
39826
+ "Navigation and search tools now return leaner output: aft_zoom on a large class/struct returns a member menu instead of the whole body, aft_callgraph collapses standard-library noise, and aft_search expands only the top match within a budget substantially less context per call, same answers.",
39827
+ "Backups behind aft_safety undo are now configurable (backup.enabled, max_depth, max_file_size), and edits are faster (one appended snapshot instead of rewriting the whole stack).",
39828
+ "Editing Rust code with &raw and files whose paths contain [brackets] or {braces} (e.g. Next.js dynamic routes) no longer fails."
38991
39829
  ];
38992
39830
  var ANNOUNCEMENT_FOOTER = "Join us on Discord: https://discord.gg/DSa65w8wuf";
38993
39831
  var plugin = async (input) => initializePluginForDirectory(input);
@@ -39313,7 +40151,7 @@ Install: ${getManualInstallHint()}`).catch(() => {});
39313
40151
  const allTools = normalizeToolMap({
39314
40152
  ...surface !== "minimal" && (aftConfig.hoist_builtin_tools !== false ? hoistedTools(ctx) : aftPrefixedTools(ctx)),
39315
40153
  ...readingTools(ctx),
39316
- ...safetyTools(ctx),
40154
+ ...aftConfig.backup?.enabled === false ? {} : safetyTools(ctx),
39317
40155
  ...surface !== "minimal" && importTools(ctx),
39318
40156
  ...navigationTools(ctx),
39319
40157
  ...surface !== "minimal" && astTools(ctx),