@mastra/server 1.84.0-alpha.3 → 1.84.0-alpha.5

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 (153) hide show
  1. package/dist/_types/@mastra_schema-compat@1.4.0/dist/_types/@internal_ai-sdk-v5@0.0.96/dist/index.d.ts +61 -2
  2. package/dist/_types/@mastra_schema-compat@1.4.0/dist/_types/@internal_ai-v6@0.0.96/dist/index.d.ts +9 -1
  3. package/dist/{a2a-CY85JalK.js → a2a-By6Kef65.js} +2 -2
  4. package/dist/{a2a-CY85JalK.js.map → a2a-By6Kef65.js.map} +1 -1
  5. package/dist/{a2a-Bz7vRGfF.cjs → a2a-CCYYdrZ1.cjs} +2 -2
  6. package/dist/{a2a-Bz7vRGfF.cjs.map → a2a-CCYYdrZ1.cjs.map} +1 -1
  7. package/dist/{agent-builder-DHqHFO5d.cjs → agent-builder-2Ogqa9-3.cjs} +3 -3
  8. package/dist/{agent-builder-DHqHFO5d.cjs.map → agent-builder-2Ogqa9-3.cjs.map} +1 -1
  9. package/dist/{agent-builder-D9rubwk0.js → agent-builder-Dc6cRAxh.js} +3 -3
  10. package/dist/{agent-builder-D9rubwk0.js.map → agent-builder-Dc6cRAxh.js.map} +1 -1
  11. package/dist/agent-controller-DHzp0yHo.js +1910 -0
  12. package/dist/agent-controller-DHzp0yHo.js.map +1 -0
  13. package/dist/agent-controller-Dwtk-Oi1.cjs +2131 -0
  14. package/dist/agent-controller-Dwtk-Oi1.cjs.map +1 -0
  15. package/dist/{agents-BgaBbcwb.cjs → agents-2HNpgTlJ.cjs} +7 -2
  16. package/dist/agents-2HNpgTlJ.cjs.map +1 -0
  17. package/dist/{agents-BjlUjmb1.js → agents-CEgQ1Sj5.js} +7 -2
  18. package/dist/agents-CEgQ1Sj5.js.map +1 -0
  19. package/dist/{api-schema-manifest-D1A2zfm3.js → api-schema-manifest-C889XFn5.js} +2 -2
  20. package/dist/{api-schema-manifest-D1A2zfm3.js.map → api-schema-manifest-C889XFn5.js.map} +1 -1
  21. package/dist/{api-schema-manifest-AltoM-cn.cjs → api-schema-manifest-Cn9tPyZh.cjs} +2 -2
  22. package/dist/{api-schema-manifest-AltoM-cn.cjs.map → api-schema-manifest-Cn9tPyZh.cjs.map} +1 -1
  23. package/dist/{catalogue-DPLsw3zE.js → catalogue-C2Frc4-i.js} +8 -8
  24. package/dist/{catalogue-DPLsw3zE.js.map → catalogue-C2Frc4-i.js.map} +1 -1
  25. package/dist/{catalogue-BW2a1gu4.cjs → catalogue-COgS_54R.cjs} +8 -8
  26. package/dist/{catalogue-BW2a1gu4.cjs.map → catalogue-COgS_54R.cjs.map} +1 -1
  27. package/dist/{conversations-DYqwqCWH.js → conversations-C9yLrQnn.js} +2 -2
  28. package/dist/{conversations-DYqwqCWH.js.map → conversations-C9yLrQnn.js.map} +1 -1
  29. package/dist/{conversations-Bvk5VVVJ.cjs → conversations-Cqyw1vjS.cjs} +2 -2
  30. package/dist/{conversations-Bvk5VVVJ.cjs.map → conversations-Cqyw1vjS.cjs.map} +1 -1
  31. package/dist/{dist-D2zyg15_.cjs → dist-BgMRdBmR.cjs} +759 -265
  32. package/dist/dist-BgMRdBmR.cjs.map +1 -0
  33. package/dist/{dist-CMgUx8hS.js → dist-BoE65ceB.js} +759 -266
  34. package/dist/dist-BoE65ceB.js.map +1 -0
  35. package/dist/{dist-ToffHjwd.cjs → dist-D4zWd2g_.cjs} +1 -1
  36. package/dist/dist-DLdEfrDl.js +1 -0
  37. package/dist/docs/SKILL.md +1 -1
  38. package/dist/docs/assets/SOURCE_MAP.json +1 -1
  39. package/dist/docs/references/docs-server-mcp.md +2 -2
  40. package/dist/docs/references/reference-server-builtin-mcp-tools.md +13 -13
  41. package/dist/{editor-builder-CGM0scw2.js → editor-builder-Dd10fik0.js} +2 -2
  42. package/dist/{editor-builder-CGM0scw2.js.map → editor-builder-Dd10fik0.js.map} +1 -1
  43. package/dist/{editor-builder-SP_ledm3.cjs → editor-builder-apReuKyj.cjs} +2 -2
  44. package/dist/{editor-builder-SP_ledm3.cjs.map → editor-builder-apReuKyj.cjs.map} +1 -1
  45. package/dist/{memory-0jB2EOKx.js → memory-DS2tEXzG.js} +29 -23
  46. package/dist/memory-DS2tEXzG.js.map +1 -0
  47. package/dist/{memory-Dd7TpDfi.cjs → memory-HiP-vUvS.cjs} +28 -22
  48. package/dist/memory-HiP-vUvS.cjs.map +1 -0
  49. package/dist/{plans-BemJO4-7.js → plans-ByaTWRem.js} +2 -2
  50. package/dist/{plans-BemJO4-7.js.map → plans-ByaTWRem.js.map} +1 -1
  51. package/dist/{plans-CffjV2_6.cjs → plans-CE83TVnK.cjs} +2 -2
  52. package/dist/{plans-CffjV2_6.cjs.map → plans-CE83TVnK.cjs.map} +1 -1
  53. package/dist/{probe-image-size-CxVMV0gk.js → probe-image-size-Bu_nsmG7.js} +2 -2
  54. package/dist/{probe-image-size-CxVMV0gk.js.map → probe-image-size-Bu_nsmG7.js.map} +1 -1
  55. package/dist/{probe-image-size--ACsCqf-.cjs → probe-image-size-CIvA48eX.cjs} +2 -2
  56. package/dist/{probe-image-size--ACsCqf-.cjs.map → probe-image-size-CIvA48eX.cjs.map} +1 -1
  57. package/dist/{responses-D0mb5ubj.cjs → responses-3F7qAgFF.cjs} +2 -2
  58. package/dist/{responses-D0mb5ubj.cjs.map → responses-3F7qAgFF.cjs.map} +1 -1
  59. package/dist/{responses-BofWEQYg.js → responses-kWHiEbrl.js} +2 -2
  60. package/dist/{responses-BofWEQYg.js.map → responses-kWHiEbrl.js.map} +1 -1
  61. package/dist/{routes-CH5SQLu2.js → routes-DGoYe50m.js} +15 -15
  62. package/dist/{routes-CH5SQLu2.js.map → routes-DGoYe50m.js.map} +1 -1
  63. package/dist/{routes-bWCQflz5.cjs → routes-pkh0aVDt.cjs} +51 -51
  64. package/dist/{routes-bWCQflz5.cjs.map → routes-pkh0aVDt.cjs.map} +1 -1
  65. package/dist/{scores-CVssMyoQ.js → scores-B6h7rEBJ.js} +2 -2
  66. package/dist/{scores-CVssMyoQ.js.map → scores-B6h7rEBJ.js.map} +1 -1
  67. package/dist/{scores-0MyV08tL.cjs → scores-BuAYv1Gi.cjs} +2 -2
  68. package/dist/{scores-0MyV08tL.cjs.map → scores-BuAYv1Gi.cjs.map} +1 -1
  69. package/dist/server/handlers/a2a.cjs +1 -1
  70. package/dist/server/handlers/a2a.js +1 -1
  71. package/dist/server/handlers/agent-builder.cjs +1 -1
  72. package/dist/server/handlers/agent-builder.js +1 -1
  73. package/dist/server/handlers/agent-controller.cjs +37 -1793
  74. package/dist/server/handlers/agent-controller.d.ts.map +1 -1
  75. package/dist/server/handlers/agent-controller.js +1 -1758
  76. package/dist/server/handlers/agents.cjs +1 -1
  77. package/dist/server/handlers/agents.d.ts.map +1 -1
  78. package/dist/server/handlers/agents.js +1 -1
  79. package/dist/server/handlers/conversations.cjs +1 -1
  80. package/dist/server/handlers/conversations.js +1 -1
  81. package/dist/server/handlers/editor-builder.cjs +1 -1
  82. package/dist/server/handlers/editor-builder.js +1 -1
  83. package/dist/server/handlers/favorites-enrichment.cjs +1 -1
  84. package/dist/server/handlers/favorites-enrichment.js +1 -1
  85. package/dist/server/handlers/gateway-memory-client.cjs +26 -4
  86. package/dist/server/handlers/gateway-memory-client.cjs.map +1 -1
  87. package/dist/server/handlers/gateway-memory-client.d.ts +14 -2
  88. package/dist/server/handlers/gateway-memory-client.d.ts.map +1 -1
  89. package/dist/server/handlers/gateway-memory-client.js +26 -5
  90. package/dist/server/handlers/gateway-memory-client.js.map +1 -1
  91. package/dist/server/handlers/memory.cjs +1 -1
  92. package/dist/server/handlers/memory.d.ts.map +1 -1
  93. package/dist/server/handlers/memory.js +1 -1
  94. package/dist/server/handlers/plans.cjs +1 -1
  95. package/dist/server/handlers/plans.js +1 -1
  96. package/dist/server/handlers/responses.cjs +1 -1
  97. package/dist/server/handlers/responses.js +1 -1
  98. package/dist/server/handlers/scores.cjs +1 -1
  99. package/dist/server/handlers/scores.js +1 -1
  100. package/dist/server/handlers/stored-agent-favorites.cjs +1 -1
  101. package/dist/server/handlers/stored-agent-favorites.js +1 -1
  102. package/dist/server/handlers/stored-agents.cjs +1 -1
  103. package/dist/server/handlers/stored-agents.js +1 -1
  104. package/dist/server/handlers/stored-skill-favorites.cjs +1 -1
  105. package/dist/server/handlers/stored-skill-favorites.js +1 -1
  106. package/dist/server/handlers/stored-skills.cjs +1 -1
  107. package/dist/server/handlers/stored-skills.js +1 -1
  108. package/dist/server/handlers/system.cjs +1 -1
  109. package/dist/server/handlers/system.js +1 -1
  110. package/dist/server/handlers/tools.cjs +1 -1
  111. package/dist/server/handlers/tools.js +1 -1
  112. package/dist/server/handlers/voice.cjs +1 -1
  113. package/dist/server/handlers/voice.js +1 -1
  114. package/dist/server/handlers/workflows.cjs +1 -1
  115. package/dist/server/handlers/workflows.d.ts +2 -0
  116. package/dist/server/handlers/workflows.d.ts.map +1 -1
  117. package/dist/server/handlers/workflows.js +1 -1
  118. package/dist/server/handlers.cjs +11 -11
  119. package/dist/server/handlers.js +11 -11
  120. package/dist/server/server-adapter/index.cjs +4 -3
  121. package/dist/server/server-adapter/index.js +3 -2
  122. package/dist/server/server-adapter/routes/workflows.d.ts +2 -0
  123. package/dist/server/server-adapter/routes/workflows.d.ts.map +1 -1
  124. package/dist/server/server-adapter/serialize.d.ts +6 -0
  125. package/dist/server/server-adapter/serialize.d.ts.map +1 -1
  126. package/dist/{server-adapter-SLljXCyr.cjs → server-adapter-9QWRzNZI.cjs} +3 -84
  127. package/dist/server-adapter-9QWRzNZI.cjs.map +1 -0
  128. package/dist/{server-adapter-B3kR1OJs.js → server-adapter-CB8qI6YQ.js} +4 -79
  129. package/dist/server-adapter-CB8qI6YQ.js.map +1 -0
  130. package/dist/{tools-oHRh4msa.js → tools-BuFpB7Lk.js} +2 -2
  131. package/dist/{tools-oHRh4msa.js.map → tools-BuFpB7Lk.js.map} +1 -1
  132. package/dist/{tools-CawMeeZg.cjs → tools-C_6yXAww.cjs} +2 -2
  133. package/dist/{tools-CawMeeZg.cjs.map → tools-C_6yXAww.cjs.map} +1 -1
  134. package/dist/{voice-Dk0O5mVD.cjs → voice-ByiFiTmK.cjs} +2 -2
  135. package/dist/{voice-Dk0O5mVD.cjs.map → voice-ByiFiTmK.cjs.map} +1 -1
  136. package/dist/{voice-C6bAqs79.js → voice-DOV0tU_V.js} +2 -2
  137. package/dist/{voice-C6bAqs79.js.map → voice-DOV0tU_V.js.map} +1 -1
  138. package/dist/{workflows-B-QJ0Tnv.js → workflows-9Q28sHTz.js} +5 -3
  139. package/dist/{workflows-B-QJ0Tnv.js.map → workflows-9Q28sHTz.js.map} +1 -1
  140. package/dist/{workflows-CwkEHIKW.cjs → workflows-DhmriYvN.cjs} +5 -3
  141. package/dist/{workflows-CwkEHIKW.cjs.map → workflows-DhmriYvN.cjs.map} +1 -1
  142. package/package.json +5 -5
  143. package/dist/agents-BgaBbcwb.cjs.map +0 -1
  144. package/dist/agents-BjlUjmb1.js.map +0 -1
  145. package/dist/dist-CMgUx8hS.js.map +0 -1
  146. package/dist/dist-D2zyg15_.cjs.map +0 -1
  147. package/dist/dist-HNpJc8bT.js +0 -1
  148. package/dist/memory-0jB2EOKx.js.map +0 -1
  149. package/dist/memory-Dd7TpDfi.cjs.map +0 -1
  150. package/dist/server/handlers/agent-controller.cjs.map +0 -1
  151. package/dist/server/handlers/agent-controller.js.map +0 -1
  152. package/dist/server-adapter-B3kR1OJs.js.map +0 -1
  153. package/dist/server-adapter-SLljXCyr.cjs.map +0 -1
