@polka-codes/cli 0.9.66 → 0.9.68

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +365 -223
  2. package/package.json +13 -13
package/dist/index.js CHANGED
@@ -35579,7 +35579,7 @@ var {
35579
35579
  Help
35580
35580
  } = import__.default;
35581
35581
  // package.json
35582
- var version = "0.9.66";
35582
+ var version = "0.9.68";
35583
35583
 
35584
35584
  // src/commands/code.ts
35585
35585
  import { readFile as readFile4 } from "node:fs/promises";
@@ -67435,6 +67435,7 @@ Tool error:`, event.tool));
67435
67435
  if (verbose > 0) {
67436
67436
  logToolCallStats(stream, taskToolCallStats, "Task Tool Call Stats");
67437
67437
  }
67438
+ taskToolCallStats.clear();
67438
67439
  break;
67439
67440
  }
67440
67441
  };
@@ -73046,6 +73047,7 @@ __export(exports_external2, {
73046
73047
  string: () => string5,
73047
73048
  strictObject: () => strictObject2,
73048
73049
  startsWith: () => _startsWith2,
73050
+ slugify: () => _slugify,
73049
73051
  size: () => _size2,
73050
73052
  setErrorMap: () => setErrorMap2,
73051
73053
  set: () => set3,
@@ -73091,9 +73093,11 @@ __export(exports_external2, {
73091
73093
  minSize: () => _minSize2,
73092
73094
  minLength: () => _minLength2,
73093
73095
  mime: () => _mime2,
73096
+ meta: () => meta2,
73094
73097
  maxSize: () => _maxSize2,
73095
73098
  maxLength: () => _maxLength2,
73096
73099
  map: () => map2,
73100
+ mac: () => mac2,
73097
73101
  lte: () => _lte2,
73098
73102
  lt: () => _lt2,
73099
73103
  lowercase: () => _lowercase2,
@@ -73138,6 +73142,7 @@ __export(exports_external2, {
73138
73142
  email: () => email4,
73139
73143
  e164: () => e1644,
73140
73144
  discriminatedUnion: () => discriminatedUnion2,
73145
+ describe: () => describe2,
73141
73146
  decodeAsync: () => decodeAsync4,
73142
73147
  decode: () => decode4,
73143
73148
  date: () => date7,
@@ -73196,6 +73201,7 @@ __export(exports_external2, {
73196
73201
  ZodNanoID: () => ZodNanoID2,
73197
73202
  ZodNaN: () => ZodNaN3,
73198
73203
  ZodMap: () => ZodMap3,
73204
+ ZodMAC: () => ZodMAC,
73199
73205
  ZodLiteral: () => ZodLiteral3,
73200
73206
  ZodLazy: () => ZodLazy3,
73201
73207
  ZodKSUID: () => ZodKSUID2,
@@ -73261,6 +73267,7 @@ __export(exports_core4, {
73261
73267
  prettifyError: () => prettifyError2,
73262
73268
  parseAsync: () => parseAsync3,
73263
73269
  parse: () => parse5,
73270
+ meta: () => meta,
73264
73271
  locales: () => exports_locales2,
73265
73272
  isValidJWT: () => isValidJWT3,
73266
73273
  isValidBase64URL: () => isValidBase64URL2,
@@ -73271,6 +73278,7 @@ __export(exports_core4, {
73271
73278
  flattenError: () => flattenError2,
73272
73279
  encodeAsync: () => encodeAsync3,
73273
73280
  encode: () => encode3,
73281
+ describe: () => describe,
73274
73282
  decodeAsync: () => decodeAsync3,
73275
73283
  decode: () => decode3,
73276
73284
  config: () => config4,
@@ -73302,6 +73310,7 @@ __export(exports_core4, {
73302
73310
  _stringFormat: () => _stringFormat2,
73303
73311
  _string: () => _string2,
73304
73312
  _startsWith: () => _startsWith2,
73313
+ _slugify: () => _slugify,
73305
73314
  _size: () => _size2,
73306
73315
  _set: () => _set2,
73307
73316
  _safeParseAsync: () => _safeParseAsync2,
@@ -73343,6 +73352,7 @@ __export(exports_core4, {
73343
73352
  _maxLength: () => _maxLength2,
73344
73353
  _max: () => _lte2,
73345
73354
  _map: () => _map2,
73355
+ _mac: () => _mac,
73346
73356
  _lte: () => _lte2,
73347
73357
  _lt: () => _lt2,
73348
73358
  _lowercase: () => _lowercase2,
@@ -73443,6 +73453,7 @@ __export(exports_core4, {
73443
73453
  $ZodNanoID: () => $ZodNanoID2,
73444
73454
  $ZodNaN: () => $ZodNaN2,
73445
73455
  $ZodMap: () => $ZodMap2,
73456
+ $ZodMAC: () => $ZodMAC,
73446
73457
  $ZodLiteral: () => $ZodLiteral2,
73447
73458
  $ZodLazy: () => $ZodLazy2,
73448
73459
  $ZodKSUID: () => $ZodKSUID2,
@@ -73512,20 +73523,29 @@ var NEVER2 = Object.freeze({
73512
73523
  });
73513
73524
  function $constructor2(name18, initializer3, params) {
73514
73525
  function init(inst, def) {
73515
- var _a16;
73516
- Object.defineProperty(inst, "_zod", {
73517
- value: inst._zod ?? {},
73518
- enumerable: false
73519
- });
73520
- (_a16 = inst._zod).traits ?? (_a16.traits = new Set);
73526
+ if (!inst._zod) {
73527
+ Object.defineProperty(inst, "_zod", {
73528
+ value: {
73529
+ def,
73530
+ constr: _,
73531
+ traits: new Set
73532
+ },
73533
+ enumerable: false
73534
+ });
73535
+ }
73536
+ if (inst._zod.traits.has(name18)) {
73537
+ return;
73538
+ }
73521
73539
  inst._zod.traits.add(name18);
73522
73540
  initializer3(inst, def);
73523
- for (const k in _.prototype) {
73524
- if (!(k in inst))
73525
- Object.defineProperty(inst, k, { value: _.prototype[k].bind(inst) });
73541
+ const proto2 = _.prototype;
73542
+ const keys = Object.keys(proto2);
73543
+ for (let i = 0;i < keys.length; i++) {
73544
+ const k = keys[i];
73545
+ if (!(k in inst)) {
73546
+ inst[k] = proto2[k].bind(inst);
73547
+ }
73526
73548
  }
73527
- inst._zod.constr = _;
73528
- inst._zod.def = def;
73529
73549
  }
73530
73550
  const Parent = params?.Parent ?? Object;
73531
73551
 
@@ -73581,6 +73601,7 @@ __export(exports_util2, {
73581
73601
  uint8ArrayToBase64url: () => uint8ArrayToBase64url2,
73582
73602
  uint8ArrayToBase64: () => uint8ArrayToBase642,
73583
73603
  stringifyPrimitive: () => stringifyPrimitive2,
73604
+ slugify: () => slugify,
73584
73605
  shallowClone: () => shallowClone2,
73585
73606
  safeExtend: () => safeExtend2,
73586
73607
  required: () => required2,
@@ -73768,6 +73789,9 @@ function randomString2(length = 10) {
73768
73789
  function esc2(str) {
73769
73790
  return JSON.stringify(str);
73770
73791
  }
73792
+ function slugify(input) {
73793
+ return input.toLowerCase().trim().replace(/[^\w\s-]/g, "").replace(/[\s_-]+/g, "-").replace(/^-+|-+$/g, "");
73794
+ }
73771
73795
  var captureStackTrace2 = "captureStackTrace" in Error ? Error.captureStackTrace : (..._args) => {};
73772
73796
  function isObject3(data) {
73773
73797
  return typeof data === "object" && data !== null && !Array.isArray(data);
@@ -73790,6 +73814,8 @@ function isPlainObject4(o) {
73790
73814
  const ctor = o.constructor;
73791
73815
  if (ctor === undefined)
73792
73816
  return true;
73817
+ if (typeof ctor !== "function")
73818
+ return true;
73793
73819
  const prot = ctor.prototype;
73794
73820
  if (isObject3(prot) === false)
73795
73821
  return false;
@@ -74459,6 +74485,7 @@ __export(exports_regexes2, {
74459
74485
  md5_hex: () => md5_hex2,
74460
74486
  md5_base64url: () => md5_base64url2,
74461
74487
  md5_base64: () => md5_base642,
74488
+ mac: () => mac,
74462
74489
  lowercase: () => lowercase2,
74463
74490
  ksuid: () => ksuid3,
74464
74491
  ipv6: () => ipv63,
@@ -74516,6 +74543,10 @@ function emoji3() {
74516
74543
  }
74517
74544
  var ipv43 = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/;
74518
74545
  var ipv63 = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/;
74546
+ var mac = (delimiter) => {
74547
+ const escapedDelim = escapeRegex2(delimiter ?? ":");
74548
+ return new RegExp(`^(?:[0-9A-F]{2}${escapedDelim}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${escapedDelim}){5}[0-9a-f]{2}$`);
74549
+ };
74519
74550
  var cidrv43 = /^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/;
74520
74551
  var cidrv63 = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/;
74521
74552
  var base643 = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/;
@@ -75161,7 +75192,7 @@ class Doc2 {
75161
75192
  var version3 = {
75162
75193
  major: 4,
75163
75194
  minor: 1,
75164
- patch: 12
75195
+ patch: 13
75165
75196
  };
75166
75197
 
75167
75198
  // ../../node_modules/zod/v4/core/schemas.js
@@ -75338,7 +75369,7 @@ var $ZodURL2 = /* @__PURE__ */ $constructor2("$ZodURL", (inst, def) => {
75338
75369
  code: "invalid_format",
75339
75370
  format: "url",
75340
75371
  note: "Invalid hostname",
75341
- pattern: hostname3.source,
75372
+ pattern: def.hostname.source,
75342
75373
  input: payload.value,
75343
75374
  inst,
75344
75375
  continue: !def.abort
@@ -75423,18 +75454,12 @@ var $ZodISODuration2 = /* @__PURE__ */ $constructor2("$ZodISODuration", (inst, d
75423
75454
  var $ZodIPv42 = /* @__PURE__ */ $constructor2("$ZodIPv4", (inst, def) => {
75424
75455
  def.pattern ?? (def.pattern = ipv43);
75425
75456
  $ZodStringFormat2.init(inst, def);
75426
- inst._zod.onattach.push((inst2) => {
75427
- const bag = inst2._zod.bag;
75428
- bag.format = `ipv4`;
75429
- });
75457
+ inst._zod.bag.format = `ipv4`;
75430
75458
  });
75431
75459
  var $ZodIPv62 = /* @__PURE__ */ $constructor2("$ZodIPv6", (inst, def) => {
75432
75460
  def.pattern ?? (def.pattern = ipv63);
75433
75461
  $ZodStringFormat2.init(inst, def);
75434
- inst._zod.onattach.push((inst2) => {
75435
- const bag = inst2._zod.bag;
75436
- bag.format = `ipv6`;
75437
- });
75462
+ inst._zod.bag.format = `ipv6`;
75438
75463
  inst._zod.check = (payload) => {
75439
75464
  try {
75440
75465
  new URL(`http://[${payload.value}]`);
