@vorim/sdk 4.2.0 → 4.3.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.
Files changed (42) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/dist/index.cjs +1 -1
  3. package/dist/index.js +1 -1
  4. package/dist/integrations/eu-providers.cjs +463 -0
  5. package/dist/integrations/eu-providers.cjs.map +1 -0
  6. package/dist/integrations/eu-providers.d.cts +123 -0
  7. package/dist/integrations/eu-providers.d.ts +123 -0
  8. package/dist/integrations/eu-providers.js +420 -0
  9. package/dist/integrations/eu-providers.js.map +1 -0
  10. package/dist/integrations/grok.cjs +9 -3
  11. package/dist/integrations/grok.cjs.map +1 -1
  12. package/dist/integrations/grok.js +9 -3
  13. package/dist/integrations/grok.js.map +1 -1
  14. package/dist/integrations/langchain.cjs +26 -7
  15. package/dist/integrations/langchain.cjs.map +1 -1
  16. package/dist/integrations/langchain.js +26 -7
  17. package/dist/integrations/langchain.js.map +1 -1
  18. package/dist/integrations/mistral.cjs +487 -0
  19. package/dist/integrations/mistral.cjs.map +1 -0
  20. package/dist/integrations/mistral.d.cts +133 -0
  21. package/dist/integrations/mistral.d.ts +133 -0
  22. package/dist/integrations/mistral.js +439 -0
  23. package/dist/integrations/mistral.js.map +1 -0
  24. package/dist/integrations/muse.cjs +9 -3
  25. package/dist/integrations/muse.cjs.map +1 -1
  26. package/dist/integrations/muse.js +9 -3
  27. package/dist/integrations/muse.js.map +1 -1
  28. package/dist/integrations/openai.cjs +9 -3
  29. package/dist/integrations/openai.cjs.map +1 -1
  30. package/dist/integrations/openai.d.cts +10 -0
  31. package/dist/integrations/openai.d.ts +10 -0
  32. package/dist/integrations/openai.js +9 -3
  33. package/dist/integrations/openai.js.map +1 -1
  34. package/dist/integrations/openrouter.cjs +9 -3
  35. package/dist/integrations/openrouter.cjs.map +1 -1
  36. package/dist/integrations/openrouter.js +9 -3
  37. package/dist/integrations/openrouter.js.map +1 -1
  38. package/dist/integrations/perplexity.cjs +9 -3
  39. package/dist/integrations/perplexity.cjs.map +1 -1
  40. package/dist/integrations/perplexity.js +9 -3
  41. package/dist/integrations/perplexity.js.map +1 -1
  42. package/package.json +21 -1
@@ -330,13 +330,28 @@ var init_ZodError = __esm({
330
330
  while (i < issue.path.length) {
331
331
  const el = issue.path[i];
332
332
  const terminal = i === issue.path.length - 1;
333
- if (!terminal) {
334
- curr[el] = curr[el] || { _errors: [] };
335
- } else {
336
- curr[el] = curr[el] || { _errors: [] };
337
- curr[el]._errors.push(mapper(issue));
333
+ if (el === "_errors") {
334
+ if (terminal)
335
+ curr._errors.push(mapper(issue));
336
+ i++;
337
+ continue;
338
+ }
339
+ if (!Object.prototype.hasOwnProperty.call(curr, el)) {
340
+ if (el === "__proto__") {
341
+ Object.defineProperty(curr, el, {
342
+ value: { _errors: [] },
343
+ writable: true,
344
+ enumerable: true,
345
+ configurable: true
346
+ });
347
+ } else {
348
+ curr[el] = { _errors: [] };
349
+ }
338
350
  }
339
351
  curr = curr[el];
352
+ if (terminal) {
353
+ curr._errors.push(mapper(issue));
354
+ }
340
355
  i++;
341
356
  }
342
357
  }
@@ -360,7 +375,7 @@ var init_ZodError = __esm({
360
375
  return this.issues.length === 0;
361
376
  }
362
377
  flatten(mapper = (issue) => issue.message) {
363
- const fieldErrors = {};
378
+ const fieldErrors = /* @__PURE__ */ Object.create(null);
364
379
  const formErrors = [];
365
380
  for (const sub of this.issues) {
366
381
  if (sub.path.length > 0) {
@@ -773,7 +788,11 @@ function mergeValues(a, b) {
773
788
  const bKeys = util.objectKeys(b);
774
789
  const sharedKeys = util.objectKeys(a).filter((key) => bKeys.indexOf(key) !== -1);
775
790
  const newObj = { ...a, ...b };
791
+ if (Object.prototype.hasOwnProperty.call(newObj, "__proto__"))
792
+ delete newObj.__proto__;
776
793
  for (const key of sharedKeys) {
794
+ if (key === "__proto__")
795
+ continue;
777
796
  const sharedValue = mergeValues(a[key], b[key]);
778
797
  if (!sharedValue.valid) {
779
798
  return { valid: false };
@@ -1147,7 +1166,7 @@ var init_types = __esm({
1147
1166
  jwtRegex = /^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/;
1148
1167
  durationRegex = /^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/;
1149
1168
  emailRegex = /^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i;
1150
- _emojiRegex = `^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`;
1169
+ _emojiRegex = `^[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$`;
1151
1170
  ipv4Regex = /^(?:(?: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])$/;
1152
1171
  ipv4CidrRegex = /^(?:(?: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])\/(3[0-2]|[12]?[0-9])$/;
1153
1172
  ipv6Regex = /^(([0-9a-fA-F]{1,4}:){7,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}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/;