@@ -27,6 +27,8 @@ let path = require("path");
27
27
  let crypto$1 = require("crypto");
28
28
  let module$1 = require("module");
29
29
  let zod_v4_core = require("zod/v4/core");
30
+ let zod_v4_locales_en_js = require("zod/v4/locales/en.js");
31
+ zod_v4_locales_en_js = require_rolldown_runtime.__toESM(zod_v4_locales_en_js, 1);
30
32
  let diagnostics_channel = require("diagnostics_channel");
31
33
  let async_hooks = require("async_hooks");
32
34
  let child_process = require("child_process");
@@ -8654,7 +8656,7 @@ function splitLines(text) {
8654
8656
  else result.push(result.pop().slice(0, -1));
8655
8657
  return result;
8656
8658
  }
8657
- // ../memory/dist/src-Xhctgeae.js
8659
+ // ../memory/dist/src-BkElV36S.js
8658
8660
  var __defProp$3 = Object.defineProperty;
8659
8661
  var __exportAll = (all, no_symbols) => {
8660
8662
  let target = {};
@@ -11407,8 +11409,8 @@ var UnsupportedModelVersionError$3 = class extends AISDKError$3 {
11407
11409
  }
11408
11410
  };
11409
11411
  var name$21 = "AI_InvalidArgumentError";
11410
- var marker$10 = `vercel.ai.error.${name$21}`;
11411
- var symbol$12 = Symbol.for(marker$10);
11412
+ var marker$20 = `vercel.ai.error.${name$21}`;
11413
+ var symbol$24 = Symbol.for(marker$20);
11412
11414
  var _a$6;
11413
11415
  var InvalidArgumentError$6 = class extends AISDKError$3 {
11414
11416
  constructor({ parameter, value, message }) {
@@ -11421,10 +11423,10 @@ var InvalidArgumentError$6 = class extends AISDKError$3 {
11421
11423
  this.value = value;
11422
11424
  }
11423
11425
  static isInstance(error) {
11424
- return AISDKError$3.hasMarker(error, marker$10);
11426
+ return AISDKError$3.hasMarker(error, marker$20);
11425
11427
  }
11426
11428
  };
11427
- _a$6 = symbol$12;
11429
+ _a$6 = symbol$24;
11428
11430
  var name2$6 = "AI_RetryError";
11429
11431
  var marker2$6 = `vercel.ai.error.${name2$6}`;
11430
11432
  var symbol2$6 = Symbol.for(marker2$6);
@@ -12314,11 +12316,11 @@ function trimStartOfStream() {
12314
12316
  return text2;
12315
12317
  };
12316
12318
  }
12317
- var marker$1$16 = "vercel.ai.error";
12318
- var symbol$1$17 = Symbol.for(marker$1$16);
12319
+ var marker$1$11 = "vercel.ai.error";
12320
+ var symbol$1$21 = Symbol.for(marker$1$11);
12319
12321
  var _a$1$2;
12320
12322
  var _b$1$4;