@@ -75449,6 +75474,11 @@ var $ZodIPv62 = /* @__PURE__ */ $constructor2("$ZodIPv6", (inst, def) => {
75449
75474
  }
75450
75475
  };
75451
75476
  });
75477
+ var $ZodMAC = /* @__PURE__ */ $constructor2("$ZodMAC", (inst, def) => {
75478
+ def.pattern ?? (def.pattern = mac(def.delimiter));
75479
+ $ZodStringFormat2.init(inst, def);
75480
+ inst._zod.bag.format = `mac`;
75481
+ });
75452
75482
  var $ZodCIDRv42 = /* @__PURE__ */ $constructor2("$ZodCIDRv4", (inst, def) => {
75453
75483
  def.pattern ?? (def.pattern = cidrv43);
75454
75484
  $ZodStringFormat2.init(inst, def);
@@ -75496,9 +75526,7 @@ function isValidBase642(data) {
75496
75526
  var $ZodBase642 = /* @__PURE__ */ $constructor2("$ZodBase64", (inst, def) => {
75497
75527
  def.pattern ?? (def.pattern = base643);
75498
75528
  $ZodStringFormat2.init(inst, def);
75499
- inst._zod.onattach.push((inst2) => {
75500
- inst2._zod.bag.contentEncoding = "base64";
75501
- });
75529
+ inst._zod.bag.contentEncoding = "base64";
75502
75530
  inst._zod.check = (payload) => {
75503
75531
  if (isValidBase642(payload.value))
75504
75532
  return;
@@ -75521,9 +75549,7 @@ function isValidBase64URL2(data) {
75521
75549
  var $ZodBase64URL2 = /* @__PURE__ */ $constructor2("$ZodBase64URL", (inst, def) => {
75522
75550
  def.pattern ?? (def.pattern = base64url3);
75523
75551
  $ZodStringFormat2.init(inst, def);
75524
- inst._zod.onattach.push((inst2) => {
75525
- inst2._zod.bag.contentEncoding = "base64url";
75526
- });
75552
+ inst._zod.bag.contentEncoding = "base64url";
75527
75553
  inst._zod.check = (payload) => {
75528
75554
  if (isValidBase64URL2(payload.value))
75529
75555
  return;
@@ -75611,7 +75637,7 @@ var $ZodNumber2 = /* @__PURE__ */ $constructor2("$ZodNumber", (inst, def) => {
75611
75637
  return payload;
75612
75638
  };
75613
75639
  });
75614
- var $ZodNumberFormat2 = /* @__PURE__ */ $constructor2("$ZodNumber", (inst, def) => {
75640
+ var $ZodNumberFormat2 = /* @__PURE__ */ $constructor2("$ZodNumberFormat", (inst, def) => {
75615
75641
  $ZodCheckNumberFormat2.init(inst, def);
75616
75642
  $ZodNumber2.init(inst, def);
75617
75643
  });
@@ -75654,7 +75680,7 @@ var $ZodBigInt2 = /* @__PURE__ */ $constructor2("$ZodBigInt", (inst, def) => {
75654
75680
  return payload;
75655
75681
  };
75656
75682
  });
75657
- var $ZodBigIntFormat2 = /* @__PURE__ */ $constructor2("$ZodBigInt", (inst, def) => {
75683
+ var $ZodBigIntFormat2 = /* @__PURE__ */ $constructor2("$ZodBigIntFormat", (inst, def) => {
75658
75684
  $ZodCheckBigIntFormat2.init(inst, def);
75659
75685
  $ZodBigInt2.init(inst, def);
75660
75686
  });
@@ -75839,7 +75865,7 @@ function handleCatchall2(proms, input, payload, ctx, def, inst) {
75839
75865
  const keySet = def.keySet;
75840
75866
  const _catchall = def.catchall._zod;
75841
75867
  const t = _catchall.def.type;
75842
- for (const key of Object.keys(input)) {
75868
+ for (const key in input) {
75843
75869
  if (keySet.has(key))
75844
75870
  continue;
75845
75871
  if (t === "never") {
@@ -76214,7 +76240,6 @@ function handleIntersectionResults2(result, left, right) {
76214
76240
  var $ZodTuple2 = /* @__PURE__ */ $constructor2("$ZodTuple", (inst, def) => {
76215
76241
  $ZodType2.init(inst, def);
76216
76242
  const items = def.items;
76217
- const optStart = items.length - [...items].reverse().findIndex((item) => item._zod.optin !== "optional");
76218
76243
  inst._zod.parse = (payload, ctx) => {
76219
76244
  const input = payload.value;
76220
76245
  if (!Array.isArray(input)) {
@@ -76228,6 +76253,8 @@ var $ZodTuple2 = /* @__PURE__ */ $constructor2("$ZodTuple", (inst, def) => {
76228
76253
  }
76229
76254
  payload.value = [];
76230
76255
  const proms = [];
76256
+ const reversedIndex = [...items].reverse().findIndex((item) => item._zod.optin !== "optional");
76257
+ const optStart = reversedIndex === -1 ? 0 : items.length - reversedIndex;
76231
76258
  if (!def.rest) {
76232
76259
  const tooBig = input.length > items.length;
76233
76260
  const tooSmall = input.length < optStart - 1;
@@ -76298,11 +76325,13 @@ var $ZodRecord2 = /* @__PURE__ */ $constructor2("$ZodRecord", (inst, def) => {
76298
76325
  return payload;
76299
76326
  }
76300
76327
  const proms = [];
76301
- if (def.keyType._zod.values) {
76302
- const values = def.keyType._zod.values;
76328
+ const values = def.keyType._zod.values;
76329
+ if (values) {
76303
76330
  payload.value = {};
76331
+ const recordKeys = new Set;
76304
76332
  for (const key of values) {
76305
76333
  if (typeof key === "string" || typeof key === "number" || typeof key === "symbol") {
76334
+ recordKeys.add(typeof key === "number" ? key.toString() : key);
76306
76335
  const result = def.valueType._zod.run({ value: input[key], issues: [] }, ctx);
76307
76336
  if (result instanceof Promise) {
76308
76337
  proms.push(result.then((result2) => {
@@ -76321,7 +76350,7 @@ var $ZodRecord2 = /* @__PURE__ */ $constructor2("$ZodRecord", (inst, def) => {
76321
76350
  }
76322
76351
  let unrecognized;
76323
76352
  for (const key in input) {
76324
- if (!values.has(key)) {
76353
+ if (!recordKeys.has(key)) {
76325
76354
  unrecognized = unrecognized ?? [];
76326
76355
  unrecognized.push(key);
76327
76356
  }
@@ -76496,11 +76525,12 @@ var $ZodLiteral2 = /* @__PURE__ */ $constructor2("$ZodLiteral", (inst, def) => {
76496
76525
  if (def.values.length === 0) {
76497
76526
  throw new Error("Cannot create literal schema with no valid values");
76498
76527
  }
76499
- inst._zod.values = new Set(def.values);
76528
+ const values = new Set(def.values);
76529
+ inst._zod.values = values;
76500
76530
  inst._zod.pattern = new RegExp(`^(${def.values.map((o) => typeof o === "string" ? escapeRegex2(o) : o ? escapeRegex2(o.toString()) : String(o)).join("|")})$`);
76501
76531
  inst._zod.parse = (payload, _ctx) => {
76502
76532
  const input = payload.value;
76503
- if (inst._zod.values.has(input)) {
76533
+ if (values.has(input)) {
76504
76534
  return payload;
76505
76535
  }
76506
76536
  payload.issues.push({
@@ -76813,8 +76843,8 @@ var $ZodReadonly2 = /* @__PURE__ */ $constructor2("$ZodReadonly", (inst, def) =>
76813
76843
  $ZodType2.init(inst, def);
76814
76844
  defineLazy2(inst._zod, "propValues", () => def.innerType._zod.propValues);
76815
76845
  defineLazy2(inst._zod, "values", () => def.innerType._zod.values);
76816
- defineLazy2(inst._zod, "optin", () => def.innerType._zod.optin);
76817
- defineLazy2(inst._zod, "optout", () => def.innerType._zod.optout);
76846
+ defineLazy2(inst._zod, "optin", () => def.innerType?._zod?.optin);
76847
+ defineLazy2(inst._zod, "optout", () => def.innerType?._zod?.optout);
76818
76848
  inst._zod.parse = (payload, ctx) => {
76819
76849
  if (ctx.direction === "backward") {
76820
76850
  return def.innerType._zod.run(payload, ctx);
@@ -76961,10 +76991,10 @@ var $ZodPromise2 = /* @__PURE__ */ $constructor2("$ZodPromise", (inst, def) => {
76961
76991
  var $ZodLazy2 = /* @__PURE__ */ $constructor2("$ZodLazy", (inst, def) => {
76962
76992
  $ZodType2.init(inst, def);
76963
76993
  defineLazy2(inst._zod, "innerType", () => def.getter());
76964
- defineLazy2(inst._zod, "pattern", () => inst._zod.innerType._zod.pattern);
76965
- defineLazy2(inst._zod, "propValues", () => inst._zod.innerType._zod.propValues);
76966
- defineLazy2(inst._zod, "optin", () => inst._zod.innerType._zod.optin ?? undefined);
76967
- defineLazy2(inst._zod, "optout", () => inst._zod.innerType._zod.optout ?? undefined);
76994
+ defineLazy2(inst._zod, "pattern", () => inst._zod.innerType?._zod?.pattern);
76995
+ defineLazy2(inst._zod, "propValues", () => inst._zod.innerType?._zod?.propValues);
76996
+ defineLazy2(inst._zod, "optin", () => inst._zod.innerType?._zod?.optin ?? undefined);
76997
+ defineLazy2(inst._zod, "optout", () => inst._zod.innerType?._zod?.optout ?? undefined);
76968
76998
  inst._zod.parse = (payload, ctx) => {
76969
76999
  const inner = inst._zod.innerType;
76970
77000
  return inner._zod.run(payload, ctx);
@@ -78126,6 +78156,7 @@ var error54 = () => {
78126
78156
  duration: "ISO duration",
78127
78157
  ipv4: "IPv4 address",
78128
78158
  ipv6: "IPv6 address",
78159
+ mac: "MAC address",
78129
78160
  cidrv4: "IPv4 range",
78130
78161
  cidrv6: "IPv6 range",
78131
78162
  base64: "base64-encoded string",
@@ -78934,110 +78965,200 @@ function fr_CA_default2() {
78934
78965
  }
78935
78966
  // ../../node_modules/zod/v4/locales/he.js
78936
78967
  var error61 = () => {
78937
- const Sizable = {
78938
- string: { unit: "אותיות", verb: "לכלול" },
78939
- file: { unit: "בייטים", verb: "לכלול" },
78940
- array: { unit: "פריטים", verb: "לכלול" },
78941
- set: { unit: "פריטים", verb: "לכלול" }
78968
+ const TypeNames = {
78969
+ string: { label: "מחרוזת", gender: "f" },
78970
+ number: { label: "מספר", gender: "m" },
78971
+ boolean: { label: "ערך בוליאני", gender: "m" },
78972
+ bigint: { label: "BigInt", gender: "m" },
78973
+ date: { label: "תאריך", gender: "m" },
78974
+ array: { label: "מערך", gender: "m" },
78975
+ object: { label: "אובייקט", gender: "m" },
78976
+ null: { label: "ערך ריק (null)", gender: "m" },
78977
+ undefined: { label: "ערך לא מוגדר (undefined)", gender: "m" },
78978
+ symbol: { label: "סימבול (Symbol)", gender: "m" },
78979
+ function: { label: "פונקציה", gender: "f" },
78980
+ map: { label: "מפה (Map)", gender: "f" },
78981
+ set: { label: "קבוצה (Set)", gender: "f" },
78982
+ file: { label: "קובץ", gender: "m" },
78983
+ promise: { label: "Promise", gender: "m" },
78984
+ NaN: { label: "NaN", gender: "m" },
78985
+ unknown: { label: "ערך לא ידוע", gender: "m" },
78986
+ value: { label: "ערך", gender: "m" }
78942
78987
  };
78943
- function getSizing(origin) {
78988
+ const Sizable = {
78989
+ string: { unit: "תווים", shortLabel: "קצר", longLabel: "ארוך" },
78990
+ file: { unit: "בייטים", shortLabel: "קטן", longLabel: "גדול" },
78991
+ array: { unit: "פריטים", shortLabel: "קטן", longLabel: "גדול" },
78992
+ set: { unit: "פריטים", shortLabel: "קטן", longLabel: "גדול" },
78993
+ number: { unit: "", shortLabel: "קטן", longLabel: "גדול" }
78994
+ };
78995
+ const typeEntry = (t) => t ? TypeNames[t] : undefined;
78996
+ const typeLabel = (t) => {
78997
+ const e = typeEntry(t);
78998
+ if (e)
78999
+ return e.label;
79000
+ return t ?? TypeNames.unknown.label;
79001
+ };
79002
+ const withDefinite = (t) => `ה${typeLabel(t)}`;
79003
+ const verbFor = (t) => {
79004
+ const e = typeEntry(t);
79005
+ const gender = e?.gender ?? "m";
79006
+ return gender === "f" ? "צריכה להיות" : "צריך להיות";
79007
+ };
79008
+ const getSizing = (origin) => {
79009
+ if (!origin)
79010
+ return null;
78944
79011
  return Sizable[origin] ?? null;
78945
- }
79012
+ };
78946
79013
  const parsedType11 = (data) => {
78947
79014
  const t = typeof data;
78948
79015
  switch (t) {
78949
- case "number": {
79016
+ case "number":
78950
79017
  return Number.isNaN(data) ? "NaN" : "number";
78951
- }
78952
79018
  case "object": {
78953
- if (Array.isArray(data)) {
79019
+ if (Array.isArray(data))
78954
79020
  return "array";
78955
- }
78956
- if (data === null) {
79021
+ if (data === null)
78957
79022
  return "null";
78958
- }
78959
79023
  if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) {
78960
79024
  return data.constructor.name;
78961
79025
  }
79026
+ return "object";
78962
79027
  }
79028
+ default:
79029
+ return t;
78963
79030
  }
78964
- return t;
78965
79031
  };
78966
79032
  const Nouns = {
78967
- regex: "קלט",
78968
- email: "כתובת אימייל",
78969
- url: "כתובת רשת",
78970
- emoji: "אימוג'י",
78971
- uuid: "UUID",
78972
- uuidv4: "UUIDv4",
78973
- uuidv6: "UUIDv6",
78974
- nanoid: "nanoid",
78975
- guid: "GUID",
78976
- cuid: "cuid",
78977
- cuid2: "cuid2",
78978
- ulid: "ULID",
78979
- xid: "XID",
78980
- ksuid: "KSUID",
78981
- datetime: "תאריך וזמן ISO",
78982
- date: "תאריך ISO",
78983
- time: "זמן ISO",
78984
- duration: "משך זמן ISO",
78985
- ipv4: "כתובת IPv4",
78986
- ipv6: "כתובת IPv6",
78987
- cidrv4: "טווח IPv4",
78988
- cidrv6: "טווח IPv6",
78989
- base64: "מחרוזת בבסיס 64",
78990
- base64url: "מחרוזת בבסיס 64 לכתובות רשת",
78991
- json_string: "מחרוזת JSON",
78992
- e164: "מספר E.164",
78993
- jwt: "JWT",
78994
- template_literal: "קלט"
79033
+ regex: { label: "קלט", gender: "m" },
79034
+ email: { label: "כתובת אימייל", gender: "f" },
79035
+ url: { label: "כתובת רשת", gender: "f" },
79036
+ emoji: { label: "אימוג'י", gender: "m" },
79037
+ uuid: { label: "UUID", gender: "m" },
79038
+ nanoid: { label: "nanoid", gender: "m" },
79039
+ guid: { label: "GUID", gender: "m" },
79040
+ cuid: { label: "cuid", gender: "m" },
79041
+ cuid2: { label: "cuid2", gender: "m" },
79042
+ ulid: { label: "ULID", gender: "m" },
79043
+ xid: { label: "XID", gender: "m" },
79044
+ ksuid: { label: "KSUID", gender: "m" },
79045
+ datetime: { label: "תאריך וזמן ISO", gender: "m" },
79046
+ date: { label: "תאריך ISO", gender: "m" },
79047
+ time: { label: "זמן ISO", gender: "m" },
79048
+ duration: { label: "משך זמן ISO", gender: "m" },
79049
+ ipv4: { label: "כתובת IPv4", gender: "f" },
79050
+ ipv6: { label: "כתובת IPv6", gender: "f" },
79051
+ cidrv4: { label: "טווח IPv4", gender: "m" },
79052
+ cidrv6: { label: "טווח IPv6", gender: "m" },
79053
+ base64: { label: "מחרוזת בבסיס 64", gender: "f" },
79054
+ base64url: { label: "מחרוזת בבסיס 64 לכתובות רשת", gender: "f" },
79055
+ json_string: { label: "מחרוזת JSON", gender: "f" },
79056
+ e164: { label: "מספר E.164", gender: "m" },
79057
+ jwt: { label: "JWT", gender: "m" },
79058
+ ends_with: { label: "קלט", gender: "m" },
79059
+ includes: { label: "קלט", gender: "m" },
79060
+ lowercase: { label: "קלט", gender: "m" },
79061
+ starts_with: { label: "קלט", gender: "m" },
79062
+ uppercase: { label: "קלט", gender: "m" }
78995
79063
  };
78996
79064
  return (issue3) => {
78997
79065
  switch (issue3.code) {
78998
- case "invalid_type":
78999
- return `קלט לא תקין: צריך ${issue3.expected}, התקבל ${parsedType11(issue3.input)}`;
79000
- case "invalid_value":
79001
- if (issue3.values.length === 1)
79002
- return `קלט לא תקין: צריך ${stringifyPrimitive2(issue3.values[0])}`;
79003
- return `קלט לא תקין: צריך אחת מהאפשרויות ${joinValues2(issue3.values, "|")}`;
79066
+ case "invalid_type": {
79067
+ const expectedKey = issue3.expected;
79068
+ const expected = typeLabel(expectedKey);
79069
+ const receivedKey = parsedType11(issue3.input);
79070
+ const received = TypeNames[receivedKey]?.label ?? receivedKey;
79071
+ return `קלט לא תקין: צריך להיות ${expected}, התקבל ${received}`;
79072
+ }
79073
+ case "invalid_value": {
79074
+ if (issue3.values.length === 1) {
79075
+ return `ערך לא תקין: הערך חייב להיות ${stringifyPrimitive2(issue3.values[0])}`;
79076
+ }
79077
+ const stringified = issue3.values.map((v) => stringifyPrimitive2(v));
79078
+ if (issue3.values.length === 2) {
79079
+ return `ערך לא תקין: האפשרויות המתאימות הן ${stringified[0]} או ${stringified[1]}`;
79080
+ }
79081
+ const lastValue = stringified[stringified.length - 1];
79082
+ const restValues = stringified.slice(0, -1).join(", ");
79083
+ return `ערך לא תקין: האפשרויות המתאימות הן ${restValues} או ${lastValue}`;
79084
+ }
79004
79085
  case "too_big": {
79005
- const adj = issue3.inclusive ? "<=" : "<";
79006
79086
  const sizing = getSizing(issue3.origin);
79007
- if (sizing)
79008
- return `גדול מדי: ${issue3.origin ?? "value"} צריך להיות ${adj}${issue3.maximum.toString()} ${sizing.unit ?? "elements"}`;
79009
- return `גדול מדי: ${issue3.origin ?? "value"} צריך להיות ${adj}${issue3.maximum.toString()}`;
79087
+ const subject = withDefinite(issue3.origin ?? "value");
79088
+ if (issue3.origin === "string") {
79089
+ return `${sizing?.longLabel ?? "ארוך"} מדי: ${subject} צריכה להכיל ${issue3.maximum.toString()} ${sizing?.unit ?? ""} ${issue3.inclusive ? "או פחות" : "לכל היותר"}`.trim();
79090
+ }
79091
+ if (issue3.origin === "number") {
79092
+ const comparison = issue3.inclusive ? `קטן או שווה ל-${issue3.maximum}` : `קטן מ-${issue3.maximum}`;
79093
+ return `גדול מדי: ${subject} צריך להיות ${comparison}`;
79094
+ }
79095
+ if (issue3.origin === "array" || issue3.origin === "set") {
79096
+ const verb = issue3.origin === "set" ? "צריכה" : "צריך";
79097
+ const comparison = issue3.inclusive ? `${issue3.maximum} ${sizing?.unit ?? ""} או פחות` : `פחות מ-${issue3.maximum} ${sizing?.unit ?? ""}`;
79098
+ return `גדול מדי: ${subject} ${verb} להכיל ${comparison}`.trim();
79099
+ }
79100
+ const adj = issue3.inclusive ? "<=" : "<";
79101
+ const be = verbFor(issue3.origin ?? "value");
79102
+ if (sizing?.unit) {
79103
+ return `${sizing.longLabel} מדי: ${subject} ${be} ${adj}${issue3.maximum.toString()} ${sizing.unit}`;
79104
+ }
79105
+ return `${sizing?.longLabel ?? "גדול"} מדי: ${subject} ${be} ${adj}${issue3.maximum.toString()}`;
79010
79106
  }
79011
79107
  case "too_small": {
79012
- const adj = issue3.inclusive ? ">=" : ">";
79013
79108
  const sizing = getSizing(issue3.origin);
79014
- if (sizing) {
79015
- return `קטן מדי: ${issue3.origin} צריך להיות ${adj}${issue3.minimum.toString()} ${sizing.unit}`;
79109
+ const subject = withDefinite(issue3.origin ?? "value");
79110
+ if (issue3.origin === "string") {
79111
+ return `${sizing?.shortLabel ?? "קצר"} מדי: ${subject} צריכה להכיל ${issue3.minimum.toString()} ${sizing?.unit ?? ""} ${issue3.inclusive ? "או יותר" : "לפחות"}`.trim();
79112
+ }
79113
+ if (issue3.origin === "number") {
79114
+ const comparison = issue3.inclusive ? `גדול או שווה ל-${issue3.minimum}` : `גדול מ-${issue3.minimum}`;
79115
+ return `קטן מדי: ${subject} צריך להיות ${comparison}`;
79116
+ }
79117
+ if (issue3.origin === "array" || issue3.origin === "set") {
79118
+ const verb = issue3.origin === "set" ? "צריכה" : "צריך";
79119
+ if (issue3.minimum === 1 && issue3.inclusive) {
79120
+ const singularPhrase = issue3.origin === "set" ? "לפחות פריט אחד" : "לפחות פריט אחד";
79121
+ return `קטן מדי: ${subject} ${verb} להכיל ${singularPhrase}`;
79122
+ }
79123
+ const comparison = issue3.inclusive ? `${issue3.minimum} ${sizing?.unit ?? ""} או יותר` : `יותר מ-${issue3.minimum} ${sizing?.unit ?? ""}`;
79124
+ return `קטן מדי: ${subject} ${verb} להכיל ${comparison}`.trim();
79125
+ }
79126
+ const adj = issue3.inclusive ? ">=" : ">";
79127
+ const be = verbFor(issue3.origin ?? "value");
79128
+ if (sizing?.unit) {
79129
+ return `${sizing.shortLabel} מדי: ${subject} ${be} ${adj}${issue3.minimum.toString()} ${sizing.unit}`;
79016
79130
  }
79017
- return `קטן מדי: ${issue3.origin} צריך להיות ${adj}${issue3.minimum.toString()}`;
79131
+ return `${sizing?.shortLabel ?? "קטן"} מדי: ${subject} ${be} ${adj}${issue3.minimum.toString()}`;
79018
79132
  }
79019
79133
  case "invalid_format": {
79020
79134
  const _issue = issue3;
79021
79135
  if (_issue.format === "starts_with")
79022
- return `מחרוזת לא תקינה: חייבת להתחיל ב"${_issue.prefix}"`;
79136
+ return `המחרוזת חייבת להתחיל ב "${_issue.prefix}"`;
79023
79137
  if (_issue.format === "ends_with")
79024
- return `מחרוזת לא תקינה: חייבת להסתיים ב "${_issue.suffix}"`;
79138
+ return `המחרוזת חייבת להסתיים ב "${_issue.suffix}"`;
79025
79139
  if (_issue.format === "includes")
79026
- return `מחרוזת לא תקינה: חייבת לכלול "${_issue.includes}"`;
79140
+ return `המחרוזת חייבת לכלול "${_issue.includes}"`;
79027
79141
  if (_issue.format === "regex")
79028
- return `מחרוזת לא תקינה: חייבת להתאים לתבנית ${_issue.pattern}`;
79029
- return `${Nouns[_issue.format] ?? issue3.format} לא תקין`;
79142
+ return `המחרוזת חייבת להתאים לתבנית ${_issue.pattern}`;
79143
+ const nounEntry = Nouns[_issue.format];
79144
+ const noun = nounEntry?.label ?? _issue.format;
79145
+ const gender = nounEntry?.gender ?? "m";
79146
+ const adjective = gender === "f" ? "תקינה" : "תקין";
79147
+ return `${noun} לא ${adjective}`;
79030
79148
  }
79031
79149
  case "not_multiple_of":
79032
79150
  return `מספר לא תקין: חייב להיות מכפלה של ${issue3.divisor}`;
79033
79151
  case "unrecognized_keys":
79034
79152
  return `מפתח${issue3.keys.length > 1 ? "ות" : ""} לא מזוה${issue3.keys.length > 1 ? "ים" : "ה"}: ${joinValues2(issue3.keys, ", ")}`;
79035
- case "invalid_key":
79036
- return `מפתח לא תקין ב${issue3.origin}`;
79153
+ case "invalid_key": {
79154
+ return `שדה לא תקין באובייקט`;
79155
+ }
79037
79156
  case "invalid_union":
79038
79157
  return "קלט לא תקין";
79039
- case "invalid_element":
79040
- return `ערך לא תקין ב${issue3.origin}`;
79158
+ case "invalid_element": {
79159
+ const place = withDefinite(issue3.origin ?? "array");
79160
+ return `ערך לא תקין ב${place}`;
79161
+ }
79041
79162
  default:
79042
79163
  return `קלט לא תקין`;
79043
79164
  }
@@ -80461,10 +80582,10 @@ function ms_default2() {
80461
80582
  // ../../node_modules/zod/v4/locales/nl.js
80462
80583
  var error73 = () => {
80463
80584
  const Sizable = {
80464
- string: { unit: "tekens" },
80465
- file: { unit: "bytes" },
80466
- array: { unit: "elementen" },
80467
- set: { unit: "elementen" }
80585
+ string: { unit: "tekens", verb: "te hebben" },
80586
+ file: { unit: "bytes", verb: "te hebben" },
80587
+ array: { unit: "elementen", verb: "te hebben" },
80588
+ set: { unit: "elementen", verb: "te hebben" }
80468
80589
  };
80469
80590
  function getSizing(origin) {
80470
80591
  return Sizable[origin] ?? null;
@@ -80531,16 +80652,16 @@ var error73 = () => {
80531
80652
  const adj = issue3.inclusive ? "<=" : "<";
80532
80653
  const sizing = getSizing(issue3.origin);
80533
80654
  if (sizing)
80534
- return `Te lang: verwacht dat ${issue3.origin ?? "waarde"} ${adj}${issue3.maximum.toString()} ${sizing.unit ?? "elementen"} bevat`;
80535
- return `Te lang: verwacht dat ${issue3.origin ?? "waarde"} ${adj}${issue3.maximum.toString()} is`;
80655
+ return `Te groot: verwacht dat ${issue3.origin ?? "waarde"} ${sizing.verb} ${adj}${issue3.maximum.toString()} ${sizing.unit ?? "elementen"}`;
80656
+ return `Te groot: verwacht dat ${issue3.origin ?? "waarde"} ${adj}${issue3.maximum.toString()} is`;
80536
80657
  }
80537
80658
  case "too_small": {
80538
80659
  const adj = issue3.inclusive ? ">=" : ">";
80539
80660
  const sizing = getSizing(issue3.origin);
80540
80661
  if (sizing) {
80541
- return `Te kort: verwacht dat ${issue3.origin} ${adj}${issue3.minimum.toString()} ${sizing.unit} bevat`;
80662
+ return `Te klein: verwacht dat ${issue3.origin} ${sizing.verb} ${adj}${issue3.minimum.toString()} ${sizing.unit}`;
80542
80663
  }
80543
- return `Te kort: verwacht dat ${issue3.origin} ${adj}${issue3.minimum.toString()} is`;
80664
+ return `Te klein: verwacht dat ${issue3.origin} ${adj}${issue3.minimum.toString()} is`;
80544
80665
  }
80545
80666
  case "invalid_format": {
80546
80667
  const _issue = issue3;
@@ -82613,6 +82734,7 @@ function yo_default2() {
82613
82734
  };
82614
82735
  }
82615
82736
  // ../../node_modules/zod/v4/core/registries.js
82737
+ var _a19;
82616
82738
  var $output2 = Symbol("ZodOutput");
82617
82739
  var $input2 = Symbol("ZodInput");
82618
82740
 
@@ -82662,7 +82784,8 @@ class $ZodRegistry2 {
82662
82784
  function registry2() {
82663
82785
  return new $ZodRegistry2;
82664
82786
  }
82665
- var globalRegistry2 = /* @__PURE__ */ registry2();
82787
+ (_a19 = globalThis).__zod_globalRegistry ?? (_a19.__zod_globalRegistry = registry2());
82788
+ var globalRegistry2 = globalThis.__zod_globalRegistry;
82666
82789
  // ../../node_modules/zod/v4/core/api.js
82667
82790
  function _string2(Class3, params) {
82668
82791
  return new Class3({
@@ -82824,6 +82947,15 @@ function _ipv62(Class3, params) {
82824
82947
  ...normalizeParams2(params)
82825
82948
  });
82826
82949
  }
82950
+ function _mac(Class3, params) {
82951
+ return new Class3({
82952
+ type: "string",
82953
+ format: "mac",
82954
+ check: "string_format",
82955
+ abort: false,
82956
+ ...normalizeParams2(params)
82957
+ });
82958
+ }
82827
82959
  function _cidrv42(Class3, params) {
82828
82960
  return new Class3({
82829
82961
  type: "string",
@@ -83257,6 +83389,9 @@ function _toLowerCase2() {
83257
83389
  function _toUpperCase2() {
83258
83390
  return _overwrite2((input) => input.toUpperCase());
83259
83391
  }
83392
+ function _slugify() {
83393
+ return _overwrite2((input) => slugify(input));
83394
+ }
83260
83395
  function _array2(Class3, element, params) {
83261
83396
  return new Class3({
83262
83397
  type: "array",
@@ -83475,6 +83610,28 @@ function _check2(fn, params) {
83475
83610
  ch._zod.check = fn;
83476
83611
  return ch;
83477
83612
  }
83613
+ function describe(description) {
83614
+ const ch = new $ZodCheck2({ check: "describe" });
83615
+ ch._zod.onattach = [
83616
+ (inst) => {
83617
+ const existing = globalRegistry2.get(inst) ?? {};
83618
+ globalRegistry2.add(inst, { ...existing, description });
83619
+ }
83620
+ ];
83621
+ ch._zod.check = () => {};
83622
+ return ch;
83623
+ }
83624
+ function meta(metadata) {
83625
+ const ch = new $ZodCheck2({ check: "meta" });
83626
+ ch._zod.onattach = [
83627
+ (inst) => {
83628
+ const existing = globalRegistry2.get(inst) ?? {};
83629
+ globalRegistry2.add(inst, { ...existing, ...metadata });
83630
+ }
83631
+ ];
83632
+ ch._zod.check = () => {};
83633
+ return ch;
83634
+ }
83478
83635
  function _stringbool2(Classes, _params) {
83479
83636
  const params = normalizeParams2(_params);
83480
83637
  let truthyArray = params.truthy ?? ["true", "1", "yes", "on", "y", "enabled"];
@@ -83768,11 +83925,16 @@ class JSONSchemaGenerator2 {
83768
83925
  }
83769
83926
  case "union": {
83770
83927
  const json2 = _json;
83928
+ const isDiscriminated = def.discriminator !== undefined;
83771
83929
  const options = def.options.map((x, i) => this.process(x, {
83772
83930
  ...params,
83773
- path: [...params.path, "anyOf", i]
83931
+ path: [...params.path, isDiscriminated ? "oneOf" : "anyOf", i]
83774
83932
  }));
83775
- json2.anyOf = options;
83933
+ if (isDiscriminated) {
83934
+ json2.oneOf = options;
83935
+ } else {
83936
+ json2.anyOf = options;
83937
+ }
83776
83938
  break;
83777
83939
  }
83778
83940
  case "intersection": {
@@ -84048,9 +84210,9 @@ class JSONSchemaGenerator2 {
84048
84210
  }
84049
84211
  }
84050
84212
  }
84051
- const meta = this.metadataRegistry.get(schema);
84052
- if (meta)
84053
- Object.assign(result.schema, meta);
84213
+ const meta2 = this.metadataRegistry.get(schema);
84214
+ if (meta2)
84215
+ Object.assign(result.schema, meta2);
84054
84216
  if (this.io === "input" && isTransforming2(schema)) {
84055
84217
  delete result.schema.examples;
84056
84218
  delete result.schema.default;
@@ -84250,100 +84412,51 @@ function isTransforming2(_schema, _ctx) {
84250
84412
  if (ctx.seen.has(_schema))
84251
84413
  return false;
84252
84414
  ctx.seen.add(_schema);
84253
- const schema = _schema;
84254
- const def = schema._zod.def;
84255
- switch (def.type) {
84256
- case "string":
84257
- case "number":
84258
- case "bigint":
84259
- case "boolean":
84260
- case "date":
84261
- case "symbol":
84262
- case "undefined":
84263
- case "null":
84264
- case "any":
84265
- case "unknown":
84266
- case "never":
84267
- case "void":
84268
- case "literal":
84269
- case "enum":
84270
- case "nan":
84271
- case "file":
84272
- case "template_literal":
84273
- return false;
84274
- case "array": {
84275
- return isTransforming2(def.element, ctx);
84276
- }
84277
- case "object": {
84278
- for (const key in def.shape) {
84279
- if (isTransforming2(def.shape[key], ctx))
84280
- return true;
84281
- }
84282
- return false;
84283
- }
84284
- case "union": {
84285
- for (const option of def.options) {
84286
- if (isTransforming2(option, ctx))
84287
- return true;
84288
- }
84289
- return false;
84290
- }
84291
- case "intersection": {
84292
- return isTransforming2(def.left, ctx) || isTransforming2(def.right, ctx);
84293
- }
84294
- case "tuple": {
84295
- for (const item of def.items) {
84296
- if (isTransforming2(item, ctx))
84297
- return true;
84298
- }
84299
- if (def.rest && isTransforming2(def.rest, ctx))
84415
+ const def = _schema._zod.def;
84416
+ if (def.type === "transform")
84417
+ return true;
84418
+ if (def.type === "array")
84419
+ return isTransforming2(def.element, ctx);
84420
+ if (def.type === "set")
84421
+ return isTransforming2(def.valueType, ctx);
84422
+ if (def.type === "lazy")
84423
+ return isTransforming2(def.getter(), ctx);
84424
+ if (def.type === "promise" || def.type === "optional" || def.type === "nonoptional" || def.type === "nullable" || def.type === "readonly" || def.type === "default" || def.type === "prefault") {
84425
+ return isTransforming2(def.innerType, ctx);
84426
+ }
84427
+ if (def.type === "intersection") {
84428
+ return isTransforming2(def.left, ctx) || isTransforming2(def.right, ctx);
84429
+ }
84430
+ if (def.type === "record" || def.type === "map") {
84431
+ return isTransforming2(def.keyType, ctx) || isTransforming2(def.valueType, ctx);
84432
+ }
84433
+ if (def.type === "pipe") {
84434
+ return isTransforming2(def.in, ctx) || isTransforming2(def.out, ctx);
84435
+ }
84436
+ if (def.type === "object") {
84437
+ for (const key in def.shape) {
84438
+ if (isTransforming2(def.shape[key], ctx))
84300
84439
  return true;
84301
- return false;
84302
- }
84303
- case "record": {
84304
- return isTransforming2(def.keyType, ctx) || isTransforming2(def.valueType, ctx);
84305
- }
84306
- case "map": {
84307
- return isTransforming2(def.keyType, ctx) || isTransforming2(def.valueType, ctx);
84308
84440
  }
84309
- case "set": {
84310
- return isTransforming2(def.valueType, ctx);
84311
- }
84312
- case "promise":
84313
- case "optional":
84314
- case "nonoptional":
84315
- case "nullable":
84316
- case "readonly":
84317
- return isTransforming2(def.innerType, ctx);
84318
- case "lazy":
84319
- return isTransforming2(def.getter(), ctx);
84320
- case "default": {
84321
- return isTransforming2(def.innerType, ctx);
84322
- }
84323
- case "prefault": {
84324
- return isTransforming2(def.innerType, ctx);
84441
+ return false;
84442
+ }
84443
+ if (def.type === "union") {
84444
+ for (const option of def.options) {
84445
+ if (isTransforming2(option, ctx))
84446
+ return true;
84325
84447
  }
84326
- case "custom": {
84327
- return false;
84448
+ return false;
84449
+ }
84450
+ if (def.type === "tuple") {
84451
+ for (const item of def.items) {
84452
+ if (isTransforming2(item, ctx))
84453
+ return true;
84328
84454
  }
84329
- case "transform": {
84455
+ if (def.rest && isTransforming2(def.rest, ctx))
84330
84456
  return true;
84331
- }
84332
- case "pipe": {
84333
- return isTransforming2(def.in, ctx) || isTransforming2(def.out, ctx);
84334
- }
84335
- case "success": {
84336
- return false;
84337
- }
84338
- case "catch": {
84339
- return false;
84340
- }
84341
- case "function": {
84342
- return false;
84343
- }
84344
- default:
84457
+ return false;
84345
84458
  }
84346
- throw new Error(`Unknown schema type: ${def.type}`);
84459
+ return false;
84347
84460
  }
84348
84461
  // ../../node_modules/zod/v4/core/json-schema.js
84349
84462
  var exports_json_schema2 = {};
@@ -84453,8 +84566,8 @@ var ZodType3 = /* @__PURE__ */ $constructor2("ZodType", (inst, def) => {
84453
84566
  };
84454
84567
  inst.clone = (def2, params) => clone2(inst, def2, params);
84455
84568
  inst.brand = () => inst;
84456
- inst.register = (reg, meta) => {
84457
- reg.add(inst, meta);
84569
+ inst.register = (reg, meta2) => {
84570
+ reg.add(inst, meta2);
84458
84571
  return inst;
84459
84572
  };
84460
84573
  inst.parse = (data, params) => parse7(inst, data, params, { callee: inst.parse });
@@ -84530,6 +84643,7 @@ var _ZodString2 = /* @__PURE__ */ $constructor2("_ZodString", (inst, def) => {
84530
84643
  inst.normalize = (...args) => inst.check(_normalize2(...args));
84531
84644
  inst.toLowerCase = () => inst.check(_toLowerCase2());
84532
84645
  inst.toUpperCase = () => inst.check(_toUpperCase2());
84646
+ inst.slugify = () => inst.check(_slugify());
84533
84647
  });
84534
84648
  var ZodString3 = /* @__PURE__ */ $constructor2("ZodString", (inst, def) => {
84535
84649
  $ZodString2.init(inst, def);
@@ -84669,6 +84783,13 @@ var ZodIPv42 = /* @__PURE__ */ $constructor2("ZodIPv4", (inst, def) => {
84669
84783
  function ipv44(params) {
84670
84784
  return _ipv42(ZodIPv42, params);
84671
84785
  }
84786
+ var ZodMAC = /* @__PURE__ */ $constructor2("ZodMAC", (inst, def) => {
84787
+ $ZodMAC.init(inst, def);
84788
+ ZodStringFormat2.init(inst, def);
84789
+ });
84790
+ function mac2(params) {
84791
+ return _mac(ZodMAC, params);
84792
+ }
84672
84793
  var ZodIPv62 = /* @__PURE__ */ $constructor2("ZodIPv6", (inst, def) => {
84673
84794
  $ZodIPv62.init(inst, def);
84674
84795
  ZodStringFormat2.init(inst, def);
@@ -85377,6 +85498,8 @@ function refine2(fn, _params = {}) {
85377
85498
  function superRefine2(fn) {
85378
85499
  return _superRefine2(fn);
85379
85500
  }
85501
+ var describe2 = describe;
85502
+ var meta2 = meta;
85380
85503
  function _instanceof2(cls, params = {
85381
85504
  error: `Input not instance of ${cls.name}`
85382
85505
  }) {
@@ -89370,7 +89493,7 @@ function withUserAgentSuffix3(headers, ...userAgentSuffixParts) {
89370
89493
  normalizedHeaders.set("user-agent", [currentUserAgentHeader, ...userAgentSuffixParts].filter(Boolean).join(" "));
89371
89494
  return Object.fromEntries(normalizedHeaders.entries());
89372
89495
  }
89373
- var VERSION8 = "3.0.17";
89496
+ var VERSION8 = "3.0.18";
89374
89497
  function loadApiKey3({
89375
89498
  apiKey,
89376
89499
  environmentVariableName,
@@ -90892,7 +91015,7 @@ function withoutTrailingSlash3(url3) {
90892
91015
  }
90893
91016
 
90894
91017
  // ../../node_modules/@ai-sdk/google/dist/index.mjs
90895
- var VERSION9 = "2.0.42";
91018
+ var VERSION9 = "2.0.44";
90896
91019
  var googleErrorDataSchema2 = lazySchema3(() => zodSchema3(exports_external2.object({
90897
91020
  error: exports_external2.object({
90898
91021
  code: exports_external2.number().nullable(),
@@ -91978,7 +92101,7 @@ function extractSources2({
91978
92101
  groundingMetadata,
91979
92102
  generateId: generateId32
91980
92103
  }) {
91981
- var _a16, _b8, _c;
92104
+ var _a16, _b8, _c, _d;
91982
92105
  if (!(groundingMetadata == null ? undefined : groundingMetadata.groundingChunks)) {
91983
92106
  return;
91984
92107
  }
@@ -91994,7 +92117,8 @@ function extractSources2({
91994
92117
  });
91995
92118
  } else if (chunk.retrievedContext != null) {
91996
92119
  const uri = chunk.retrievedContext.uri;
91997
- if (uri.startsWith("http://") || uri.startsWith("https://")) {
92120
+ const fileSearchStore = chunk.retrievedContext.fileSearchStore;
92121
+ if (uri && (uri.startsWith("http://") || uri.startsWith("https://"))) {
91998
92122
  sources.push({
91999
92123
  type: "source",
92000
92124
  sourceType: "url",
@@ -92002,7 +92126,7 @@ function extractSources2({
92002
92126
  url: uri,
92003
92127
  title: (_b8 = chunk.retrievedContext.title) != null ? _b8 : undefined
92004
92128
  });
92005
- } else {
92129
+ } else if (uri) {
92006
92130
  const title = (_c = chunk.retrievedContext.title) != null ? _c : "Unknown Document";
92007
92131
  let mediaType = "application/octet-stream";
92008
92132
  let filename = undefined;
@@ -92032,6 +92156,16 @@ function extractSources2({
92032
92156
  title,
92033
92157
  filename
92034
92158
  });
92159
+ } else if (fileSearchStore) {
92160
+ const title = (_d = chunk.retrievedContext.title) != null ? _d : "Unknown Document";
92161
+ sources.push({
92162
+ type: "source",
92163
+ sourceType: "document",
92164
+ id: generateId32(),
92165
+ mediaType: "application/octet-stream",
92166
+ title,
92167
+ filename: fileSearchStore.split("/").pop()
92168
+ });
92035
92169
  }
92036
92170
  }
92037
92171
  }
@@ -92044,9 +92178,10 @@ var getGroundingMetadataSchema2 = () => exports_external2.object({
92044
92178
  groundingChunks: exports_external2.array(exports_external2.object({
92045
92179
  web: exports_external2.object({ uri: exports_external2.string(), title: exports_external2.string().nullish() }).nullish(),
92046
92180
  retrievedContext: exports_external2.object({
92047
- uri: exports_external2.string(),
92181
+ uri: exports_external2.string().nullish(),
92048
92182
  title: exports_external2.string().nullish(),
92049
- text: exports_external2.string().nullish()
92183
+ text: exports_external2.string().nullish(),
92184
+ fileSearchStore: exports_external2.string().nullish()
92050
92185
  }).nullish()
92051
92186
  })).nullish(),
92052
92187
  groundingSupports: exports_external2.array(exports_external2.object({
@@ -96288,7 +96423,7 @@ var __spreadValues = (a, b) => {
96288
96423
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
96289
96424
  var marker19 = "vercel.ai.error";
96290
96425
  var symbol20 = Symbol.for(marker19);
96291
- var _a19;
96426
+ var _a20;
96292
96427
  var _AISDKError5 = class _AISDKError22 extends Error {
96293
96428
  constructor({
96294
96429
  name: name143,
@@ -96296,7 +96431,7 @@ var _AISDKError5 = class _AISDKError22 extends Error {
96296
96431
  cause
96297
96432
  }) {
96298
96433
  super(message);
96299
- this[_a19] = true;
96434
+ this[_a20] = true;
96300
96435
  this.name = name143;
96301
96436
  this.cause = cause;
96302
96437
  }
@@ -96308,7 +96443,7 @@ var _AISDKError5 = class _AISDKError22 extends Error {
96308
96443
  return error91 != null && typeof error91 === "object" && markerSymbol in error91 && typeof error91[markerSymbol] === "boolean" && error91[markerSymbol] === true;
96309
96444
  }
96310
96445
  };
96311
- _a19 = symbol20;
96446
+ _a20 = symbol20;
96312
96447
  var AISDKError3 = _AISDKError5;
96313
96448
  var name18 = "AI_APICallError";
96314
96449
  var marker25 = `vercel.ai.error.${name18}`;
@@ -103910,12 +104045,19 @@ var reviewWorkflow = async (input2, context) => {
103910
104045
  return { overview: "No changes to review.", specificReviews: [] };
103911
104046
  }
103912
104047
  const result = await step("review", async () => {
104048
+ const defaultContext = await getDefaultContext();
104049
+ const memoryContext = await tools2.getMemoryContext();
104050
+ const reviewInput = formatReviewToolInput(changeInfo);
104051
+ const fullContent = `${reviewInput}
104052
+
104053
+ ${defaultContext}
104054
+ ${memoryContext}`;
103913
104055
  return await agentWorkflow({
103914
104056
  systemPrompt: CODE_REVIEW_SYSTEM_PROMPT,
103915
104057
  userMessage: [
103916
104058
  {
103917
104059
  role: "user",
103918
- content: formatReviewToolInput(changeInfo)
104060
+ content: fullContent
103919
104061
  }
103920
104062
  ],
103921
104063
  tools: [readFile_default, readBinaryFile_default, searchFiles_default, listFiles_default, gitDiff_default],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@polka-codes/cli",
3
- "version": "0.9.66",
3
+ "version": "0.9.68",
4
4
  "license": "AGPL-3.0",
5
5
  "author": "github@polka.codes",
6
6
  "type": "module",
@@ -17,27 +17,27 @@
17
17
  "build": "bun build src/index.ts --outdir dist --target node"
18
18
  },
19
19
  "dependencies": {
20
- "@ai-sdk/anthropic": "^2.0.40",
21
- "@ai-sdk/deepseek": "^1.0.28",
22
- "@ai-sdk/google": "^2.0.42",
23
- "@ai-sdk/google-vertex": "^3.0.71",
24
- "@ai-sdk/openai": "^2.0.69",
20
+ "@ai-sdk/anthropic": "^2.0.50",
21
+ "@ai-sdk/deepseek": "^1.0.30",
22
+ "@ai-sdk/google": "^2.0.44",
23
+ "@ai-sdk/google-vertex": "^3.0.81",
24
+ "@ai-sdk/openai": "^2.0.74",
25
25
  "@ai-sdk/provider": "^2.0.0",
26
- "@ai-sdk/provider-utils": "^3.0.15",
26
+ "@ai-sdk/provider-utils": "^3.0.18",
27
27
  "@inquirer/prompts": "^7.10.1",
28
- "@openrouter/ai-sdk-provider": "^1.2.3",
29
- "@polka-codes/cli-shared": "0.9.63",
30
- "@polka-codes/core": "0.9.63",
31
- "ai": "^5.0.97",
28
+ "@openrouter/ai-sdk-provider": "^1.2.8",
29
+ "@polka-codes/cli-shared": "0.9.67",
30
+ "@polka-codes/core": "0.9.67",
31
+ "ai": "^5.0.104",
32
32
  "chalk": "^5.6.2",
33
33
  "commander": "^14.0.2",
34
34
  "dotenv": "^17.2.3",
35
35
  "lodash-es": "^4.17.21",
36
- "mime-types": "^3.0.1",
36
+ "mime-types": "^3.0.2",
37
37
  "ollama-ai-provider-v2": "^1.5.5",
38
38
  "ora": "^9.0.0",
39
39
  "yaml": "^2.8.1",
40
- "zod": "^4.1.12"
40
+ "zod": "^4.1.13"
41
41
  },
42
42
  "files": [
43
43
  "dist",