12321
- var AISDKError$2 = class _AISDKError extends (_b$1$4 = Error, _a$1$2 = symbol$1$17, _b$1$4) {
12323
+ var AISDKError$2 = class _AISDKError extends (_b$1$4 = Error, _a$1$2 = symbol$1$21, _b$1$4) {
12322
12324
  /**
12323
12325
  * Creates an AI SDK Error.
12324
12326
  *
@@ -12339,22 +12341,22 @@ var AISDKError$2 = class _AISDKError extends (_b$1$4 = Error, _a$1$2 = symbol$1$
12339
12341
  * @returns {boolean} True if the error is an AI SDK Error, false otherwise.
12340
12342
  */
12341
12343
  static isInstance(error) {
12342
- return _AISDKError.hasMarker(error, marker$1$16);
12344
+ return _AISDKError.hasMarker(error, marker$1$11);
12343
12345
  }
12344
12346
  static hasMarker(error, marker15) {
12345
12347
  const markerSymbol = Symbol.for(marker15);
12346
12348
  return error != null && typeof error === "object" && markerSymbol in error && typeof error[markerSymbol] === "boolean" && error[markerSymbol] === true;
12347
12349
  }
12348
12350
  };
12349
- var name$1$15 = "AI_APICallError";
12350
- var marker2$5 = `vercel.ai.error.${name$1$15}`;
12351
+ var name$1$19 = "AI_APICallError";
12352
+ var marker2$5 = `vercel.ai.error.${name$1$19}`;
12351
12353
  var symbol2$5 = Symbol.for(marker2$5);
12352
12354
  var _a2$5;
12353
12355
  var _b2$3;
12354
12356
  var APICallError$2 = class extends (_b2$3 = AISDKError$2, _a2$5 = symbol2$5, _b2$3) {
12355
12357
  constructor({ message, url, requestBodyValues, statusCode, responseHeaders, responseBody, cause, isRetryable = statusCode != null && (statusCode === 408 || statusCode === 409 || statusCode === 429 || statusCode >= 500), data }) {
12356
12358
  super({
12357
- name: name$1$15,
12359
+ name: name$1$19,
12358
12360
  message,
12359
12361
  cause
12360
12362
  });
@@ -12693,15 +12695,15 @@ function createAbortError$2() {
12693
12695
  function extractResponseHeaders$2(response) {
12694
12696
  return Object.fromEntries([...response.headers]);
12695
12697
  }
12696
- var name$15 = "AI_DownloadError";
12697
- var marker$20 = `vercel.ai.error.${name$15}`;
12698
- var symbol$24 = Symbol.for(marker$20);
12698
+ var name$20 = "AI_DownloadError";
12699
+ var marker$17 = `vercel.ai.error.${name$20}`;
12700
+ var symbol$22 = Symbol.for(marker$17);
12699
12701
  var _a$5;
12700
12702
  var _b$5;
12701
- var DownloadError$2 = class extends (_b$5 = AISDKError$2, _a$5 = symbol$24, _b$5) {
12703
+ var DownloadError$2 = class extends (_b$5 = AISDKError$2, _a$5 = symbol$22, _b$5) {
12702
12704
  constructor({ url, statusCode, statusText, cause, message = cause == null ? `Failed to download ${url}: ${statusCode} ${statusText}` : `Failed to download ${url}: ${cause}` }) {
12703
12705
  super({
12704
- name: name$15,
12706
+ name: name$20,
12705
12707
  message,
12706
12708
  cause
12707
12709
  });
@@ -12711,7 +12713,7 @@ var DownloadError$2 = class extends (_b$5 = AISDKError$2, _a$5 = symbol$24, _b$5
12711
12713
  this.statusText = statusText;
12712
12714
  }
12713
12715
  static isInstance(error) {
12714
- return AISDKError$2.hasMarker(error, marker$20);
12716
+ return AISDKError$2.hasMarker(error, marker$17);
12715
12717
  }
12716
12718
  };
12717
12719
  var EMBEDDING_MODEL_MAX_INPUT_BYTES_PER_CALL$2 = /* @__PURE__ */ Symbol.for("vercel.ai.embeddingModel.maxInputBytesPerCall");
@@ -12721,6 +12723,247 @@ async function cancelResponseBody$2(response) {
12721
12723
  await ((_a2 = response.body) == null ? void 0 : _a2.cancel());
12722
12724
  } catch (e) {}
12723
12725
  }
12726
+ function isBrowserRuntime$2(globalThisAny = globalThis) {
12727
+ return globalThisAny.window != null;
12728
+ }
12729
+ function isSameOrigin$2(url, baseUrl) {
12730
+ try {
12731
+ return new URL(url).origin === new URL(baseUrl).origin;
12732
+ } catch (e) {
12733
+ return false;
12734
+ }
12735
+ }
12736
+ function validateDownloadUrl$2(url) {
12737
+ let parsed;
12738
+ try {
12739
+ parsed = new URL(url);
12740
+ } catch (e) {
12741
+ throw new DownloadError$2({
12742
+ url,
12743
+ message: `Invalid URL: ${url}`
12744
+ });
12745
+ }
12746
+ if (parsed.protocol === "data:") return;
12747
+ if (parsed.protocol !== "http:" && parsed.protocol !== "https:") throw new DownloadError$2({
12748
+ url,
12749
+ message: `URL scheme must be http, https, or data, got ${parsed.protocol}`
12750
+ });
12751
+ const hostname = parsed.hostname.toLowerCase().replace(/\.+$/, "");
12752
+ if (!hostname) throw new DownloadError$2({
12753
+ url,
12754
+ message: `URL must have a hostname`
12755
+ });
12756
+ if (hostname === "localhost" || hostname.endsWith(".local") || hostname.endsWith(".localhost") || hostname.endsWith(".internal")) throw new DownloadError$2({
12757
+ url,
12758
+ message: `URL with hostname ${hostname} is not allowed`
12759
+ });
12760
+ if (hostname.startsWith("[") && hostname.endsWith("]")) {
12761
+ if (isPrivateIPv6$2(hostname.slice(1, -1))) throw new DownloadError$2({
12762
+ url,
12763
+ message: `URL with IPv6 address ${hostname} is not allowed`
12764
+ });
12765
+ return;
12766
+ }
12767
+ if (isIPv4$2(hostname)) {
12768
+ if (isPrivateIPv4$2(hostname)) throw new DownloadError$2({
12769
+ url,
12770
+ message: `URL with IP address ${hostname} is not allowed`
12771
+ });
12772
+ }
12773
+ }
12774
+ function validateDownloadAddress$1({ address, family, hostname }) {
12775
+ if (family === 4 ? !isIPv4$2(address) || isPrivateIPv4$2(address) : family === 6 ? isPrivateIPv6$2(address) : true) throw new DownloadError$2({
12776
+ url: hostname,
12777
+ message: `Hostname ${hostname} resolved to disallowed IP address ${address}`
12778
+ });
12779
+ }
12780
+ function isIPv4$2(hostname) {
12781
+ const parts = hostname.split(".");
12782
+ if (parts.length !== 4) return false;
12783
+ return parts.every((part) => {
12784
+ const num = Number(part);
12785
+ return Number.isInteger(num) && num >= 0 && num <= 255 && String(num) === part;
12786
+ });
12787
+ }
12788
+ function isPrivateIPv4$2(ip) {
12789
+ const [a, b, c] = ip.split(".").map(Number);
12790
+ if (a === 0) return true;
12791
+ if (a === 10) return true;
12792
+ if (a === 100 && b >= 64 && b <= 127) return true;
12793
+ if (a === 127) return true;
12794
+ if (a === 169 && b === 254) return true;
12795
+ if (a === 172 && b >= 16 && b <= 31) return true;
12796
+ if (a === 192 && b === 0 && c === 0) return true;
12797
+ if (a === 192 && b === 168) return true;
12798
+ if (a === 198 && (b === 18 || b === 19)) return true;
12799
+ if (a >= 240) return true;
12800
+ return false;
12801
+ }
12802
+ function parseIPv6$2(ip) {
12803
+ let address = ip.toLowerCase();
12804
+ const zoneIndex = address.indexOf("%");
12805
+ if (zoneIndex !== -1) address = address.slice(0, zoneIndex);
12806
+ const halves = address.split("::");
12807
+ if (halves.length > 2) return null;
12808
+ const toGroups = (segment) => {
12809
+ if (segment === "") return [];
12810
+ const groups = [];
12811
+ const parts = segment.split(":");
12812
+ for (let i = 0; i < parts.length; i++) {
12813
+ const part = parts[i];
12814
+ if (part.includes(".")) {
12815
+ if (i !== parts.length - 1 || !isIPv4$2(part)) return null;
12816
+ const [a, b, c, d] = part.split(".").map(Number);
12817
+ groups.push(a << 8 | b, c << 8 | d);
12818
+ continue;
12819
+ }
12820
+ if (!/^[0-9a-f]{1,4}$/.test(part)) return null;
12821
+ groups.push(parseInt(part, 16));
12822
+ }
12823
+ return groups;
12824
+ };
12825
+ const head = toGroups(halves[0]);
12826
+ if (head === null) return null;
12827
+ if (halves.length === 2) {
12828
+ const tail = toGroups(halves[1]);
12829
+ if (tail === null) return null;
12830
+ const fill = 8 - head.length - tail.length;
12831
+ if (fill < 0) return null;
12832
+ return [
12833
+ ...head,
12834
+ ...new Array(fill).fill(0),
12835
+ ...tail
12836
+ ];
12837
+ }
12838
+ return head.length === 8 ? head : null;
12839
+ }
12840
+ function isPrivateIPv6$2(ip) {
12841
+ const groups = parseIPv6$2(ip);
12842
+ if (groups === null) return true;
12843
+ const topZero = (count) => groups.slice(0, count).every((group) => group === 0);
12844
+ if (topZero(7) && (groups[7] === 0 || groups[7] === 1)) return true;
12845
+ if ((groups[0] & 65024) === 64512) return true;
12846
+ if ((groups[0] & 65472) === 65152) return true;
12847
+ if ((groups[0] & 65472) === 65216) return true;
12848
+ if ((groups[0] & 65280) === 65280) return true;
12849
+ if (topZero(6) || topZero(5) && groups[5] === 65535 || topZero(4) && groups[4] === 65535 && groups[5] === 0 || groups[0] === 100 && groups[1] === 65435 && groups[2] === 0 && groups[3] === 0 && groups[4] === 0 && groups[5] === 0 || groups[0] === 100 && groups[1] === 65435 && groups[2] === 1) return isPrivateIPv4$2(`${groups[6] >> 8 & 255}.${groups[6] & 255}.${groups[7] >> 8 & 255}.${groups[7] & 255}`);
12850
+ return false;
12851
+ }
12852
+ function createSafeLookup$1(lookup) {
12853
+ return ((hostname, options, callback) => {
12854
+ lookup(hostname, {
12855
+ ...options,
12856
+ all: true
12857
+ }, (error, addresses) => {
12858
+ if (error) {
12859
+ callback(error);
12860
+ return;
12861
+ }
12862
+ try {
12863
+ const [firstAddress] = addresses;
12864
+ if (firstAddress == null) throw new Error(`Hostname ${hostname} did not resolve to an address`);
12865
+ for (const { address, family } of addresses) validateDownloadAddress$1({
12866
+ address,
12867
+ family,
12868
+ hostname
12869
+ });
12870
+ if (options.all === true) callback(null, addresses);
12871
+ else callback(null, firstAddress.address, firstAddress.family);
12872
+ } catch (error2) {
12873
+ callback(error2 instanceof Error ? error2 : new Error(String(error2)));
12874
+ }
12875
+ });
12876
+ });
12877
+ }
12878
+ var safeNodeFetchPromise$1;
12879
+ function isNodeRuntime$2() {
12880
+ var _a2, _b2, _c;
12881
+ const runtimeProcess = globalThis.process;
12882
+ return ((_a2 = runtimeProcess == null ? void 0 : runtimeProcess.release) == null ? void 0 : _a2.name) === "node" && ((_b2 = runtimeProcess.versions) == null ? void 0 : _b2.bun) == null && ((_c = runtimeProcess.versions) == null ? void 0 : _c.deno) == null && runtimeProcess.title !== "workerd" && globalThis.EdgeRuntime == null;
12883
+ }
12884
+ async function getDefaultDownloadFetch$1() {
12885
+ if (!isNodeRuntime$2()) return globalThis.fetch;
12886
+ return safeNodeFetchPromise$1 != null ? safeNodeFetchPromise$1 : safeNodeFetchPromise$1 = createSafeNodeFetch$1();
12887
+ }
12888
+ async function createSafeNodeFetch$1() {
12889
+ const [module, { lookup }] = await Promise.all([loadNodeModule$1("node:module"), loadNodeModule$1("node:dns")]);
12890
+ const { Agent, fetch } = module.createRequire(getCurrentModulePath$1())("undici");
12891
+ const dispatcher = new Agent({ connect: { lookup: createSafeLookup$1(lookup) } });
12892
+ return ((input, init) => fetch(input, {
12893
+ ...init,
12894
+ dispatcher
12895
+ }));
12896
+ }
12897
+ async function loadNodeModule$1(id) {
12898
+ var _a2;
12899
+ const processWithBuiltins = globalThis.process;
12900
+ const builtinModule = (_a2 = processWithBuiltins == null ? void 0 : processWithBuiltins.getBuiltinModule) == null ? void 0 : _a2.call(processWithBuiltins, id);
12901
+ return builtinModule == null ? await importNodeModule(id) : builtinModule;
12902
+ }
12903
+ function importNodeModule(id) {
12904
+ return import(id);
12905
+ }
12906
+ function getCurrentModulePath$1() {
12907
+ const originalPrepareStackTrace = Error.prepareStackTrace;
12908
+ try {
12909
+ Error.prepareStackTrace = (_error, callSites) => callSites;
12910
+ const error = /* @__PURE__ */ new Error("Capture current module path");
12911
+ Error.captureStackTrace(error, getCurrentModulePath$1);
12912
+ const [caller] = error.stack;
12913
+ const fileName = caller == null ? void 0 : caller.getFileName();
12914
+ if (fileName == null) throw new Error("Unable to determine the current module path");
12915
+ return fileName;
12916
+ } finally {
12917
+ Error.prepareStackTrace = originalPrepareStackTrace;
12918
+ }
12919
+ }
12920
+ var MAX_DOWNLOAD_REDIRECTS$2 = 10;
12921
+ async function getValidatedFetch$1(customFetch) {
12922
+ return customFetch == null || customFetch === globalThis.fetch ? await getDefaultDownloadFetch$1() : customFetch;
12923
+ }
12924
+ async function fetchWithValidatedRedirects$2({ url, headers, abortSignal, maxRedirects = MAX_DOWNLOAD_REDIRECTS$2, fetch: customFetch, trustedOrigin }) {
12925
+ var _a2;
12926
+ let currentHeaders = headers === void 0 ? void 0 : new Headers(headers);
12927
+ const perHopInit = (redirect) => ({
12928
+ signal: abortSignal,
12929
+ redirect,
12930
+ ...currentHeaders === void 0 ? {} : { headers: new Headers(currentHeaders) }
12931
+ });
12932
+ let currentUrl = url;
12933
+ for (let redirectCount = 0; redirectCount <= maxRedirects; redirectCount++) {
12934
+ const isTrustedHop = trustedOrigin !== void 0 && isSameOrigin$2(currentUrl, trustedOrigin);
12935
+ if (!isTrustedHop) validateDownloadUrl$2(currentUrl);
12936
+ const fetch = isTrustedHop && customFetch != null ? customFetch : isTrustedHop ? globalThis.fetch : await getValidatedFetch$1(customFetch);
12937
+ const response = await fetch(currentUrl, perHopInit("manual"));
12938
+ if (response.type === "opaqueredirect") {
12939
+ if (!isBrowserRuntime$2()) throw new DownloadError$2({
12940
+ url,
12941
+ message: `Redirect from ${currentUrl} could not be validated and was blocked`
12942
+ });
12943
+ return await fetch(currentUrl, perHopInit("follow"));
12944
+ }
12945
+ const location = (_a2 = response.headers) == null ? void 0 : _a2.get("location");
12946
+ if (response.status >= 300 && response.status < 400 && location) {
12947
+ cancelResponseBody$2(response);
12948
+ const nextUrl = new URL(location, currentUrl).toString();
12949
+ if (new URL(currentUrl).protocol === "https:" && new URL(nextUrl).protocol === "http:") throw new DownloadError$2({
12950
+ url,
12951
+ message: "Redirect from HTTPS to HTTP was blocked"
12952
+ });
12953
+ if (currentHeaders !== void 0 && !isSameOrigin$2(nextUrl, currentUrl)) {
12954
+ const userAgent = currentHeaders.get("user-agent");
12955
+ currentHeaders = new Headers(userAgent == null ? void 0 : { "user-agent": userAgent });
12956
+ }
12957
+ currentUrl = nextUrl;
12958
+ continue;
12959
+ }
12960
+ return response;
12961
+ }
12962
+ throw new DownloadError$2({
12963
+ url,
12964
+ message: `Too many redirects (max ${maxRedirects})`
12965
+ });
12966
+ }
12724
12967
  var DEFAULT_MAX_DOWNLOAD_SIZE$2 = 2147483648;
12725
12968
  async function readResponseWithSizeLimit$2({ response, url, maxBytes = DEFAULT_MAX_DOWNLOAD_SIZE$2 }) {
12726
12969
  const contentLength = response.headers.get("content-length");
@@ -12874,13 +13117,21 @@ function withUserAgentSuffix$2(headers, ...userAgentSuffixParts) {
12874
13117
  normalizedHeaders.set("user-agent", [currentUserAgentHeader, ...userAgentSuffixParts].filter(Boolean).join(" "));
12875
13118
  return Object.fromEntries(normalizedHeaders.entries());
12876
13119
  }
12877
- var VERSION$8 = "3.0.44";
13120
+ var VERSION$8 = "3.0.46";
12878
13121
  var getOriginalFetch$3 = () => globalThis.fetch;
12879
- var getFromApi$2 = async ({ url, headers = {}, successfulResponseHandler, failedResponseHandler, abortSignal, fetch = getOriginalFetch$3() }) => {
13122
+ var getFromApi$2 = async ({ url, headers = {}, successfulResponseHandler, failedResponseHandler, abortSignal, fetch, validateUrl, credentialedOrigin, trustedOrigin }) => {
12880
13123
  try {
12881
- const response = await fetch(url, {
13124
+ const requestFetch = fetch != null ? fetch : getOriginalFetch$3();
13125
+ const requestHeaders = withUserAgentSuffix$2(credentialedOrigin !== void 0 && !isSameOrigin$2(url, credentialedOrigin) ? {} : headers, `ai-sdk/provider-utils/${VERSION$8}`, getRuntimeEnvironmentUserAgent$2());
13126
+ const response = validateUrl ? await fetchWithValidatedRedirects$2({
13127
+ url,
13128
+ headers: requestHeaders,
13129
+ abortSignal,
13130
+ fetch,
13131
+ trustedOrigin
13132
+ }) : await requestFetch(url, {
12882
13133
  method: "GET",
12883
- headers: withUserAgentSuffix$2(headers, `ai-sdk/provider-utils/${VERSION$8}`, getRuntimeEnvironmentUserAgent$2()),
13134
+ headers: requestHeaders,
12884
13135
  signal: abortSignal
12885
13136
  });
12886
13137
  const responseHeaders = extractResponseHeaders$2(response);
@@ -14322,10 +14573,10 @@ async function getVercelOidcToken$2() {
14322
14573
  if (process.env.VERCEL_OIDC_TOKEN) return process.env.VERCEL_OIDC_TOKEN ?? "";
14323
14574
  throw new Error("@vercel/oidc is not available in the vendored @internal AI packages. Provide an API key instead.");
14324
14575
  }
14325
- var symbol$15 = Symbol.for("vercel.ai.gateway.error");
14576
+ var symbol$21 = Symbol.for("vercel.ai.gateway.error");
14326
14577
  var _a$4;
14327
14578
  var _b$3;
14328
- var GatewayError$2 = class _GatewayError extends (_b$3 = Error, _a$4 = symbol$15, _b$3) {
14579
+ var GatewayError$2 = class _GatewayError extends (_b$3 = Error, _a$4 = symbol$21, _b$3) {
14329
14580
  constructor({ message, statusCode = 500, cause, isRetryable = statusCode != null && (statusCode === 408 || statusCode === 409 || statusCode === 429 || statusCode >= 500) }) {
14330
14581
  super(message);
14331
14582
  this[_a$4] = true;
@@ -14342,11 +14593,11 @@ var GatewayError$2 = class _GatewayError extends (_b$3 = Error, _a$4 = symbol$15
14342
14593
  return _GatewayError.hasMarker(error);
14343
14594
  }
14344
14595
  static hasMarker(error) {
14345
- return typeof error === "object" && error !== null && symbol$15 in error && error[symbol$15] === true;
14596
+ return typeof error === "object" && error !== null && symbol$21 in error && error[symbol$21] === true;
14346
14597
  }
14347
14598
  };
14348
- var name$10 = "GatewayAuthenticationError";
14349
- var marker2$4 = `vercel.ai.gateway.error.${name$10}`;
14599
+ var name$19 = "GatewayAuthenticationError";
14600
+ var marker2$4 = `vercel.ai.gateway.error.${name$19}`;
14350
14601
  var symbol2$4 = Symbol.for(marker2$4);
14351
14602
  var _a2$4;
14352
14603
  var _b2$2;
@@ -14358,7 +14609,7 @@ var GatewayAuthenticationError$2 = class _GatewayAuthenticationError extends (_b
14358
14609
  cause
14359
14610
  });
14360
14611
  this[_a2$4] = true;
14361
- this.name = name$10;
14612
+ this.name = name$19;
14362
14613
  this.type = "authentication_error";
14363
14614
  }
14364
14615
  static isInstance(error) {
@@ -17234,11 +17485,11 @@ var object$2 = ({ schema: inputSchema }) => {
17234
17485
  }
17235
17486
  };
17236
17487
  };
17237
- var marker$1$14 = "vercel.ai.error";
17238
- var symbol$1$15 = Symbol.for(marker$1$14);
17488
+ var marker$1$10 = "vercel.ai.error";
17489
+ var symbol$1$13 = Symbol.for(marker$1$10);
17239
17490
  var _a$1$1;
17240
17491
  var _b$1$1;
17241
- var AISDKError$1 = class _AISDKError extends (_b$1$1 = Error, _a$1$1 = symbol$1$15, _b$1$1) {
17492
+ var AISDKError$1 = class _AISDKError extends (_b$1$1 = Error, _a$1$1 = symbol$1$13, _b$1$1) {
17242
17493
  /**
17243
17494
  * Creates an AI SDK Error.
17244
17495
  *
@@ -17259,22 +17510,22 @@ var AISDKError$1 = class _AISDKError extends (_b$1$1 = Error, _a$1$1 = symbol$1$
17259
17510
  * @returns {boolean} True if the error is an AI SDK Error, false otherwise.
17260
17511
  */
17261
17512
  static isInstance(error) {
17262
- return _AISDKError.hasMarker(error, marker$1$14);
17513
+ return _AISDKError.hasMarker(error, marker$1$10);
17263
17514
  }
17264
17515
  static hasMarker(error, marker15) {
17265
17516
  const markerSymbol = Symbol.for(marker15);
17266
17517
  return error != null && typeof error === "object" && markerSymbol in error && typeof error[markerSymbol] === "boolean" && error[markerSymbol] === true;
17267
17518
  }
17268
17519
  };
17269
- var name$1$14 = "AI_APICallError";
17270
- var marker2$2 = `vercel.ai.error.${name$1$14}`;
17520
+ var name$1$10 = "AI_APICallError";
17521
+ var marker2$2 = `vercel.ai.error.${name$1$10}`;
17271
17522
  var symbol2$2 = Symbol.for(marker2$2);
17272
17523
  var _a2$2;
17273
17524
  var _b2$1;
17274
17525
  var APICallError$1 = class extends (_b2$1 = AISDKError$1, _a2$2 = symbol2$2, _b2$1) {
17275
17526
  constructor({ message, url, requestBodyValues, statusCode, responseHeaders, responseBody, cause, isRetryable = statusCode != null && (statusCode === 408 || statusCode === 409 || statusCode === 429 || statusCode >= 500), data }) {
17276
17527
  super({
17277
- name: name$1$14,
17528
+ name: name$1$10,
17278
17529
  message,
17279
17530
  cause
17280
17531
  });
@@ -17657,15 +17908,15 @@ async function cancelResponseBody$1(response) {
17657
17908
  await ((_a2 = response.body) == null ? void 0 : _a2.cancel());
17658
17909
  } catch (e) {}
17659
17910
  }
17660
- var name$19 = "AI_DownloadError";
17661
- var marker$15 = `vercel.ai.error.${name$19}`;
17662
- var symbol$21 = Symbol.for(marker$15);
17911
+ var name$14 = "AI_DownloadError";
17912
+ var marker$13 = `vercel.ai.error.${name$14}`;
17913
+ var symbol$17 = Symbol.for(marker$13);
17663
17914
  var _a$2;
17664
17915
  var _b$2;
17665
- var DownloadError$1 = class extends (_b$2 = AISDKError$1, _a$2 = symbol$21, _b$2) {
17916
+ var DownloadError$1 = class extends (_b$2 = AISDKError$1, _a$2 = symbol$17, _b$2) {
17666
17917
  constructor({ url, statusCode, statusText, cause, message = cause == null ? `Failed to download ${url}: ${statusCode} ${statusText}` : `Failed to download ${url}: ${cause}` }) {
17667
17918
  super({
17668
- name: name$19,
17919
+ name: name$14,
17669
17920
  message,
17670
17921
  cause
17671
17922
  });
@@ -17675,7 +17926,7 @@ var DownloadError$1 = class extends (_b$2 = AISDKError$1, _a$2 = symbol$21, _b$2
17675
17926
  this.statusText = statusText;
17676
17927
  }
17677
17928
  static isInstance(error) {
17678
- return AISDKError$1.hasMarker(error, marker$15);
17929
+ return AISDKError$1.hasMarker(error, marker$13);
17679
17930
  }
17680
17931
  };
17681
17932
  function isBrowserRuntime$1(globalThisAny = globalThis) {
@@ -17726,7 +17977,7 @@ function validateDownloadUrl$1(url) {
17726
17977
  });
17727
17978
  }
17728
17979
  }
17729
- function validateDownloadAddress$1({ address, family, hostname }) {
17980
+ function validateDownloadAddress({ address, family, hostname }) {
17730
17981
  if (family === 4 ? !isIPv4$1(address) || isPrivateIPv4$1(address) : family === 6 ? isPrivateIPv6$1(address) : true) throw new DownloadError$1({
17731
17982
  url: hostname,
17732
17983
  message: `Hostname ${hostname} resolved to disallowed IP address ${address}`
@@ -17804,7 +18055,7 @@ function isPrivateIPv6$1(ip) {
17804
18055
  if (topZero(6) || topZero(5) && groups[5] === 65535 || topZero(4) && groups[4] === 65535 && groups[5] === 0 || groups[0] === 100 && groups[1] === 65435 && groups[2] === 0 && groups[3] === 0 && groups[4] === 0 && groups[5] === 0 || groups[0] === 100 && groups[1] === 65435 && groups[2] === 1) return isPrivateIPv4$1(`${groups[6] >> 8 & 255}.${groups[6] & 255}.${groups[7] >> 8 & 255}.${groups[7] & 255}`);
17805
18056
  return false;
17806
18057
  }
17807
- function createSafeLookup$1(lookup) {
18058
+ function createSafeLookup(lookup) {
17808
18059
  return ((hostname, options, callback) => {
17809
18060
  lookup(hostname, {
17810
18061
  ...options,
@@ -17817,7 +18068,7 @@ function createSafeLookup$1(lookup) {
17817
18068
  try {
17818
18069
  const [firstAddress] = addresses;
17819
18070
  if (firstAddress == null) throw new Error(`Hostname ${hostname} did not resolve to an address`);
17820
- for (const { address, family } of addresses) validateDownloadAddress$1({
18071
+ for (const { address, family } of addresses) validateDownloadAddress({
17821
18072
  address,
17822
18073
  family,
17823
18074
  hostname
@@ -17830,20 +18081,20 @@ function createSafeLookup$1(lookup) {
17830
18081
  });
17831
18082
  });
17832
18083
  }
17833
- var safeNodeFetchPromise$1;
17834
- function isNodeRuntime$2() {
18084
+ var safeNodeFetchPromise;
18085
+ function isNodeRuntime$1() {
17835
18086
  var _a2, _b2, _c;
17836
18087
  const runtimeProcess = globalThis.process;
17837
18088
  return ((_a2 = runtimeProcess == null ? void 0 : runtimeProcess.release) == null ? void 0 : _a2.name) === "node" && ((_b2 = runtimeProcess.versions) == null ? void 0 : _b2.bun) == null && ((_c = runtimeProcess.versions) == null ? void 0 : _c.deno) == null && runtimeProcess.title !== "workerd" && globalThis.EdgeRuntime == null;
17838
18089
  }
17839
- async function getDefaultDownloadFetch$1() {
17840
- if (!isNodeRuntime$2()) return globalThis.fetch;
17841
- return safeNodeFetchPromise$1 != null ? safeNodeFetchPromise$1 : safeNodeFetchPromise$1 = createSafeNodeFetch$1();
18090
+ async function getDefaultDownloadFetch() {
18091
+ if (!isNodeRuntime$1()) return globalThis.fetch;
18092
+ return safeNodeFetchPromise != null ? safeNodeFetchPromise : safeNodeFetchPromise = createSafeNodeFetch();
17842
18093
  }
17843
- async function createSafeNodeFetch$1() {
18094
+ async function createSafeNodeFetch() {
17844
18095
  const [module, { lookup }] = await Promise.all([loadNodeModule("node:module"), loadNodeModule("node:dns")]);
17845
- const { Agent, fetch } = module.createRequire(getCurrentModulePath$1())("undici");
17846
- const dispatcher = new Agent({ connect: { lookup: createSafeLookup$1(lookup) } });
18096
+ const { Agent, fetch } = module.createRequire(getCurrentModulePath())("undici");
18097
+ const dispatcher = new Agent({ connect: { lookup: createSafeLookup(lookup) } });
17847
18098
  return ((input, init) => fetch(input, {
17848
18099
  ...init,
17849
18100
  dispatcher
@@ -17856,12 +18107,12 @@ async function loadNodeModule(id) {
17856
18107
  if (builtinModule == null) throw new Error(`Node.js built-in module ${id} is unavailable`);
17857
18108
  return builtinModule;
17858
18109
  }
17859
- function getCurrentModulePath$1() {
18110
+ function getCurrentModulePath() {
17860
18111
  const originalPrepareStackTrace = Error.prepareStackTrace;
17861
18112
  try {
17862
18113
  Error.prepareStackTrace = (_error, callSites) => callSites;
17863
18114
  const error = /* @__PURE__ */ new Error("Capture current module path");
17864
- Error.captureStackTrace(error, getCurrentModulePath$1);
18115
+ Error.captureStackTrace(error, getCurrentModulePath);
17865
18116
  const [caller] = error.stack;
17866
18117
  const fileName = caller == null ? void 0 : caller.getFileName();
17867
18118
  if (fileName == null) throw new Error("Unable to determine the current module path");
@@ -17905,8 +18156,8 @@ var REDIRECT_STATUS_CODES$1 = /* @__PURE__ */ new Set([
17905
18156
  307,
17906
18157
  308
17907
18158
  ]);
17908
- async function getValidatedFetch$1(customFetch) {
17909
- return customFetch == null || customFetch === globalThis.fetch ? await getDefaultDownloadFetch$1() : customFetch;
18159
+ async function getValidatedFetch(customFetch) {
18160
+ return customFetch == null || customFetch === globalThis.fetch ? await getDefaultDownloadFetch() : customFetch;
17910
18161
  }
17911
18162
  async function fetchWithValidatedRedirects$1({ url, headers, abortSignal, maxRedirects = MAX_DOWNLOAD_REDIRECTS$1, fetch: customFetch, trustedOrigin }) {
17912
18163
  var _a2;
@@ -17923,7 +18174,7 @@ async function fetchWithValidatedRedirects$1({ url, headers, abortSignal, maxRed
17923
18174
  for (let redirectCount = 0; redirectCount <= maxRedirects; redirectCount++) {
17924
18175
  const isTrustedHop = trustedOrigin !== void 0 && isSameOrigin$1(currentUrl, trustedOrigin);
17925
18176
  if (!isTrustedHop) validateDownloadUrl$1(currentUrl);
17926
- const fetch = isTrustedHop && customFetch != null ? customFetch : isTrustedHop ? globalThis.fetch : await getValidatedFetch$1(customFetch);
18177
+ const fetch = isTrustedHop && customFetch != null ? customFetch : isTrustedHop ? globalThis.fetch : await getValidatedFetch(customFetch);
17927
18178
  const response = await fetch(currentUrl, perHopInit("manual"));
17928
18179
  if (response.type === "opaqueredirect") {
17929
18180
  if (!isBrowserRuntime$1()) throw new DownloadError$1({
@@ -17936,6 +18187,10 @@ async function fetchWithValidatedRedirects$1({ url, headers, abortSignal, maxRed
17936
18187
  if (REDIRECT_STATUS_CODES$1.has(response.status) && location) {
17937
18188
  cancelResponseBody$1(response);
17938
18189
  const nextUrl = new URL(location, currentUrl).toString();
18190
+ if (new URL(currentUrl).protocol === "https:" && new URL(nextUrl).protocol === "http:") throw new DownloadError$1({
18191
+ url,
18192
+ message: "Redirect from HTTPS to HTTP was blocked"
18193
+ });
17939
18194
  if (currentHeaders !== void 0 && !isSameOrigin$1(nextUrl, currentUrl)) {
17940
18195
  const userAgent = currentHeaders.get("user-agent");
17941
18196
  currentHeaders = new Headers(userAgent == null ? void 0 : { "user-agent": userAgent });
@@ -18105,7 +18360,7 @@ function withUserAgentSuffix$1(headers, ...userAgentSuffixParts) {
18105
18360
  normalizedHeaders.set("user-agent", [currentUserAgentHeader, ...userAgentSuffixParts].filter(Boolean).join(" "));
18106
18361
  return Object.fromEntries(normalizedHeaders.entries());
18107
18362
  }
18108
- var VERSION$5 = "4.0.64";
18363
+ var VERSION$5 = "4.0.66";
18109
18364
  var getOriginalFetch$1 = () => globalThis.fetch;
18110
18365
  var getFromApi$1 = async ({ url, headers = {}, successfulResponseHandler, failedResponseHandler, abortSignal, fetch, validateUrl, credentialedOrigin, trustedOrigin }) => {
18111
18366
  try {
@@ -19588,10 +19843,10 @@ async function getVercelOidcToken$1() {
19588
19843
  if (process.env.VERCEL_OIDC_TOKEN) return process.env.VERCEL_OIDC_TOKEN ?? "";
19589
19844
  throw new Error("@vercel/oidc is not available in the vendored @internal AI packages. Provide an API key instead.");
19590
19845
  }
19591
- var symbol$20 = Symbol.for("vercel.ai.gateway.error");
19846
+ var symbol$14 = Symbol.for("vercel.ai.gateway.error");
19592
19847
  var _a$1$3;
19593
19848
  var _b;
19594
- var GatewayError$1 = class _GatewayError extends (_b = Error, _a$1$3 = symbol$20, _b) {
19849
+ var GatewayError$1 = class _GatewayError extends (_b = Error, _a$1$3 = symbol$14, _b) {
19595
19850
  constructor({ message, statusCode = 500, cause, generationId, isRetryable = statusCode != null && (statusCode === 408 || statusCode === 409 || statusCode === 429 || statusCode >= 500) }) {
19596
19851
  super(generationId ? `${message} [${generationId}]` : message);
19597
19852
  this[_a$1$3] = true;
@@ -19609,11 +19864,11 @@ var GatewayError$1 = class _GatewayError extends (_b = Error, _a$1$3 = symbol$20
19609
19864
  return _GatewayError.hasMarker(error);
19610
19865
  }
19611
19866
  static hasMarker(error) {
19612
- return typeof error === "object" && error !== null && symbol$20 in error && error[symbol$20] === true;
19867
+ return typeof error === "object" && error !== null && symbol$14 in error && error[symbol$14] === true;
19613
19868
  }
19614
19869
  };
19615
- var name$18 = "GatewayAuthenticationError";
19616
- var marker2$1 = `vercel.ai.gateway.error.${name$18}`;
19870
+ var name$13 = "GatewayAuthenticationError";
19871
+ var marker2$1 = `vercel.ai.gateway.error.${name$13}`;
19617
19872
  var symbol2$1 = Symbol.for(marker2$1);
19618
19873
  var _a2$1;
19619
19874
  var _b2;
@@ -19626,7 +19881,7 @@ var GatewayAuthenticationError$1 = class _GatewayAuthenticationError extends (_b
19626
19881
  generationId
19627
19882
  });
19628
19883
  this[_a2$1] = true;
19629
- this.name = name$18;
19884
+ this.name = name$13;
19630
19885
  this.type = "authentication_error";
19631
19886
  }
19632
19887
  static isInstance(error) {
@@ -22554,14 +22809,14 @@ var __export$3 = (target, all) => {
22554
22809
  enumerable: true
22555
22810
  });
22556
22811
  };
22557
- var name$12 = "AI_InvalidArgumentError";
22558
- var marker$12 = `vercel.ai.error.${name$12}`;
22559
- var symbol$19 = Symbol.for(marker$12);
22812
+ var name$10 = "AI_InvalidArgumentError";
22813
+ var marker$10 = `vercel.ai.error.${name$10}`;
22814
+ var symbol$13 = Symbol.for(marker$10);
22560
22815
  var _a;
22561
22816
  var InvalidArgumentError$2 = class extends AISDKError$1 {
22562
22817
  constructor({ parameter, value, message }) {
22563
22818
  super({
22564
- name: name$12,
22819
+ name: name$10,
22565
22820
  message: `Invalid argument for parameter ${parameter}: ${message}`
22566
22821
  });
22567
22822
  this[_a] = true;
@@ -22569,10 +22824,10 @@ var InvalidArgumentError$2 = class extends AISDKError$1 {
22569
22824
  this.value = value;
22570
22825
  }
22571
22826
  static isInstance(error) {
22572
- return AISDKError$1.hasMarker(error, marker$12);
22827
+ return AISDKError$1.hasMarker(error, marker$10);
22573
22828
  }
22574
22829
  };
22575
- _a = symbol$19;
22830
+ _a = symbol$13;
22576
22831
  var name9 = "AI_NoObjectGeneratedError";
22577
22832
  var marker9 = `vercel.ai.error.${name9}`;
22578
22833
  var symbol9 = Symbol.for(marker9);
@@ -23908,8 +24163,8 @@ createIdGenerator$1({
23908
24163
  * Symbol used for identifying AI SDK Error instances.
23909
24164
  * Enables checking if an error is an instance of AISDKError across package versions.
23910
24165
  */
23911
- const marker$16 = "vercel.ai.error";
23912
- const symbol$16 = Symbol.for(marker$16);
24166
+ const marker$18 = "vercel.ai.error";
24167
+ const symbol$18 = Symbol.for(marker$18);
23913
24168
  /**
23914
24169
  * Custom error class for AI SDK related errors.
23915
24170
  * @extends Error
@@ -23925,7 +24180,7 @@ var AISDKError$4 = class AISDKError extends Error {
23925
24180
  */
23926
24181
  constructor({ name, message, cause }) {
23927
24182
  super(message);
23928
- this[symbol$16] = true;
24183
+ this[symbol$18] = true;
23929
24184
  this.name = name;
23930
24185
  this.cause = cause;
23931
24186
  }
@@ -23935,24 +24190,24 @@ var AISDKError$4 = class AISDKError extends Error {
23935
24190
  * @returns {boolean} True if the error is an AI SDK Error, false otherwise.
23936
24191
  */
23937
24192
  static isInstance(error) {
23938
- return AISDKError.hasMarker(error, marker$16);
24193
+ return AISDKError.hasMarker(error, marker$18);
23939
24194
  }
23940
24195
  static hasMarker(error, marker) {
23941
24196
  const markerSymbol = Symbol.for(marker);
23942
24197
  return error != null && typeof error === "object" && markerSymbol in error && typeof error[markerSymbol] === "boolean" && error[markerSymbol] === true;
23943
24198
  }
23944
24199
  };
23945
- const name$14 = "AI_APICallError";
23946
- const marker$14 = `vercel.ai.error.${name$14}`;
23947
- const symbol$14 = Symbol.for(marker$14);
24200
+ const name$16 = "AI_APICallError";
24201
+ const marker$16 = `vercel.ai.error.${name$16}`;
24202
+ const symbol$16 = Symbol.for(marker$16);
23948
24203
  var APICallError = class extends AISDKError$4 {
23949
24204
  constructor({ message, url, requestBodyValues, statusCode, responseHeaders, responseBody, cause, isRetryable = statusCode != null && (statusCode === 408 || statusCode === 409 || statusCode === 429 || statusCode >= 500), data }) {
23950
24205
  super({
23951
- name: name$14,
24206
+ name: name$16,
23952
24207
  message,
23953
24208
  cause
23954
24209
  });
23955
- this[symbol$14] = true;
24210
+ this[symbol$16] = true;
23956
24211
  this.url = url;
23957
24212
  this.requestBodyValues = requestBodyValues;
23958
24213
  this.statusCode = statusCode;
@@ -23962,22 +24217,22 @@ var APICallError = class extends AISDKError$4 {
23962
24217
  this.data = data;
23963
24218
  }
23964
24219
  static isInstance(error) {
23965
- return AISDKError$4.hasMarker(error, marker$14);
24220
+ return AISDKError$4.hasMarker(error, marker$16);
23966
24221
  }
23967
24222
  };
23968
- const name$13 = "AI_EmptyResponseBodyError";
23969
- const marker$13 = `vercel.ai.error.${name$13}`;
23970
- const symbol$13 = Symbol.for(marker$13);
24223
+ const name$15 = "AI_EmptyResponseBodyError";
24224
+ const marker$15 = `vercel.ai.error.${name$15}`;
24225
+ const symbol$15 = Symbol.for(marker$15);
23971
24226
  var EmptyResponseBodyError = class extends AISDKError$4 {
23972
24227
  constructor({ message = "Empty response body" } = {}) {
23973
24228
  super({
23974
- name: name$13,
24229
+ name: name$15,
23975
24230
  message
23976
24231
  });
23977
- this[symbol$13] = true;
24232
+ this[symbol$15] = true;
23978
24233
  }
23979
24234
  static isInstance(error) {
23980
- return AISDKError$4.hasMarker(error, marker$13);
24235
+ return AISDKError$4.hasMarker(error, marker$15);
23981
24236
  }
23982
24237
  };
23983
24238
  function getErrorMessage(error) {
@@ -24105,20 +24360,20 @@ var TypeValidationError$4 = class TypeValidationError extends AISDKError$4 {
24105
24360
  });
24106
24361
  }
24107
24362
  };
24108
- const name$16 = "AI_UnsupportedFunctionalityError";
24109
- const marker$17 = `vercel.ai.error.${name$16}`;
24110
- const symbol$17 = Symbol.for(marker$17);
24363
+ const name$18 = "AI_UnsupportedFunctionalityError";
24364
+ const marker$19 = `vercel.ai.error.${name$18}`;
24365
+ const symbol$19 = Symbol.for(marker$19);
24111
24366
  var UnsupportedFunctionalityError = class extends AISDKError$4 {
24112
24367
  constructor({ functionality, message = `'${functionality}' functionality not supported.` }) {
24113
24368
  super({
24114
- name: name$16,
24369
+ name: name$18,
24115
24370
  message
24116
24371
  });
24117
- this[symbol$17] = true;
24372
+ this[symbol$19] = true;
24118
24373
  this.functionality = functionality;
24119
24374
  }
24120
24375
  static isInstance(error) {
24121
- return AISDKError$4.hasMarker(error, marker$17);
24376
+ return AISDKError$4.hasMarker(error, marker$19);
24122
24377
  }
24123
24378
  };
24124
24379
  var ParseError = class extends Error {
@@ -24604,7 +24859,7 @@ function handleFetchError({ error, url, requestBodyValues }) {
24604
24859
  }
24605
24860
  return error;
24606
24861
  }
24607
- const VERSION$2 = "5.0.74";
24862
+ const VERSION$2 = "5.0.81";
24608
24863
  /**
24609
24864
  * Normalizes different header inputs into a plain record with lower-case keys.
24610
24865
  * Entries with `undefined` or `null` values are removed.
@@ -24707,11 +24962,54 @@ function isSameOrigin(url, baseUrl) {
24707
24962
  }
24708
24963
  }
24709
24964
  /**
24965
+ * Request headers stripped before fetching an untrusted URL: host/virtual-host
24966
+ * routing, proxy/origin spoofing, cloud-metadata, cookies, and hop-by-hop
24967
+ * transport headers (RFC 7230 §6.1).
24968
+ *
24969
+ * `Authorization` and other credential-bearing caller headers (e.g. `x-key`)
24970
+ * are intentionally not listed because trusted provider requests may need
24971
+ * them. `fetchUntrustedUrl` separately restricts an untrusted first hop to an
24972
+ * explicit allowlist of non-credential request metadata. Both it and
24973
+ * `fetchWithValidatedRedirects` drop all caller headers except the user-agent
24974
+ * on a cross-origin redirect.
24975
+ */
24976
+ const BLOCKED_REQUEST_HEADERS = [
24977
+ "connection",
24978
+ "keep-alive",
24979
+ "te",
24980
+ "trailer",
24981
+ "transfer-encoding",
24982
+ "upgrade",
24983
+ "host",
24984
+ "forwarded",
24985
+ "proxy-authorization",
24986
+ "via",
24987
+ "x-forwarded-for",
24988
+ "x-forwarded-host",
24989
+ "x-forwarded-proto",
24990
+ "x-real-ip",
24991
+ "metadata",
24992
+ "metadata-flavor",
24993
+ "x-aws-ec2-metadata-token",
24994
+ "x-metadata-token",
24995
+ "cookie",
24996
+ "set-cookie"
24997
+ ];
24998
+ /**
24999
+ * Returns a fresh `Headers` built from `input` with {@link BLOCKED_REQUEST_HEADERS}
25000
+ * removed. The input is never mutated.
25001
+ */
25002
+ function sanitizeRequestHeaders(input) {
25003
+ const headers = new Headers(input);
25004
+ for (const name of BLOCKED_REQUEST_HEADERS) headers.delete(name);
25005
+ return headers;
25006
+ }
25007
+ /**
24710
25008
  * Validates that a URL is safe to download from, blocking private/internal addresses
24711
25009
  * to prevent SSRF attacks.
24712
25010
  *
24713
- * Note: this function performs string/literal-IP checks only. The Node.js
24714
- * download fetch additionally validates and pins DNS results at connect time.
25011
+ * This function performs string/literal-IP checks only. DNS validation must
25012
+ * be provided by the fetch transport or network egress controls.
24715
25013
  *
24716
25014
  * @param url - The URL string to validate.
24717
25015
  * @throws DownloadError if the URL is unsafe.
@@ -24754,16 +25052,6 @@ function validateDownloadUrl(url) {
24754
25052
  });
24755
25053
  }
24756
25054
  }
24757
- /**
24758
- * Validates an address returned by DNS before it is used to open a socket.
24759
- * This is intentionally not exported from the package entry point.
24760
- */
24761
- function validateDownloadAddress({ address, family, hostname }) {
24762
- if (family === 4 ? !isIPv4(address) || isPrivateIPv4(address) : family === 6 ? isPrivateIPv6(address) : true) throw new DownloadError({
24763
- url: hostname,
24764
- message: `Hostname ${hostname} resolved to disallowed IP address ${address}`
24765
- });
24766
- }
24767
25055
  function isIPv4(hostname) {
24768
25056
  const parts = hostname.split(".");
24769
25057
  if (parts.length !== 4) return false;
@@ -24847,119 +25135,6 @@ function isPrivateIPv6(ip) {
24847
25135
  if (topZero(6) || topZero(5) && groups[5] === 65535 || topZero(4) && groups[4] === 65535 && groups[5] === 0 || groups[0] === 100 && groups[1] === 65435 && groups[2] === 0 && groups[3] === 0 && groups[4] === 0 && groups[5] === 0 || groups[0] === 100 && groups[1] === 65435 && groups[2] === 1) return isPrivateIPv4(`${groups[6] >> 8 & 255}.${groups[6] & 255}.${groups[7] >> 8 & 255}.${groups[7] & 255}`);
24848
25136
  return false;
24849
25137
  }
24850
- /**
24851
- * Creates a DNS lookup hook that validates every returned address before
24852
- * returning the callback shape requested by the HTTP connector. Because
24853
- * resolution and validation happen inside the connector, the socket is pinned
24854
- * to the validated result and DNS rebinding cannot introduce a second lookup.
24855
- */
24856
- function createSafeLookup(lookup) {
24857
- return ((hostname, options, callback) => {
24858
- lookup(hostname, {
24859
- ...options,
24860
- all: true
24861
- }, (error, addresses) => {
24862
- if (error) {
24863
- callback(error);
24864
- return;
24865
- }
24866
- try {
24867
- const [firstAddress] = addresses;
24868
- if (firstAddress == null) throw new Error(`Hostname ${hostname} did not resolve to an address`);
24869
- for (const { address, family } of addresses) validateDownloadAddress({
24870
- address,
24871
- family,
24872
- hostname
24873
- });
24874
- if (options.all === true) callback(null, addresses);
24875
- else callback(null, firstAddress.address, firstAddress.family);
24876
- } catch (error) {
24877
- callback(error instanceof Error ? error : new Error(String(error)));
24878
- }
24879
- });
24880
- });
24881
- }
24882
- let safeNodeFetchPromise;
24883
- function isNodeRuntime$1() {
24884
- const runtimeProcess = globalThis.process;
24885
- return runtimeProcess?.release?.name === "node" && runtimeProcess.versions?.bun == null && runtimeProcess.versions?.deno == null && runtimeProcess.title !== "workerd" && globalThis.EdgeRuntime == null;
24886
- }
24887
- async function getDefaultDownloadFetch() {
24888
- if (!isNodeRuntime$1()) return globalThis.fetch;
24889
- return safeNodeFetchPromise ??= Promise.resolve().then(createSafeNodeFetch);
24890
- }
24891
- function createSafeNodeFetch() {
24892
- const module = loadBuiltinModule$1("node:module");
24893
- const { lookup } = loadBuiltinModule$1("node:dns");
24894
- const { Agent, fetch } = module.createRequire(getCurrentModulePath())("undici");
24895
- const dispatcher = new Agent({ connect: { lookup: createSafeLookup(lookup) } });
24896
- return ((input, init) => fetch(input, {
24897
- ...init,
24898
- dispatcher
24899
- }));
24900
- }
24901
- function loadBuiltinModule$1(id) {
24902
- const builtinModule = globalThis.process?.getBuiltinModule?.(id);
24903
- if (builtinModule == null) throw new Error(`Node.js built-in module ${id} is unavailable`);
24904
- return builtinModule;
24905
- }
24906
- function getCurrentModulePath() {
24907
- const originalPrepareStackTrace = Error.prepareStackTrace;
24908
- try {
24909
- Error.prepareStackTrace = (_error, callSites) => callSites;
24910
- const error = /* @__PURE__ */ new Error("Capture current module path");
24911
- Error.captureStackTrace(error, getCurrentModulePath);
24912
- const [caller] = error.stack;
24913
- const fileName = caller?.getFileName();
24914
- if (fileName == null) throw new Error("Unable to determine the current module path");
24915
- return fileName;
24916
- } finally {
24917
- Error.prepareStackTrace = originalPrepareStackTrace;
24918
- }
24919
- }
24920
- /**
24921
- * Request headers stripped before fetching an untrusted URL: host/virtual-host
24922
- * routing, proxy/origin spoofing, cloud-metadata, cookies, and hop-by-hop
24923
- * transport headers (RFC 7230 §6.1).
24924
- *
24925
- * `Authorization` and other credential-bearing caller headers (e.g. `x-key`)
24926
- * are intentionally not listed because trusted provider requests may need
24927
- * them. `fetchUntrustedUrl` separately restricts an untrusted first hop to an
24928
- * explicit allowlist of non-credential request metadata. Both it and
24929
- * `fetchWithValidatedRedirects` drop all caller headers except the user-agent
24930
- * on a cross-origin redirect.
24931
- */
24932
- const BLOCKED_REQUEST_HEADERS = [
24933
- "connection",
24934
- "keep-alive",
24935
- "te",
24936
- "trailer",
24937
- "transfer-encoding",
24938
- "upgrade",
24939
- "host",
24940
- "forwarded",
24941
- "proxy-authorization",
24942
- "via",
24943
- "x-forwarded-for",
24944
- "x-forwarded-host",
24945
- "x-forwarded-proto",
24946
- "x-real-ip",
24947
- "metadata",
24948
- "metadata-flavor",
24949
- "x-aws-ec2-metadata-token",
24950
- "x-metadata-token",
24951
- "cookie",
24952
- "set-cookie"
24953
- ];
24954
- /**
24955
- * Returns a fresh `Headers` built from `input` with {@link BLOCKED_REQUEST_HEADERS}
24956
- * removed. The input is never mutated.
24957
- */
24958
- function sanitizeRequestHeaders(input) {
24959
- const headers = new Headers(input);
24960
- for (const name of BLOCKED_REQUEST_HEADERS) headers.delete(name);
24961
- return headers;
24962
- }
24963
25138
  const MAX_DOWNLOAD_REDIRECTS = 10;
24964
25139
  const REDIRECT_STATUS_CODES = /* @__PURE__ */ new Set([
24965
25140
  301,
@@ -24968,9 +25143,6 @@ const REDIRECT_STATUS_CODES = /* @__PURE__ */ new Set([
24968
25143
  307,
24969
25144
  308
24970
25145
  ]);
24971
- async function getValidatedFetch(customFetch) {
24972
- return customFetch == null || customFetch === globalThis.fetch ? await getDefaultDownloadFetch() : customFetch;
24973
- }
24974
25146
  /**
24975
25147
  * Fetches a URL while enforcing the download guard on every hop.
24976
25148
  *
@@ -24980,6 +25152,9 @@ async function getValidatedFetch(customFetch) {
24980
25152
  * target (e.g. an internal address) before we ever see its URL, defeating the
24981
25153
  * guard.
24982
25154
  *
25155
+ * Manually followed redirects from HTTPS to HTTP are rejected before requesting
25156
+ * the target.
25157
+ *
24983
25158
  * Request headers are also protected: {@link sanitizeRequestHeaders} strips
24984
25159
  * proxy/metadata/cookie/hop-by-hop headers before the first request, and all
24985
25160
  * caller headers except `User-Agent` are dropped on a cross-origin redirect.
@@ -25009,11 +25184,8 @@ async function getValidatedFetch(customFetch) {
25009
25184
  * The returned response is the final (non-redirect) response. The caller is
25010
25185
  * responsible for checking `response.ok` and reading the body.
25011
25186
  *
25012
- * On Node.js, the default fetch resolves every hostname through a validating
25013
- * lookup hook and passes those exact addresses to the connector, preventing
25014
- * hostname-to-private-IP and DNS-rebinding bypasses. An injected fetch is
25015
- * responsible for equivalent connect-time validation. Other runtimes should
25016
- * constrain egress at the network layer when handling untrusted URLs.
25187
+ * URL validation does not resolve DNS. Use guarded-fetch on Node.js
25188
+ * for connection-time DNS validation, or enforce network egress restrictions.
25017
25189
  *
25018
25190
  * @throws DownloadError if a hop is unsafe, the redirect limit is exceeded, or
25019
25191
  * a redirect cannot be validated on a non-browser runtime.
@@ -25030,9 +25202,8 @@ async function fetchWithValidatedRedirects({ url, headers, abortSignal, maxRedir
25030
25202
  };
25031
25203
  let currentUrl = url;
25032
25204
  for (let redirectCount = 0; redirectCount <= maxRedirects; redirectCount++) {
25033
- const isTrustedHop = trustedOrigin !== void 0 && isSameOrigin(currentUrl, trustedOrigin);
25034
- if (!isTrustedHop) validateDownloadUrl(currentUrl);
25035
- const fetch = isTrustedHop && customFetch != null ? customFetch : isTrustedHop ? globalThis.fetch : await getValidatedFetch(customFetch);
25205
+ if (!(trustedOrigin !== void 0 && isSameOrigin(currentUrl, trustedOrigin))) validateDownloadUrl(currentUrl);
25206
+ const fetch = customFetch ?? globalThis.fetch;
25036
25207
  const response = await fetch(currentUrl, perHopInit("manual"));
25037
25208
  if (response.type === "opaqueredirect") {
25038
25209
  if (!isBrowserRuntime()) throw new DownloadError({
@@ -25045,6 +25216,10 @@ async function fetchWithValidatedRedirects({ url, headers, abortSignal, maxRedir
25045
25216
  if (REDIRECT_STATUS_CODES.has(response.status) && location) {
25046
25217
  cancelResponseBody(response);
25047
25218
  const nextUrl = new URL(location, currentUrl).toString();
25219
+ if (new URL(currentUrl).protocol === "https:" && new URL(nextUrl).protocol === "http:") throw new DownloadError({
25220
+ url,
25221
+ message: "Redirect from HTTPS to HTTP was blocked"
25222
+ });
25048
25223
  if (currentHeaders !== void 0 && !isSameOrigin(nextUrl, currentUrl)) {
25049
25224
  const userAgent = currentHeaders.get("user-agent");
25050
25225
  currentHeaders = new Headers(userAgent == null ? void 0 : { "user-agent": userAgent });
@@ -25081,10 +25256,13 @@ const DEFAULT_MAX_DOWNLOAD_SIZE = 2147483648;
25081
25256
  * @param response - The fetch Response to read.
25082
25257
  * @param url - The URL being downloaded (used in error messages).
25083
25258
  * @param maxBytes - Maximum allowed bytes. Defaults to DEFAULT_MAX_DOWNLOAD_SIZE.
25259
+ * @param onChunk - Optional. Receives each chunk instead of the chunks being
25260
+ * collected, so the body is not held in memory, and the returned array is empty.
25261
+ * The chunk may be a view on a larger buffer, copy what you keep.
25084
25262
  * @returns A Uint8Array containing the response body.
25085
25263
  * @throws DownloadError if the response exceeds maxBytes.
25086
25264
  */
25087
- async function readResponseWithSizeLimit({ response, url, maxBytes = DEFAULT_MAX_DOWNLOAD_SIZE }) {
25265
+ async function readResponseWithSizeLimit({ response, url, maxBytes = DEFAULT_MAX_DOWNLOAD_SIZE, onChunk }) {
25088
25266
  const contentLength = response.headers.get("content-length");
25089
25267
  if (contentLength != null) {
25090
25268
  const length = parseInt(contentLength, 10);
@@ -25110,6 +25288,10 @@ async function readResponseWithSizeLimit({ response, url, maxBytes = DEFAULT_MAX
25110
25288
  url,
25111
25289
  message: `Download of ${url} exceeded maximum size of ${maxBytes} bytes.`
25112
25290
  });
25291
+ if (onChunk != null) {
25292
+ onChunk(value);
25293
+ continue;
25294
+ }
25113
25295
  chunks.push(value.byteLength < value.buffer.byteLength ? new Uint8Array(value) : value);
25114
25296
  }
25115
25297
  } finally {
@@ -25119,7 +25301,7 @@ async function readResponseWithSizeLimit({ response, url, maxBytes = DEFAULT_MAX
25119
25301
  reader.releaseLock();
25120
25302
  }
25121
25303
  }
25122
- const result = new Uint8Array(totalBytes);
25304
+ const result = new Uint8Array(onChunk != null ? 0 : totalBytes);
25123
25305
  let offset = 0;
25124
25306
  for (const chunk of chunks) {
25125
25307
  result.set(chunk, offset);
@@ -26284,6 +26466,7 @@ function zod3Schema$3(zodSchema, options) {
26284
26466
  } });
26285
26467
  }
26286
26468
  function zod4Schema$3(zodSchema, options) {
26469
+ if (!(0, zod_v4_core.config)().localeError) (0, zod_v4_core.config)((0, zod_v4_locales_en_js.default)());
26287
26470
  const useReferences = options?.useReferences ?? false;
26288
26471
  return jsonSchema$4(() => addAdditionalPropertiesToJsonSchema$3((0, zod_v4_core.toJSONSchema)(zodSchema, {
26289
26472
  target: "draft-7",
@@ -26515,12 +26698,27 @@ const postToApi = async ({ url, headers = {}, body, successfulResponseHandler, f
26515
26698
  function tool(tool) {
26516
26699
  return tool;
26517
26700
  }
26518
- function createProviderExecutedToolFactory({ id, inputSchema, outputSchema, supportsDeferredResults }) {
26701
+ const telemetryRedaction = Symbol.for("vercel.ai.telemetry.redact");
26702
+ /**
26703
+ * Attach a provider-owned telemetry view without changing the original value.
26704
+ * The annotation is not serialized or included in enumerable application data.
26705
+ * Keep the annotated object when forwarding tool arguments or provider metadata.
26706
+ */
26707
+ function withTelemetryRedaction(value, redact) {
26708
+ return Object.create(Object.getPrototypeOf(value), {
26709
+ ...Object.getOwnPropertyDescriptors(value),
26710
+ [telemetryRedaction]: {
26711
+ value: redact,
26712
+ configurable: true
26713
+ }
26714
+ });
26715
+ }
26716
+ function createProviderExecutedToolFactory({ id, inputSchema, outputSchema, supportsDeferredResults, redactArgs }) {
26519
26717
  return ({ onInputStart, onInputDelta, onInputAvailable, ...args }) => tool({
26520
26718
  type: "provider",
26521
26719
  isProviderExecuted: true,
26522
26720
  id,
26523
- args,
26721
+ args: redactArgs == null ? args : withTelemetryRedaction(args, redactArgs),
26524
26722
  inputSchema,
26525
26723
  outputSchema,
26526
26724
  onInputStart,
@@ -26586,6 +26784,286 @@ async function retryWithExponentialBackoffInternal(f, { maxRetries, delayInMs, b
26586
26784
  });
26587
26785
  }
26588
26786
  }
26787
+ /**
26788
+ * Streaming extraction of large base64 strings from a JSON response body.
26789
+ *
26790
+ * A JSON response that carries an image or a file is mostly one very long
26791
+ * base64 string. The regular pipeline (collect chunks, concatenate, decode to
26792
+ * text, `JSON.parse`, decode base64) holds about four copies of that string at
26793
+ * once. The scanner reads the body chunk by chunk instead: strings at the
26794
+ * configured paths are decoded to bytes while they stream in, and the text that
26795
+ * is handed to `JSON.parse` (the "skeleton") holds a short placeholder in their
26796
+ * place.
26797
+ *
26798
+ * - The skeleton is the original body except for the extracted strings, so
26799
+ * `secureJsonParse` still sees every key (a base64 string cannot contain a
26800
+ * quote, so it cannot hide one).
26801
+ * - A string is extracted only if it is canonical standard-alphabet base64
26802
+ * (length divisible by 4, `=` only as the final padding, zero trailing bits,
26803
+ * no escape sequences or whitespace). The bytes are then exactly what `atob`
26804
+ * gives for it. Everything else stays a string. What was decoded before a
26805
+ * string turned out not to qualify is encoded back, which gives the original
26806
+ * characters.
26807
+ */
26808
+ /** Strings that decode to fewer bytes stay strings. */
26809
+ const DEFAULT_BINARY_FIELD_MIN_BYTES = 65536;
26810
+ const QUOTE = 34;
26811
+ const BACKSLASH = 92;
26812
+ const EQUALS = 61;
26813
+ const COMMA = 44;
26814
+ const COLON = 58;
26815
+ const LEFT_BRACE = 123;
26816
+ const RIGHT_BRACE = 125;
26817
+ const LEFT_BRACKET = 91;
26818
+ const RIGHT_BRACKET = 93;
26819
+ const OUTSIDE = 0;
26820
+ const KEY = 1;
26821
+ const SKIP = 2;
26822
+ const BLOB = 3;
26823
+ /**
26824
+ * Compiles paths such as `images[*]` or `content[*].data.data`: plain object
26825
+ * keys (letters, digits, `_` and `-`) joined by `.`, and `[*]` for every
26826
+ * element of an array. Keys are compared with the raw bytes of the key in the
26827
+ * body, so a key written with an escape sequence never matches.
26828
+ */
26829
+ function compileBinaryFieldPaths(paths) {
26830
+ const root = /* @__PURE__ */ new Map();
26831
+ for (const path of paths) {
26832
+ if (!/^(?:[\w-]+|\[\*])(?:\.[\w-]+|\[\*])*$/.test(path)) throw new InvalidArgumentError$1({
26833
+ argument: "experimental_binaryFields",
26834
+ message: `Invalid binary field path "${path}"`
26835
+ });
26836
+ let node = root;
26837
+ for (const segment of path.match(/\[\*]|[\w-]+/g)) {
26838
+ const edges = segment === "[*]" ? [null] : new TextEncoder().encode(`${segment}"`);
26839
+ for (const edge of edges) {
26840
+ let next = node.get(edge);
26841
+ if (next === void 0) node.set(edge, next = /* @__PURE__ */ new Map());
26842
+ node = next;
26843
+ }
26844
+ }
26845
+ node.set(true, node);
26846
+ }
26847
+ return root;
26848
+ }
26849
+ function join$1(parts, length) {
26850
+ const bytes = new Uint8Array(length);
26851
+ let at = 0;
26852
+ for (const part of parts) {
26853
+ bytes.set(part, at);
26854
+ at += part.length;
26855
+ }
26856
+ return bytes;
26857
+ }
26858
+ function createJsonBinaryFieldScanner(paths, minBytes = DEFAULT_BINARY_FIELD_MIN_BYTES) {
26859
+ const sextet = (/* @__PURE__ */ new Uint8Array(256)).fill(64);
26860
+ for (let index = 0; index < 64; index++) sextet["ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charCodeAt(index)] = index;
26861
+ const encoder = new TextEncoder();
26862
+ const pieces = [];
26863
+ let piece = /* @__PURE__ */ new Uint8Array(65536);
26864
+ let pieceLength = 0;
26865
+ let size = 0;
26866
+ const binaries = /* @__PURE__ */ new Map();
26867
+ const frames = [];
26868
+ let skipped = 0;
26869
+ let mode = OUTSIDE;
26870
+ let escaped = false;
26871
+ let last = 0;
26872
+ let key;
26873
+ let segments = [];
26874
+ let segment = /* @__PURE__ */ new Uint8Array(0);
26875
+ let at = 0;
26876
+ let total = 0;
26877
+ let bits = 0;
26878
+ let chars = 0;
26879
+ let padding = 0;
26880
+ const add = (bytes) => {
26881
+ for (let offset = 0; offset < bytes.length;) {
26882
+ const length = Math.min(piece.length - pieceLength, bytes.length - offset);
26883
+ piece.set(bytes.subarray(offset, offset + length), pieceLength);
26884
+ pieceLength += length;
26885
+ offset += length;
26886
+ size += length;
26887
+ if (pieceLength === piece.length) {
26888
+ pieces.push(piece);
26889
+ piece = /* @__PURE__ */ new Uint8Array(65536);
26890
+ pieceLength = 0;
26891
+ }
26892
+ }
26893
+ };
26894
+ const emit = (chunk, start, end) => add(chunk.subarray(start, end));
26895
+ const reset = () => {
26896
+ segments = [];
26897
+ segment = /* @__PURE__ */ new Uint8Array(0);
26898
+ at = 0;
26899
+ total = 0;
26900
+ bits = 0;
26901
+ chars = 0;
26902
+ padding = 0;
26903
+ };
26904
+ const grow = () => {
26905
+ if (at > 0) segments.push(segment.subarray(0, at));
26906
+ segment = new Uint8Array(Math.min(Math.max(total, 4096), 4 << 20));
26907
+ at = 0;
26908
+ };
26909
+ const rest = () => bits << (4 - chars) * 6;
26910
+ const restore = () => {
26911
+ for (const part of [...segments, segment.subarray(0, at)]) add(encoder.encode(convertUint8ArrayToBase64(part)));
26912
+ const group = rest();
26913
+ add(encoder.encode(convertUint8ArrayToBase64(Uint8Array.of(group >> 16, group >> 8, group)).slice(0, chars) + "=".repeat(padding)));
26914
+ reset();
26915
+ };
26916
+ const closeBlob = () => {
26917
+ mode = OUTSIDE;
26918
+ const tail = chars && chars - 1;
26919
+ if (padding === (4 - chars) % 4 && !(bits & (1 << (4 - chars) * 2) - 1) && total + tail >= minBytes) {
26920
+ const group = rest();
26921
+ const bytes = join$1([...segments, segment.subarray(0, at)], total + tail);
26922
+ for (let index = 0; index < tail; index++) bytes[total + index] = group >> 16 - 8 * index;
26923
+ const placeholder = `[binary data: ${bytes.length} bytes; ref ${crypto.getRandomValues(/* @__PURE__ */ new Uint32Array(2)).join("-")}]`;
26924
+ binaries.set(placeholder, bytes);
26925
+ add(encoder.encode(placeholder));
26926
+ reset();
26927
+ } else restore();
26928
+ };
26929
+ const push = (chunk) => {
26930
+ let from = 0;
26931
+ const { length } = chunk;
26932
+ for (let index = 0; index < length; index++) {
26933
+ let byte = chunk[index];
26934
+ if (mode === BLOB) {
26935
+ if (padding === 0) {
26936
+ let pending = bits;
26937
+ let count = chars;
26938
+ for (let value; index < length && (value = sextet[chunk[index]]) < 64; index++) {
26939
+ pending = pending << 6 | value;
26940
+ if (++count === 4) {
26941
+ if (at + 3 > segment.length) grow();
26942
+ segment[at++] = pending >> 16;
26943
+ segment[at++] = pending >> 8;
26944
+ segment[at++] = pending;
26945
+ total += 3;
26946
+ pending = 0;
26947
+ count = 0;
26948
+ }
26949
+ }
26950
+ bits = pending;
26951
+ chars = count;
26952
+ }
26953
+ if (index >= length) break;
26954
+ byte = chunk[index];
26955
+ if (byte === QUOTE) {
26956
+ closeBlob();
26957
+ from = index;
26958
+ } else if (byte === EQUALS && chars > 1 && padding < 4 - chars) padding++;
26959
+ else {
26960
+ restore();
26961
+ mode = SKIP;
26962
+ from = index--;
26963
+ }
26964
+ } else if (mode !== OUTSIDE) {
26965
+ if (mode === KEY) key = key?.get(byte);
26966
+ if (escaped) escaped = false;
26967
+ else if (byte === BACKSLASH) escaped = true;
26968
+ else if (byte === QUOTE) {
26969
+ if (mode === KEY) frames.at(-1).next = key;
26970
+ mode = OUTSIDE;
26971
+ }
26972
+ } else if (byte === QUOTE) {
26973
+ const frame = frames.at(-1);
26974
+ if (skipped > 0) mode = SKIP;
26975
+ else if (frame?.keys && (last === LEFT_BRACE || last === COMMA)) {
26976
+ mode = KEY;
26977
+ key = frame.keys;
26978
+ } else if ((frame ? frame.next : paths)?.get(true)) {
26979
+ mode = BLOB;
26980
+ emit(chunk, from, index + 1);
26981
+ } else mode = SKIP;
26982
+ } else if (byte === LEFT_BRACE || byte === LEFT_BRACKET) {
26983
+ last = byte;
26984
+ const frame = frames.at(-1);
26985
+ const node = skipped > 0 ? void 0 : frame ? frame.next : paths;
26986
+ const items = node?.get(null);
26987
+ if (byte === LEFT_BRACE && node) frames.push({ keys: node });
26988
+ else if (byte === LEFT_BRACKET && items) frames.push({
26989
+ keys: null,
26990
+ next: items
26991
+ });
26992
+ else skipped++;
26993
+ } else if (byte === RIGHT_BRACE || byte === RIGHT_BRACKET) {
26994
+ if (skipped > 0) skipped--;
26995
+ else frames.pop();
26996
+ } else if (byte === COMMA || byte === COLON) last = byte;
26997
+ }
26998
+ if (mode !== BLOB) emit(chunk, from, length);
26999
+ };
27000
+ const finish = () => {
27001
+ if (mode === BLOB) restore();
27002
+ return {
27003
+ text: new TextDecoder().decode(join$1([...pieces, piece.subarray(0, pieceLength)], size)),
27004
+ binaries
27005
+ };
27006
+ };
27007
+ return {
27008
+ push,
27009
+ finish
27010
+ };
27011
+ }
27012
+ /**
27013
+ * Replaces the placeholders in a parsed value with the bytes they stand for.
27014
+ * Objects and arrays are copied, the parsed value is not modified. A
27015
+ * placeholder holds a random number, so a string that equals one is ours.
27016
+ */
27017
+ function replaceBinaryFieldPlaceholders(value, binaries) {
27018
+ if (typeof value === "string") return binaries.get(value) ?? value;
27019
+ if (Array.isArray(value)) return value.map((item) => replaceBinaryFieldPlaceholders(item, binaries));
27020
+ if (value != null && typeof value === "object") return Object.fromEntries(Object.entries(value).map(([name, item]) => [name, replaceBinaryFieldPlaceholders(item, binaries)]));
27021
+ return value;
27022
+ }
27023
+ /**
27024
+ * Makes `JSON.stringify` give the placeholder for each of the arrays, instead
27025
+ * of `{"0":…,"1":…}` with an entry for every byte: 24 MiB of bytes would
27026
+ * become a string of more than 300 MB. That is what a validator, or the code
27027
+ * that reports its issues, does with a value it puts into an error message.
27028
+ * The property is not enumerable, so the arrays look the same otherwise.
27029
+ * Returns the function that removes it again.
27030
+ */
27031
+ function maskBinariesInJson(binaries) {
27032
+ for (const [placeholder, bytes] of binaries) Object.defineProperty(bytes, "toJSON", {
27033
+ value: () => placeholder,
27034
+ configurable: true
27035
+ });
27036
+ return () => {
27037
+ for (const bytes of binaries.values()) Reflect.deleteProperty(bytes, "toJSON");
27038
+ };
27039
+ }
27040
+ /**
27041
+ * Wraps a schema so that it validates the extracted bytes in place of their
27042
+ * placeholders. The value parsed from the skeleton, and the value of the
27043
+ * validation error of the response, keep the placeholders: reporting an error
27044
+ * never prints the bytes.
27045
+ *
27046
+ * The errors of the schema itself may hold the bytes: a Standard Schema
27047
+ * validator wraps the value it was given into an error, and the issues it
27048
+ * reports may carry the offending input. So that their messages do not grow
27049
+ * with the image, the arrays stringify as their placeholders, and keep doing
27050
+ * so as long as an error can refer to them. When the validation succeeds the
27051
+ * arrays are plain again, for whoever receives them.
27052
+ */
27053
+ function withBinaryFields(schema, binaries) {
27054
+ if (binaries.size === 0) return schema;
27055
+ const actualSchema = asSchema$4(schema);
27056
+ return jsonSchema$4({}, { validate: async (value) => {
27057
+ const replaced = replaceBinaryFieldPlaceholders(value, binaries);
27058
+ const unmask = maskBinariesInJson(binaries);
27059
+ const result = actualSchema.validate ? await actualSchema.validate(replaced) : {
27060
+ success: true,
27061
+ value: replaced
27062
+ };
27063
+ if (result.success) unmask();
27064
+ return result;
27065
+ } });
27066
+ }
26589
27067
  const textDecoder = new TextDecoder();
26590
27068
  const DEFAULT_MAX_JSON_LINE_BYTES = 67108864;
26591
27069
  function wrapResponseBodyStream({ stream, url, requestBodyValues, statusCode, responseHeaders }) {
@@ -26708,29 +27186,45 @@ const createEventSourceResponseHandler = (chunkSchema) => async ({ response, url
26708
27186
  })
26709
27187
  };
26710
27188
  };
26711
- const createJsonResponseHandler = (responseSchema) => async ({ response, url, requestBodyValues }) => {
26712
- const responseBody = await readResponseBodyAsText({
26713
- response,
26714
- url
26715
- });
26716
- const parsedResult = await safeParseJSON$4({
26717
- text: responseBody,
26718
- schema: responseSchema
26719
- });
26720
- const responseHeaders = extractResponseHeaders(response);
26721
- if (!parsedResult.success) throw new APICallError({
26722
- message: "Invalid JSON response",
26723
- cause: parsedResult.error,
26724
- statusCode: response.status,
26725
- responseHeaders,
26726
- responseBody,
26727
- url,
26728
- requestBodyValues
26729
- });
26730
- return {
26731
- responseHeaders,
26732
- value: parsedResult.value,
26733
- rawValue: parsedResult.rawValue
27189
+ const createJsonResponseHandler = (responseSchema, { experimental_binaryFields } = {}) => {
27190
+ const binaryFieldPaths = experimental_binaryFields?.length ? compileBinaryFieldPaths(experimental_binaryFields) : void 0;
27191
+ return async ({ response, url, requestBodyValues }) => {
27192
+ let responseBody;
27193
+ let schema = responseSchema;
27194
+ if (binaryFieldPaths == null) responseBody = await readResponseBodyAsText({
27195
+ response,
27196
+ url
27197
+ });
27198
+ else {
27199
+ const scanner = createJsonBinaryFieldScanner(binaryFieldPaths);
27200
+ await readResponseWithSizeLimit({
27201
+ response,
27202
+ url,
27203
+ onChunk: scanner.push
27204
+ });
27205
+ const scanned = scanner.finish();
27206
+ responseBody = scanned.text;
27207
+ schema = withBinaryFields(responseSchema, scanned.binaries);
27208
+ }
27209
+ const parsedResult = await safeParseJSON$4({
27210
+ text: responseBody,
27211
+ schema
27212
+ });
27213
+ const responseHeaders = extractResponseHeaders(response);
27214
+ if (!parsedResult.success) throw new APICallError({
27215
+ message: "Invalid JSON response",
27216
+ cause: parsedResult.error,
27217
+ statusCode: response.status,
27218
+ responseHeaders,
27219
+ responseBody,
27220
+ url,
27221
+ requestBodyValues
27222
+ });
27223
+ return {
27224
+ responseHeaders,
27225
+ value: parsedResult.value,
27226
+ rawValue: parsedResult.rawValue
27227
+ };
26734
27228
  };
26735
27229
  };
26736
27230
  const createJsonLinesResponseHandler = (responseSchema, { maxLineBytes = DEFAULT_MAX_JSON_LINE_BYTES } = {}) => {
@@ -26814,20 +27308,20 @@ function isJSONSerializable(value) {
26814
27308
  if (Object.getPrototypeOf(value) === Object.prototype) return Object.values(value).every(isJSONSerializable);
26815
27309
  return false;
26816
27310
  }
26817
- const name$17 = "AI_SerializationError";
26818
- const marker$18 = `vercel.ai.error.${name$17}`;
26819
- const symbol$18 = Symbol.for(marker$18);
27311
+ const name$12 = "AI_SerializationError";
27312
+ const marker$12 = `vercel.ai.error.${name$12}`;
27313
+ const symbol$12 = Symbol.for(marker$12);
26820
27314
  var SerializationError = class extends AISDKError$4 {
26821
27315
  constructor({ message = "Failed to serialize value.", cause } = {}) {
26822
27316
  super({
26823
- name: name$17,
27317
+ name: name$12,
26824
27318
  message,
26825
27319
  cause
26826
27320
  });
26827
- this[symbol$18] = true;
27321
+ this[symbol$12] = true;
26828
27322
  }
26829
27323
  static isInstance(error) {
26830
- return AISDKError$4.hasMarker(error, marker$18);
27324
+ return AISDKError$4.hasMarker(error, marker$12);
26831
27325
  }
26832
27326
  };
26833
27327
  /**
@@ -36785,7 +37279,7 @@ async function resolveImageDimensionsAsync(part) {
36785
37279
  const url = resolveHttpAssetUrl(getObjectValue(part, "image") ?? getObjectValue(part, "data"));
36786
37280
  if (!url) return existing;
36787
37281
  try {
36788
- const probeImageSize = (await Promise.resolve().then(() => /* @__PURE__ */ require_rolldown_runtime.__toESM(require("./probe-image-size--ACsCqf-.cjs").default, 1))).default;
37282
+ const probeImageSize = (await Promise.resolve().then(() => /* @__PURE__ */ require_rolldown_runtime.__toESM(require("./probe-image-size-CIvA48eX.cjs").default, 1))).default;
36789
37283
  const probed = await probeImageSize(url, {
36790
37284
  open_timeout: REMOTE_IMAGE_PROBE_TIMEOUT_MS,
36791
37285
  response_timeout: REMOTE_IMAGE_PROBE_TIMEOUT_MS,
@@ -52106,7 +52600,7 @@ const createModelInstance = async (provider, modelId, version = "v2") => {
52106
52600
  try {
52107
52601
  const providerFn = version === `v1` ? { v1: {
52108
52602
  openai: async () => {
52109
- const { openai } = await Promise.resolve().then(() => require("./dist-ToffHjwd.cjs"));
52603
+ const { openai } = await Promise.resolve().then(() => require("./dist-D4zWd2g_.cjs"));
52110
52604
  return openai(modelId);
52111
52605
  },
52112
52606
  anthropic: async () => {
@@ -59936,4 +60430,4 @@ Object.defineProperty(exports, "require_webp", {
59936
60430
  }
59937
60431
  });
59938
60432
 
59939
- //# sourceMappingURL=dist-D2zyg15_.cjs.map
60433
+ //# sourceMappingURL=dist-BgMRdBmR.cjs.map