@mastra/server 1.33.0-alpha.3 → 1.33.0-alpha.4

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 (166) hide show
  1. package/CHANGELOG.md +36 -0
  2. package/dist/_types/@internal_core/dist/index.d.ts +9 -1
  3. package/dist/{api-schema-manifest-X5B3P6OC.cjs → api-schema-manifest-MWMQI6TE.cjs} +4 -4
  4. package/dist/{api-schema-manifest-X5B3P6OC.cjs.map → api-schema-manifest-MWMQI6TE.cjs.map} +1 -1
  5. package/dist/{api-schema-manifest-JJDOQRPI.js → api-schema-manifest-OBRC34LA.js} +3 -3
  6. package/dist/{api-schema-manifest-JJDOQRPI.js.map → api-schema-manifest-OBRC34LA.js.map} +1 -1
  7. package/dist/{chunk-U5G72POG.js → chunk-247ZCPZW.js} +4 -4
  8. package/dist/{chunk-U5G72POG.js.map → chunk-247ZCPZW.js.map} +1 -1
  9. package/dist/{chunk-HFNLYENA.js → chunk-27MTROCI.js} +3 -3
  10. package/dist/{chunk-HFNLYENA.js.map → chunk-27MTROCI.js.map} +1 -1
  11. package/dist/{chunk-BZBG3MLF.cjs → chunk-2XNLZANZ.cjs} +3 -3
  12. package/dist/{chunk-BZBG3MLF.cjs.map → chunk-2XNLZANZ.cjs.map} +1 -1
  13. package/dist/{chunk-XDPKDD6J.js → chunk-3J5YIIAC.js} +3 -3
  14. package/dist/{chunk-XDPKDD6J.js.map → chunk-3J5YIIAC.js.map} +1 -1
  15. package/dist/{chunk-J6LU7NDU.js → chunk-3S77SMGK.js} +95 -4
  16. package/dist/chunk-3S77SMGK.js.map +1 -0
  17. package/dist/{chunk-EEDVUS6P.js → chunk-4OJDWKDW.js} +3 -3
  18. package/dist/{chunk-EEDVUS6P.js.map → chunk-4OJDWKDW.js.map} +1 -1
  19. package/dist/{chunk-GUWIV3ZN.cjs → chunk-4QZCXU3A.cjs} +9 -2
  20. package/dist/chunk-4QZCXU3A.cjs.map +1 -0
  21. package/dist/{chunk-PXMVZCUO.cjs → chunk-6ZSBLNO2.cjs} +3 -3
  22. package/dist/{chunk-PXMVZCUO.cjs.map → chunk-6ZSBLNO2.cjs.map} +1 -1
  23. package/dist/{chunk-25CXKVSW.cjs → chunk-767P6IDT.cjs} +174 -82
  24. package/dist/chunk-767P6IDT.cjs.map +1 -0
  25. package/dist/{chunk-OSUAMRZD.cjs → chunk-7BXQ2HFG.cjs} +25 -25
  26. package/dist/{chunk-OSUAMRZD.cjs.map → chunk-7BXQ2HFG.cjs.map} +1 -1
  27. package/dist/{chunk-CNTWPG57.cjs → chunk-CXAJPAJ2.cjs} +9 -2
  28. package/dist/chunk-CXAJPAJ2.cjs.map +1 -0
  29. package/dist/{chunk-UKWW47HL.js → chunk-D4XVXXDX.js} +3 -3
  30. package/dist/{chunk-UKWW47HL.js.map → chunk-D4XVXXDX.js.map} +1 -1
  31. package/dist/{chunk-PTLWJUYU.cjs → chunk-D5H4LH6V.cjs} +7 -7
  32. package/dist/{chunk-PTLWJUYU.cjs.map → chunk-D5H4LH6V.cjs.map} +1 -1
  33. package/dist/{chunk-377XDZUV.cjs → chunk-DBY645PQ.cjs} +157 -12
  34. package/dist/chunk-DBY645PQ.cjs.map +1 -0
  35. package/dist/{chunk-OXSLQPWP.cjs → chunk-DWQGAKMB.cjs} +4 -4
  36. package/dist/{chunk-OXSLQPWP.cjs.map → chunk-DWQGAKMB.cjs.map} +1 -1
  37. package/dist/{chunk-NJ2L4CM6.js → chunk-EIJLTW5X.js} +3 -3
  38. package/dist/{chunk-NJ2L4CM6.js.map → chunk-EIJLTW5X.js.map} +1 -1
  39. package/dist/{chunk-FOZ7WC36.cjs → chunk-GWLMGMHI.cjs} +464 -278
  40. package/dist/chunk-GWLMGMHI.cjs.map +1 -0
  41. package/dist/{chunk-MAUNZ6BS.js → chunk-ING7J2GB.js} +3 -3
  42. package/dist/{chunk-MAUNZ6BS.js.map → chunk-ING7J2GB.js.map} +1 -1
  43. package/dist/{chunk-3TT3XABO.js → chunk-IUXM3WA2.js} +8 -4
  44. package/dist/chunk-IUXM3WA2.js.map +1 -0
  45. package/dist/{chunk-SLXPPVD3.cjs → chunk-J4FVO25L.cjs} +8 -4
  46. package/dist/chunk-J4FVO25L.cjs.map +1 -0
  47. package/dist/{chunk-WIUKDNAE.js → chunk-JNIAMBSQ.js} +3 -3
  48. package/dist/{chunk-WIUKDNAE.js.map → chunk-JNIAMBSQ.js.map} +1 -1
  49. package/dist/{chunk-43CWQ4M3.js → chunk-KCVOCZXG.js} +9 -3
  50. package/dist/chunk-KCVOCZXG.js.map +1 -0
  51. package/dist/{chunk-TJNZEYLA.js → chunk-KEE6UMGC.js} +9 -2
  52. package/dist/chunk-KEE6UMGC.js.map +1 -0
  53. package/dist/{chunk-624PVCHI.js → chunk-LYDIFPB2.js} +3 -3
  54. package/dist/{chunk-624PVCHI.js.map → chunk-LYDIFPB2.js.map} +1 -1
  55. package/dist/{chunk-LAUE43XU.cjs → chunk-MOH4DZJP.cjs} +4 -4
  56. package/dist/{chunk-LAUE43XU.cjs.map → chunk-MOH4DZJP.cjs.map} +1 -1
  57. package/dist/{chunk-WIXZRRJE.cjs → chunk-MW23D33F.cjs} +6 -4
  58. package/dist/chunk-MW23D33F.cjs.map +1 -0
  59. package/dist/{chunk-AY3L2K4Y.cjs → chunk-MZFFAVXZ.cjs} +3 -3
  60. package/dist/{chunk-AY3L2K4Y.cjs.map → chunk-MZFFAVXZ.cjs.map} +1 -1
  61. package/dist/{chunk-A6J3CYNX.cjs → chunk-N2JR3ER7.cjs} +17 -17
  62. package/dist/{chunk-A6J3CYNX.cjs.map → chunk-N2JR3ER7.cjs.map} +1 -1
  63. package/dist/{chunk-HRV2M5BX.js → chunk-NHQKZEVJ.js} +131 -6
  64. package/dist/chunk-NHQKZEVJ.js.map +1 -0
  65. package/dist/{chunk-MGSLTJZ3.js → chunk-NPNRCLYK.js} +444 -258
  66. package/dist/chunk-NPNRCLYK.js.map +1 -0
  67. package/dist/{chunk-TEUAEW3K.js → chunk-OCFLDDPE.js} +6 -4
  68. package/dist/chunk-OCFLDDPE.js.map +1 -0
  69. package/dist/{chunk-JOMZXGHK.js → chunk-OMOR5OUN.js} +4 -4
  70. package/dist/{chunk-JOMZXGHK.js.map → chunk-OMOR5OUN.js.map} +1 -1
  71. package/dist/{chunk-LTQAE2EZ.js → chunk-OSXOHBCO.js} +3 -3
  72. package/dist/{chunk-LTQAE2EZ.js.map → chunk-OSXOHBCO.js.map} +1 -1
  73. package/dist/{chunk-2LIWBIH2.cjs → chunk-SZOC7JGR.cjs} +30 -30
  74. package/dist/{chunk-2LIWBIH2.cjs.map → chunk-SZOC7JGR.cjs.map} +1 -1
  75. package/dist/{chunk-LBYV6CLG.cjs → chunk-TRB4NGQ3.cjs} +3 -3
  76. package/dist/{chunk-LBYV6CLG.cjs.map → chunk-TRB4NGQ3.cjs.map} +1 -1
  77. package/dist/{chunk-PQHGVAHX.js → chunk-TZFIX2NI.js} +3 -3
  78. package/dist/{chunk-PQHGVAHX.js.map → chunk-TZFIX2NI.js.map} +1 -1
  79. package/dist/{chunk-2EYHTORX.js → chunk-UVLQSMYF.js} +23 -22
  80. package/dist/{chunk-2EYHTORX.js.map → chunk-UVLQSMYF.js.map} +1 -1
  81. package/dist/{chunk-ZYIGNK6T.cjs → chunk-VQMQBGDO.cjs} +3 -3
  82. package/dist/{chunk-ZYIGNK6T.cjs.map → chunk-VQMQBGDO.cjs.map} +1 -1
  83. package/dist/{chunk-MFICYRVR.cjs → chunk-WC3F3EA5.cjs} +4 -4
  84. package/dist/{chunk-MFICYRVR.cjs.map → chunk-WC3F3EA5.cjs.map} +1 -1
  85. package/dist/{chunk-SUGHLGVF.cjs → chunk-Y5FNAVOR.cjs} +172 -171
  86. package/dist/chunk-Y5FNAVOR.cjs.map +1 -0
  87. package/dist/docs/SKILL.md +1 -1
  88. package/dist/docs/assets/SOURCE_MAP.json +1 -1
  89. package/dist/server/a2a/agent-card-signing.d.ts +7 -0
  90. package/dist/server/a2a/agent-card-signing.d.ts.map +1 -0
  91. package/dist/server/handlers/a2a.cjs +14 -14
  92. package/dist/server/handlers/a2a.d.ts +10 -0
  93. package/dist/server/handlers/a2a.d.ts.map +1 -1
  94. package/dist/server/handlers/a2a.js +1 -1
  95. package/dist/server/handlers/agent-builder.cjs +16 -16
  96. package/dist/server/handlers/agent-builder.js +1 -1
  97. package/dist/server/handlers/agents.cjs +42 -38
  98. package/dist/server/handlers/agents.d.ts +157 -0
  99. package/dist/server/handlers/agents.d.ts.map +1 -1
  100. package/dist/server/handlers/agents.js +1 -1
  101. package/dist/server/handlers/background-tasks.cjs +4 -4
  102. package/dist/server/handlers/background-tasks.d.ts +18 -5
  103. package/dist/server/handlers/background-tasks.d.ts.map +1 -1
  104. package/dist/server/handlers/background-tasks.js +1 -1
  105. package/dist/server/handlers/conversations.cjs +5 -5
  106. package/dist/server/handlers/conversations.js +1 -1
  107. package/dist/server/handlers/observability-new-endpoints.cjs +28 -28
  108. package/dist/server/handlers/observability-new-endpoints.d.ts +18 -6
  109. package/dist/server/handlers/observability-new-endpoints.d.ts.map +1 -1
  110. package/dist/server/handlers/observability-new-endpoints.js +1 -1
  111. package/dist/server/handlers/observability.cjs +38 -38
  112. package/dist/server/handlers/observability.js +2 -2
  113. package/dist/server/handlers/responses.cjs +4 -4
  114. package/dist/server/handlers/responses.js +1 -1
  115. package/dist/server/handlers/scores.cjs +7 -7
  116. package/dist/server/handlers/scores.js +1 -1
  117. package/dist/server/handlers/stored-agents.cjs +7 -7
  118. package/dist/server/handlers/stored-agents.js +1 -1
  119. package/dist/server/handlers/stored-mcp-clients.cjs +6 -6
  120. package/dist/server/handlers/stored-mcp-clients.js +1 -1
  121. package/dist/server/handlers/stored-prompt-blocks.cjs +6 -6
  122. package/dist/server/handlers/stored-prompt-blocks.js +1 -1
  123. package/dist/server/handlers/stored-scorers.cjs +6 -6
  124. package/dist/server/handlers/stored-scorers.js +1 -1
  125. package/dist/server/handlers/system.cjs +3 -3
  126. package/dist/server/handlers/system.js +1 -1
  127. package/dist/server/handlers/tools.cjs +6 -6
  128. package/dist/server/handlers/tools.js +1 -1
  129. package/dist/server/handlers/voice.cjs +8 -8
  130. package/dist/server/handlers/voice.js +1 -1
  131. package/dist/server/handlers/workflows.cjs +24 -24
  132. package/dist/server/handlers/workflows.js +1 -1
  133. package/dist/server/handlers.cjs +27 -27
  134. package/dist/server/handlers.js +11 -11
  135. package/dist/server/schemas/a2a.d.ts +5 -0
  136. package/dist/server/schemas/a2a.d.ts.map +1 -1
  137. package/dist/server/schemas/agents.d.ts +77 -0
  138. package/dist/server/schemas/agents.d.ts.map +1 -1
  139. package/dist/server/schemas/background-tasks.d.ts +11 -0
  140. package/dist/server/schemas/background-tasks.d.ts.map +1 -1
  141. package/dist/server/schemas/index.cjs +289 -285
  142. package/dist/server/schemas/index.js +7 -7
  143. package/dist/server/server-adapter/index.cjs +10 -10
  144. package/dist/server/server-adapter/index.js +2 -2
  145. package/dist/server/server-adapter/routes/a2a.d.ts +10 -0
  146. package/dist/server/server-adapter/routes/a2a.d.ts.map +1 -1
  147. package/dist/server/server-adapter/routes/agents.d.ts +2 -1
  148. package/dist/server/server-adapter/routes/agents.d.ts.map +1 -1
  149. package/dist/server/server-adapter/routes/observability.d.ts +9 -3
  150. package/dist/server/server-adapter/routes/observability.d.ts.map +1 -1
  151. package/package.json +7 -6
  152. package/dist/chunk-25CXKVSW.cjs.map +0 -1
  153. package/dist/chunk-377XDZUV.cjs.map +0 -1
  154. package/dist/chunk-3TT3XABO.js.map +0 -1
  155. package/dist/chunk-43CWQ4M3.js.map +0 -1
  156. package/dist/chunk-CNTWPG57.cjs.map +0 -1
  157. package/dist/chunk-FOZ7WC36.cjs.map +0 -1
  158. package/dist/chunk-GUWIV3ZN.cjs.map +0 -1
  159. package/dist/chunk-HRV2M5BX.js.map +0 -1
  160. package/dist/chunk-J6LU7NDU.js.map +0 -1
  161. package/dist/chunk-MGSLTJZ3.js.map +0 -1
  162. package/dist/chunk-SLXPPVD3.cjs.map +0 -1
  163. package/dist/chunk-SUGHLGVF.cjs.map +0 -1
  164. package/dist/chunk-TEUAEW3K.js.map +0 -1
  165. package/dist/chunk-TJNZEYLA.js.map +0 -1
  166. package/dist/chunk-WIXZRRJE.cjs.map +0 -1
@@ -1,11 +1,11 @@
1
1
  'use strict';
2
2
 
3
+ var chunkD5H4LH6V_cjs = require('./chunk-D5H4LH6V.cjs');
3
4
  var chunkSEAOI56Z_cjs = require('./chunk-SEAOI56Z.cjs');
5
+ var chunkTF7NSMHW_cjs = require('./chunk-TF7NSMHW.cjs');
4
6
  var chunkBBX7Q7UG_cjs = require('./chunk-BBX7Q7UG.cjs');
5
7
  var chunkR2ODPDKE_cjs = require('./chunk-R2ODPDKE.cjs');
6
- var chunkPTLWJUYU_cjs = require('./chunk-PTLWJUYU.cjs');
7
- var chunkTF7NSMHW_cjs = require('./chunk-TF7NSMHW.cjs');
8
- var chunkGUWIV3ZN_cjs = require('./chunk-GUWIV3ZN.cjs');
8
+ var chunk4QZCXU3A_cjs = require('./chunk-4QZCXU3A.cjs');
9
9
  var chunkIQMLYFOO_cjs = require('./chunk-IQMLYFOO.cjs');
10
10
  var chunkDIG2K5CV_cjs = require('./chunk-DIG2K5CV.cjs');
11
11
  var chunk7756JXUH_cjs = require('./chunk-7756JXUH.cjs');
@@ -61,7 +61,7 @@ var require_ignore = chunkO7I5CWRX_cjs.__commonJS({
61
61
  }
62
62
  var UNDEFINED = void 0;
63
63
  var EMPTY = "";
64
- var SPACE = " ";
64
+ var SPACE4 = " ";
65
65
  var ESCAPE = "\\";
66
66
  var REGEX_TEST_BLANK_LINE = /^\s+$/;
67
67
  var REGEX_INVALID_TRAILING_BACKSLASH = /(?:[^\\]|^)\\$/;
@@ -105,7 +105,7 @@ var require_ignore = chunkO7I5CWRX_cjs.__commonJS({
105
105
  // (a ) -> (a)
106
106
  // (a \ ) -> (a )
107
107
  /((?:\\\\)*?)(\\?\s+)$/,
108
- (_, m1, m2) => m1 + (m2.indexOf("\\") === 0 ? SPACE : EMPTY)
108
+ (_, m1, m2) => m1 + (m2.indexOf("\\") === 0 ? SPACE4 : EMPTY)
109
109
  ],
110
110
  // Replace (\ ) with ' '
111
111
  // (\ ) -> ' '
@@ -115,7 +115,7 @@ var require_ignore = chunkO7I5CWRX_cjs.__commonJS({
115
115
  /(\\+?)\s/g,
116
116
  (_, m1) => {
117
117
  const { length } = m1;
118
- return m1.slice(0, length - length % 2) + SPACE;
118
+ return m1.slice(0, length - length % 2) + SPACE4;
119
119
  }
120
120
  ],
121
121
  // Escape metacharacters
@@ -5004,6 +5004,9 @@ var ParseError = class extends Error {
5004
5004
  super(message), this.name = "ParseError", this.type = options.type, this.field = options.field, this.value = options.value, this.line = options.line;
5005
5005
  }
5006
5006
  };
5007
+ var LF = 10;
5008
+ var CR = 13;
5009
+ var SPACE = 32;
5007
5010
  function noop(_arg) {
5008
5011
  }
5009
5012
  function createParser(callbacks) {
@@ -5011,39 +5014,109 @@ function createParser(callbacks) {
5011
5014
  throw new TypeError(
5012
5015
  "`callbacks` must be an object, got a function instead. Did you mean `{onEvent: fn}`?"
5013
5016
  );
5014
- const { onEvent = noop, onError = noop, onRetry = noop, onComment } = callbacks;
5015
- let incompleteLine = "", isFirstChunk = true, id, data = "", eventType = "";
5016
- function feed(newChunk) {
5017
- const chunk = isFirstChunk ? newChunk.replace(/^\xEF\xBB\xBF/, "") : newChunk, [complete, incomplete] = splitLines(`${incompleteLine}${chunk}`);
5018
- for (const line of complete)
5019
- parseLine(line);
5020
- incompleteLine = incomplete, isFirstChunk = false;
5021
- }
5022
- function parseLine(line) {
5023
- if (line === "") {
5017
+ const { onEvent = noop, onError = noop, onRetry = noop, onComment } = callbacks, pendingFragments = [];
5018
+ let isFirstChunk = true, id, data = "", dataLines = 0, eventType;
5019
+ function feed(chunk) {
5020
+ if (isFirstChunk && (isFirstChunk = false, chunk.charCodeAt(0) === 239 && chunk.charCodeAt(1) === 187 && chunk.charCodeAt(2) === 191 && (chunk = chunk.slice(3))), pendingFragments.length === 0) {
5021
+ const trailing2 = processLines(chunk);
5022
+ trailing2 !== "" && pendingFragments.push(trailing2);
5023
+ return;
5024
+ }
5025
+ if (chunk.indexOf(`
5026
+ `) === -1 && chunk.indexOf("\r") === -1) {
5027
+ pendingFragments.push(chunk);
5028
+ return;
5029
+ }
5030
+ pendingFragments.push(chunk);
5031
+ const input = pendingFragments.join("");
5032
+ pendingFragments.length = 0;
5033
+ const trailing = processLines(input);
5034
+ trailing !== "" && pendingFragments.push(trailing);
5035
+ }
5036
+ function processLines(chunk) {
5037
+ let searchIndex = 0;
5038
+ if (chunk.indexOf("\r") === -1) {
5039
+ let lfIndex = chunk.indexOf(`
5040
+ `, searchIndex);
5041
+ for (; lfIndex !== -1; ) {
5042
+ if (searchIndex === lfIndex) {
5043
+ dataLines > 0 && onEvent({ id, event: eventType, data }), id = void 0, data = "", dataLines = 0, eventType = void 0, searchIndex = lfIndex + 1, lfIndex = chunk.indexOf(`
5044
+ `, searchIndex);
5045
+ continue;
5046
+ }
5047
+ const firstCharCode = chunk.charCodeAt(searchIndex);
5048
+ if (isDataPrefix(chunk, searchIndex, firstCharCode)) {
5049
+ const valueStart = chunk.charCodeAt(searchIndex + 5) === SPACE ? searchIndex + 6 : searchIndex + 5, value = chunk.slice(valueStart, lfIndex);
5050
+ if (dataLines === 0 && chunk.charCodeAt(lfIndex + 1) === LF) {
5051
+ onEvent({ id, event: eventType, data: value }), id = void 0, data = "", eventType = void 0, searchIndex = lfIndex + 2, lfIndex = chunk.indexOf(`
5052
+ `, searchIndex);
5053
+ continue;
5054
+ }
5055
+ data = dataLines === 0 ? value : `${data}
5056
+ ${value}`, dataLines++;
5057
+ } else isEventPrefix(chunk, searchIndex, firstCharCode) ? eventType = chunk.slice(
5058
+ chunk.charCodeAt(searchIndex + 6) === SPACE ? searchIndex + 7 : searchIndex + 6,
5059
+ lfIndex
5060
+ ) || void 0 : parseLine(chunk, searchIndex, lfIndex);
5061
+ searchIndex = lfIndex + 1, lfIndex = chunk.indexOf(`
5062
+ `, searchIndex);
5063
+ }
5064
+ return chunk.slice(searchIndex);
5065
+ }
5066
+ for (; searchIndex < chunk.length; ) {
5067
+ const crIndex = chunk.indexOf("\r", searchIndex), lfIndex = chunk.indexOf(`
5068
+ `, searchIndex);
5069
+ let lineEnd = -1;
5070
+ if (crIndex !== -1 && lfIndex !== -1 ? lineEnd = crIndex < lfIndex ? crIndex : lfIndex : crIndex !== -1 ? crIndex === chunk.length - 1 ? lineEnd = -1 : lineEnd = crIndex : lfIndex !== -1 && (lineEnd = lfIndex), lineEnd === -1)
5071
+ break;
5072
+ parseLine(chunk, searchIndex, lineEnd), searchIndex = lineEnd + 1, chunk.charCodeAt(searchIndex - 1) === CR && chunk.charCodeAt(searchIndex) === LF && searchIndex++;
5073
+ }
5074
+ return chunk.slice(searchIndex);
5075
+ }
5076
+ function parseLine(chunk, start, end) {
5077
+ if (start === end) {
5024
5078
  dispatchEvent();
5025
5079
  return;
5026
5080
  }
5027
- if (line.startsWith(":")) {
5028
- onComment && onComment(line.slice(line.startsWith(": ") ? 2 : 1));
5081
+ const firstCharCode = chunk.charCodeAt(start);
5082
+ if (isDataPrefix(chunk, start, firstCharCode)) {
5083
+ const valueStart = chunk.charCodeAt(start + 5) === SPACE ? start + 6 : start + 5, value2 = chunk.slice(valueStart, end);
5084
+ data = dataLines === 0 ? value2 : `${data}
5085
+ ${value2}`, dataLines++;
5029
5086
  return;
5030
5087
  }
5031
- const fieldSeparatorIndex = line.indexOf(":");
5032
- if (fieldSeparatorIndex !== -1) {
5033
- const field = line.slice(0, fieldSeparatorIndex), offset = line[fieldSeparatorIndex + 1] === " " ? 2 : 1, value = line.slice(fieldSeparatorIndex + offset);
5034
- processField(field, value, line);
5088
+ if (isEventPrefix(chunk, start, firstCharCode)) {
5089
+ eventType = chunk.slice(chunk.charCodeAt(start + 6) === SPACE ? start + 7 : start + 6, end) || void 0;
5035
5090
  return;
5036
5091
  }
5037
- processField(line, "", line);
5092
+ if (firstCharCode === 105 && chunk.charCodeAt(start + 1) === 100 && chunk.charCodeAt(start + 2) === 58) {
5093
+ const value2 = chunk.slice(chunk.charCodeAt(start + 3) === SPACE ? start + 4 : start + 3, end);
5094
+ id = value2.includes("\0") ? void 0 : value2;
5095
+ return;
5096
+ }
5097
+ if (firstCharCode === 58) {
5098
+ if (onComment) {
5099
+ const line2 = chunk.slice(start, end);
5100
+ onComment(line2.slice(chunk.charCodeAt(start + 1) === SPACE ? 2 : 1));
5101
+ }
5102
+ return;
5103
+ }
5104
+ const line = chunk.slice(start, end), fieldSeparatorIndex = line.indexOf(":");
5105
+ if (fieldSeparatorIndex === -1) {
5106
+ processField(line, "", line);
5107
+ return;
5108
+ }
5109
+ const field = line.slice(0, fieldSeparatorIndex), offset = line.charCodeAt(fieldSeparatorIndex + 1) === SPACE ? 2 : 1, value = line.slice(fieldSeparatorIndex + offset);
5110
+ processField(field, value, line);
5038
5111
  }
5039
5112
  function processField(field, value, line) {
5040
5113
  switch (field) {
5041
5114
  case "event":
5042
- eventType = value;
5115
+ eventType = value || void 0;
5043
5116
  break;
5044
5117
  case "data":
5045
- data = `${data}${value}
5046
- `;
5118
+ data = dataLines === 0 ? value : `${data}
5119
+ ${value}`, dataLines++;
5047
5120
  break;
5048
5121
  case "id":
5049
5122
  id = value.includes("\0") ? void 0 : value;
@@ -5068,37 +5141,26 @@ function createParser(callbacks) {
5068
5141
  }
5069
5142
  }
5070
5143
  function dispatchEvent() {
5071
- data.length > 0 && onEvent({
5144
+ dataLines > 0 && onEvent({
5072
5145
  id,
5073
- event: eventType || void 0,
5074
- // If the data buffer's last character is a U+000A LINE FEED (LF) character,
5075
- // then remove the last character from the data buffer.
5076
- data: data.endsWith(`
5077
- `) ? data.slice(0, -1) : data
5078
- }), id = void 0, data = "", eventType = "";
5146
+ event: eventType,
5147
+ data
5148
+ }), id = void 0, data = "", dataLines = 0, eventType = void 0;
5079
5149
  }
5080
5150
  function reset(options = {}) {
5081
- incompleteLine && options.consume && parseLine(incompleteLine), isFirstChunk = true, id = void 0, data = "", eventType = "", incompleteLine = "";
5151
+ if (options.consume && pendingFragments.length > 0) {
5152
+ const incompleteLine = pendingFragments.join("");
5153
+ parseLine(incompleteLine, 0, incompleteLine.length);
5154
+ }
5155
+ isFirstChunk = true, id = void 0, data = "", dataLines = 0, eventType = void 0, pendingFragments.length = 0;
5082
5156
  }
5083
5157
  return { feed, reset };
5084
5158
  }
5085
- function splitLines(chunk) {
5086
- const lines = [];
5087
- let incompleteLine = "", searchIndex = 0;
5088
- for (; searchIndex < chunk.length; ) {
5089
- const crIndex = chunk.indexOf("\r", searchIndex), lfIndex = chunk.indexOf(`
5090
- `, searchIndex);
5091
- let lineEnd = -1;
5092
- if (crIndex !== -1 && lfIndex !== -1 ? lineEnd = Math.min(crIndex, lfIndex) : crIndex !== -1 ? crIndex === chunk.length - 1 ? lineEnd = -1 : lineEnd = crIndex : lfIndex !== -1 && (lineEnd = lfIndex), lineEnd === -1) {
5093
- incompleteLine = chunk.slice(searchIndex);
5094
- break;
5095
- } else {
5096
- const line = chunk.slice(searchIndex, lineEnd);
5097
- lines.push(line), searchIndex = lineEnd + 1, chunk[searchIndex - 1] === "\r" && chunk[searchIndex] === `
5098
- ` && searchIndex++;
5099
- }
5100
- }
5101
- return [lines, incompleteLine];
5159
+ function isDataPrefix(chunk, i, firstCharCode) {
5160
+ return firstCharCode === 100 && chunk.charCodeAt(i + 1) === 97 && chunk.charCodeAt(i + 2) === 116 && chunk.charCodeAt(i + 3) === 97 && chunk.charCodeAt(i + 4) === 58;
5161
+ }
5162
+ function isEventPrefix(chunk, i, firstCharCode) {
5163
+ return firstCharCode === 101 && chunk.charCodeAt(i + 1) === 118 && chunk.charCodeAt(i + 2) === 101 && chunk.charCodeAt(i + 3) === 110 && chunk.charCodeAt(i + 4) === 116 && chunk.charCodeAt(i + 5) === 58;
5102
5164
  }
5103
5165
  var EventSourceParserStream = class extends TransformStream {
5104
5166
  constructor({ onError, onRetry, onComment } = {}) {
@@ -5274,7 +5336,7 @@ function withUserAgentSuffix(headers, ...userAgentSuffixParts) {
5274
5336
  );
5275
5337
  return Object.fromEntries(normalizedHeaders.entries());
5276
5338
  }
5277
- var VERSION2 = "3.0.23";
5339
+ var VERSION2 = "3.0.25";
5278
5340
  var getOriginalFetch = () => globalThis.fetch;
5279
5341
  var getFromApi = async ({
5280
5342
  url,
@@ -5743,6 +5805,33 @@ var createJsonResponseHandler = (responseSchema) => async ({ response, url, requ
5743
5805
  rawValue: parsedResult.rawValue
5744
5806
  };
5745
5807
  };
5808
+ var schemaSymbol2 = /* @__PURE__ */ Symbol.for("vercel.ai.schema");
5809
+ function lazySchema(createSchema) {
5810
+ let schema;
5811
+ return () => {
5812
+ if (schema == null) {
5813
+ schema = createSchema();
5814
+ }
5815
+ return schema;
5816
+ };
5817
+ }
5818
+ function jsonSchema2(jsonSchema22, {
5819
+ validate
5820
+ } = {}) {
5821
+ return {
5822
+ [schemaSymbol2]: true,
5823
+ _type: void 0,
5824
+ // should never be used directly
5825
+ [validatorSymbol2]: true,
5826
+ get jsonSchema() {
5827
+ if (typeof jsonSchema22 === "function") {
5828
+ jsonSchema22 = jsonSchema22();
5829
+ }
5830
+ return jsonSchema22;
5831
+ },
5832
+ validate
5833
+ };
5834
+ }
5746
5835
  function addAdditionalPropertiesToJsonSchema(jsonSchema22) {
5747
5836
  if (jsonSchema22.type === "object") {
5748
5837
  jsonSchema22.additionalProperties = false;
@@ -5768,13 +5857,6 @@ function addAdditionalPropertiesToJsonSchema(jsonSchema22) {
5768
5857
  }
5769
5858
  return jsonSchema22;
5770
5859
  }
5771
- var getRelativePath2 = (pathA, pathB) => {
5772
- let i = 0;
5773
- for (; i < pathA.length && i < pathB.length; i++) {
5774
- if (pathA[i] !== pathB[i]) break;
5775
- }
5776
- return [(pathA.length - i).toString(), ...pathB.slice(i)].join("/");
5777
- };
5778
5860
  var ignoreOverride2 = /* @__PURE__ */ Symbol(
5779
5861
  "Let zodToJsonSchema decide on which parser to use"
5780
5862
  );
@@ -6718,6 +6800,13 @@ var selectParser2 = (def, typeName, refs) => {
6718
6800
  return /* @__PURE__ */ ((_) => void 0)();
6719
6801
  }
6720
6802
  };
6803
+ var getRelativePath2 = (pathA, pathB) => {
6804
+ let i = 0;
6805
+ for (; i < pathA.length && i < pathB.length; i++) {
6806
+ if (pathA[i] !== pathB[i]) break;
6807
+ }
6808
+ return [(pathA.length - i).toString(), ...pathB.slice(i)].join("/");
6809
+ };
6721
6810
  function parseDef2(def, refs, forceResolution = false) {
6722
6811
  var _a224;
6723
6812
  const seenItem = refs.seen.get(def);
@@ -6897,33 +6986,6 @@ function zodSchema2(zodSchema22, options) {
6897
6986
  return zod3Schema(zodSchema22);
6898
6987
  }
6899
6988
  }
6900
- var schemaSymbol2 = /* @__PURE__ */ Symbol.for("vercel.ai.schema");
6901
- function lazySchema(createSchema) {
6902
- let schema;
6903
- return () => {
6904
- if (schema == null) {
6905
- schema = createSchema();
6906
- }
6907
- return schema;
6908
- };
6909
- }
6910
- function jsonSchema2(jsonSchema22, {
6911
- validate
6912
- } = {}) {
6913
- return {
6914
- [schemaSymbol2]: true,
6915
- _type: void 0,
6916
- // should never be used directly
6917
- [validatorSymbol2]: true,
6918
- get jsonSchema() {
6919
- if (typeof jsonSchema22 === "function") {
6920
- jsonSchema22 = jsonSchema22();
6921
- }
6922
- return jsonSchema22;
6923
- },
6924
- validate
6925
- };
6926
- }
6927
6989
  function isSchema2(value) {
6928
6990
  return typeof value === "object" && value !== null && schemaSymbol2 in value && value[schemaSymbol2] === true && "jsonSchema" in value && "validate" in value;
6929
6991
  }
@@ -7211,6 +7273,19 @@ var gatewayErrorResponseSchema = lazyValidator(
7211
7273
  })
7212
7274
  )
7213
7275
  );
7276
+ function extractApiCallResponse(error) {
7277
+ if (error.data !== void 0) {
7278
+ return error.data;
7279
+ }
7280
+ if (error.responseBody != null) {
7281
+ try {
7282
+ return JSON.parse(error.responseBody);
7283
+ } catch (e2) {
7284
+ return error.responseBody;
7285
+ }
7286
+ }
7287
+ return {};
7288
+ }
7214
7289
  var name74 = "GatewayTimeoutError";
7215
7290
  var marker84 = `vercel.ai.gateway.error.${name74}`;
7216
7291
  var symbol84 = Symbol.for(marker84);
@@ -7297,19 +7372,6 @@ async function asGatewayError(error, authMethod) {
7297
7372
  authMethod
7298
7373
  });
7299
7374
  }
7300
- function extractApiCallResponse(error) {
7301
- if (error.data !== void 0) {
7302
- return error.data;
7303
- }
7304
- if (error.responseBody != null) {
7305
- try {
7306
- return JSON.parse(error.responseBody);
7307
- } catch (e2) {
7308
- return error.responseBody;
7309
- }
7310
- }
7311
- return {};
7312
- }
7313
7375
  var GATEWAY_AUTH_METHOD_HEADER = "ai-gateway-auth-method";
7314
7376
  async function parseAuthMethod(headers) {
7315
7377
  const result = await safeValidateTypes2({
@@ -8096,7 +8158,7 @@ async function getVercelRequestId() {
8096
8158
  var _a932;
8097
8159
  return (_a932 = getContext().headers) == null ? void 0 : _a932["x-vercel-id"];
8098
8160
  }
8099
- var VERSION3 = "2.0.82";
8161
+ var VERSION3 = "2.0.86";
8100
8162
  var AI_GATEWAY_PROTOCOL_VERSION = "0.0.1";
8101
8163
  function createGatewayProvider(options = {}) {
8102
8164
  var _a932, _b93;
@@ -9083,7 +9145,7 @@ function getGlobalProvider() {
9083
9145
  var _a163;
9084
9146
  return (_a163 = globalThis.AI_SDK_DEFAULT_PROVIDER) != null ? _a163 : gateway;
9085
9147
  }
9086
- var VERSION32 = "5.0.179";
9148
+ var VERSION32 = "5.0.184";
9087
9149
  var dataContentSchema2 = z4.z.union([
9088
9150
  z4.z.string(),
9089
9151
  z4.z.instanceof(Uint8Array),
@@ -10388,6 +10450,9 @@ var ParseError2 = class extends Error {
10388
10450
  super(message), this.name = "ParseError", this.type = options.type, this.field = options.field, this.value = options.value, this.line = options.line;
10389
10451
  }
10390
10452
  };
10453
+ var LF2 = 10;
10454
+ var CR2 = 13;
10455
+ var SPACE2 = 32;
10391
10456
  function noop2(_arg) {
10392
10457
  }
10393
10458
  function createParser2(callbacks) {
@@ -10395,39 +10460,109 @@ function createParser2(callbacks) {
10395
10460
  throw new TypeError(
10396
10461
  "`callbacks` must be an object, got a function instead. Did you mean `{onEvent: fn}`?"
10397
10462
  );
10398
- const { onEvent = noop2, onError = noop2, onRetry = noop2, onComment } = callbacks;
10399
- let incompleteLine = "", isFirstChunk = true, id, data = "", eventType = "";
10400
- function feed(newChunk) {
10401
- const chunk = isFirstChunk ? newChunk.replace(/^\xEF\xBB\xBF/, "") : newChunk, [complete, incomplete] = splitLines2(`${incompleteLine}${chunk}`);
10402
- for (const line of complete)
10403
- parseLine(line);
10404
- incompleteLine = incomplete, isFirstChunk = false;
10405
- }
10406
- function parseLine(line) {
10407
- if (line === "") {
10463
+ const { onEvent = noop2, onError = noop2, onRetry = noop2, onComment } = callbacks, pendingFragments = [];
10464
+ let isFirstChunk = true, id, data = "", dataLines = 0, eventType;
10465
+ function feed(chunk) {
10466
+ if (isFirstChunk && (isFirstChunk = false, chunk.charCodeAt(0) === 239 && chunk.charCodeAt(1) === 187 && chunk.charCodeAt(2) === 191 && (chunk = chunk.slice(3))), pendingFragments.length === 0) {
10467
+ const trailing2 = processLines(chunk);
10468
+ trailing2 !== "" && pendingFragments.push(trailing2);
10469
+ return;
10470
+ }
10471
+ if (chunk.indexOf(`
10472
+ `) === -1 && chunk.indexOf("\r") === -1) {
10473
+ pendingFragments.push(chunk);
10474
+ return;
10475
+ }
10476
+ pendingFragments.push(chunk);
10477
+ const input = pendingFragments.join("");
10478
+ pendingFragments.length = 0;
10479
+ const trailing = processLines(input);
10480
+ trailing !== "" && pendingFragments.push(trailing);
10481
+ }
10482
+ function processLines(chunk) {
10483
+ let searchIndex = 0;
10484
+ if (chunk.indexOf("\r") === -1) {
10485
+ let lfIndex = chunk.indexOf(`
10486
+ `, searchIndex);
10487
+ for (; lfIndex !== -1; ) {
10488
+ if (searchIndex === lfIndex) {
10489
+ dataLines > 0 && onEvent({ id, event: eventType, data }), id = void 0, data = "", dataLines = 0, eventType = void 0, searchIndex = lfIndex + 1, lfIndex = chunk.indexOf(`
10490
+ `, searchIndex);
10491
+ continue;
10492
+ }
10493
+ const firstCharCode = chunk.charCodeAt(searchIndex);
10494
+ if (isDataPrefix2(chunk, searchIndex, firstCharCode)) {
10495
+ const valueStart = chunk.charCodeAt(searchIndex + 5) === SPACE2 ? searchIndex + 6 : searchIndex + 5, value = chunk.slice(valueStart, lfIndex);
10496
+ if (dataLines === 0 && chunk.charCodeAt(lfIndex + 1) === LF2) {
10497
+ onEvent({ id, event: eventType, data: value }), id = void 0, data = "", eventType = void 0, searchIndex = lfIndex + 2, lfIndex = chunk.indexOf(`
10498
+ `, searchIndex);
10499
+ continue;
10500
+ }
10501
+ data = dataLines === 0 ? value : `${data}
10502
+ ${value}`, dataLines++;
10503
+ } else isEventPrefix2(chunk, searchIndex, firstCharCode) ? eventType = chunk.slice(
10504
+ chunk.charCodeAt(searchIndex + 6) === SPACE2 ? searchIndex + 7 : searchIndex + 6,
10505
+ lfIndex
10506
+ ) || void 0 : parseLine(chunk, searchIndex, lfIndex);
10507
+ searchIndex = lfIndex + 1, lfIndex = chunk.indexOf(`
10508
+ `, searchIndex);
10509
+ }
10510
+ return chunk.slice(searchIndex);
10511
+ }
10512
+ for (; searchIndex < chunk.length; ) {
10513
+ const crIndex = chunk.indexOf("\r", searchIndex), lfIndex = chunk.indexOf(`
10514
+ `, searchIndex);
10515
+ let lineEnd = -1;
10516
+ if (crIndex !== -1 && lfIndex !== -1 ? lineEnd = crIndex < lfIndex ? crIndex : lfIndex : crIndex !== -1 ? crIndex === chunk.length - 1 ? lineEnd = -1 : lineEnd = crIndex : lfIndex !== -1 && (lineEnd = lfIndex), lineEnd === -1)
10517
+ break;
10518
+ parseLine(chunk, searchIndex, lineEnd), searchIndex = lineEnd + 1, chunk.charCodeAt(searchIndex - 1) === CR2 && chunk.charCodeAt(searchIndex) === LF2 && searchIndex++;
10519
+ }
10520
+ return chunk.slice(searchIndex);
10521
+ }
10522
+ function parseLine(chunk, start, end) {
10523
+ if (start === end) {
10408
10524
  dispatchEvent();
10409
10525
  return;
10410
10526
  }
10411
- if (line.startsWith(":")) {
10412
- onComment && onComment(line.slice(line.startsWith(": ") ? 2 : 1));
10527
+ const firstCharCode = chunk.charCodeAt(start);
10528
+ if (isDataPrefix2(chunk, start, firstCharCode)) {
10529
+ const valueStart = chunk.charCodeAt(start + 5) === SPACE2 ? start + 6 : start + 5, value2 = chunk.slice(valueStart, end);
10530
+ data = dataLines === 0 ? value2 : `${data}
10531
+ ${value2}`, dataLines++;
10532
+ return;
10533
+ }
10534
+ if (isEventPrefix2(chunk, start, firstCharCode)) {
10535
+ eventType = chunk.slice(chunk.charCodeAt(start + 6) === SPACE2 ? start + 7 : start + 6, end) || void 0;
10536
+ return;
10537
+ }
10538
+ if (firstCharCode === 105 && chunk.charCodeAt(start + 1) === 100 && chunk.charCodeAt(start + 2) === 58) {
10539
+ const value2 = chunk.slice(chunk.charCodeAt(start + 3) === SPACE2 ? start + 4 : start + 3, end);
10540
+ id = value2.includes("\0") ? void 0 : value2;
10541
+ return;
10542
+ }
10543
+ if (firstCharCode === 58) {
10544
+ if (onComment) {
10545
+ const line2 = chunk.slice(start, end);
10546
+ onComment(line2.slice(chunk.charCodeAt(start + 1) === SPACE2 ? 2 : 1));
10547
+ }
10413
10548
  return;
10414
10549
  }
10415
- const fieldSeparatorIndex = line.indexOf(":");
10416
- if (fieldSeparatorIndex !== -1) {
10417
- const field = line.slice(0, fieldSeparatorIndex), offset = line[fieldSeparatorIndex + 1] === " " ? 2 : 1, value = line.slice(fieldSeparatorIndex + offset);
10418
- processField(field, value, line);
10550
+ const line = chunk.slice(start, end), fieldSeparatorIndex = line.indexOf(":");
10551
+ if (fieldSeparatorIndex === -1) {
10552
+ processField(line, "", line);
10419
10553
  return;
10420
10554
  }
10421
- processField(line, "", line);
10555
+ const field = line.slice(0, fieldSeparatorIndex), offset = line.charCodeAt(fieldSeparatorIndex + 1) === SPACE2 ? 2 : 1, value = line.slice(fieldSeparatorIndex + offset);
10556
+ processField(field, value, line);
10422
10557
  }
10423
10558
  function processField(field, value, line) {
10424
10559
  switch (field) {
10425
10560
  case "event":
10426
- eventType = value;
10561
+ eventType = value || void 0;
10427
10562
  break;
10428
10563
  case "data":
10429
- data = `${data}${value}
10430
- `;
10564
+ data = dataLines === 0 ? value : `${data}
10565
+ ${value}`, dataLines++;
10431
10566
  break;
10432
10567
  case "id":
10433
10568
  id = value.includes("\0") ? void 0 : value;
@@ -10452,37 +10587,26 @@ function createParser2(callbacks) {
10452
10587
  }
10453
10588
  }
10454
10589
  function dispatchEvent() {
10455
- data.length > 0 && onEvent({
10590
+ dataLines > 0 && onEvent({
10456
10591
  id,
10457
- event: eventType || void 0,
10458
- // If the data buffer's last character is a U+000A LINE FEED (LF) character,
10459
- // then remove the last character from the data buffer.
10460
- data: data.endsWith(`
10461
- `) ? data.slice(0, -1) : data
10462
- }), id = void 0, data = "", eventType = "";
10592
+ event: eventType,
10593
+ data
10594
+ }), id = void 0, data = "", dataLines = 0, eventType = void 0;
10463
10595
  }
10464
10596
  function reset(options = {}) {
10465
- incompleteLine && options.consume && parseLine(incompleteLine), isFirstChunk = true, id = void 0, data = "", eventType = "", incompleteLine = "";
10597
+ if (options.consume && pendingFragments.length > 0) {
10598
+ const incompleteLine = pendingFragments.join("");
10599
+ parseLine(incompleteLine, 0, incompleteLine.length);
10600
+ }
10601
+ isFirstChunk = true, id = void 0, data = "", dataLines = 0, eventType = void 0, pendingFragments.length = 0;
10466
10602
  }
10467
10603
  return { feed, reset };
10468
10604
  }
10469
- function splitLines2(chunk) {
10470
- const lines = [];
10471
- let incompleteLine = "", searchIndex = 0;
10472
- for (; searchIndex < chunk.length; ) {
10473
- const crIndex = chunk.indexOf("\r", searchIndex), lfIndex = chunk.indexOf(`
10474
- `, searchIndex);
10475
- let lineEnd = -1;
10476
- if (crIndex !== -1 && lfIndex !== -1 ? lineEnd = Math.min(crIndex, lfIndex) : crIndex !== -1 ? crIndex === chunk.length - 1 ? lineEnd = -1 : lineEnd = crIndex : lfIndex !== -1 && (lineEnd = lfIndex), lineEnd === -1) {
10477
- incompleteLine = chunk.slice(searchIndex);
10478
- break;
10479
- } else {
10480
- const line = chunk.slice(searchIndex, lineEnd);
10481
- lines.push(line), searchIndex = lineEnd + 1, chunk[searchIndex - 1] === "\r" && chunk[searchIndex] === `
10482
- ` && searchIndex++;
10483
- }
10484
- }
10485
- return [lines, incompleteLine];
10605
+ function isDataPrefix2(chunk, i, firstCharCode) {
10606
+ return firstCharCode === 100 && chunk.charCodeAt(i + 1) === 97 && chunk.charCodeAt(i + 2) === 116 && chunk.charCodeAt(i + 3) === 97 && chunk.charCodeAt(i + 4) === 58;
10607
+ }
10608
+ function isEventPrefix2(chunk, i, firstCharCode) {
10609
+ return firstCharCode === 101 && chunk.charCodeAt(i + 1) === 118 && chunk.charCodeAt(i + 2) === 101 && chunk.charCodeAt(i + 3) === 110 && chunk.charCodeAt(i + 4) === 116 && chunk.charCodeAt(i + 5) === 58;
10486
10610
  }
10487
10611
  var EventSourceParserStream2 = class extends TransformStream {
10488
10612
  constructor({ onError, onRetry, onComment } = {}) {
@@ -10694,7 +10818,7 @@ function withUserAgentSuffix2(headers, ...userAgentSuffixParts) {
10694
10818
  );
10695
10819
  return Object.fromEntries(normalizedHeaders.entries());
10696
10820
  }
10697
- var VERSION4 = "4.0.23";
10821
+ var VERSION4 = "4.0.26";
10698
10822
  var getOriginalFetch3 = () => globalThis.fetch;
10699
10823
  var getFromApi2 = async ({
10700
10824
  url,
@@ -12666,6 +12790,19 @@ var gatewayErrorResponseSchema2 = lazySchema2(
12666
12790
  })
12667
12791
  )
12668
12792
  );
12793
+ function extractApiCallResponse2(error) {
12794
+ if (error.data !== void 0) {
12795
+ return error.data;
12796
+ }
12797
+ if (error.responseBody != null) {
12798
+ try {
12799
+ return JSON.parse(error.responseBody);
12800
+ } catch (e2) {
12801
+ return error.responseBody;
12802
+ }
12803
+ }
12804
+ return {};
12805
+ }
12669
12806
  var name76 = "GatewayTimeoutError";
12670
12807
  var marker86 = `vercel.ai.gateway.error.${name76}`;
12671
12808
  var symbol86 = Symbol.for(marker86);
@@ -12755,19 +12892,6 @@ async function asGatewayError2(error, authMethod) {
12755
12892
  authMethod
12756
12893
  });
12757
12894
  }
12758
- function extractApiCallResponse2(error) {
12759
- if (error.data !== void 0) {
12760
- return error.data;
12761
- }
12762
- if (error.responseBody != null) {
12763
- try {
12764
- return JSON.parse(error.responseBody);
12765
- } catch (e2) {
12766
- return error.responseBody;
12767
- }
12768
- }
12769
- return {};
12770
- }
12771
12895
  var GATEWAY_AUTH_METHOD_HEADER2 = "ai-gateway-auth-method";
12772
12896
  async function parseAuthMethod2(headers) {
12773
12897
  const result = await safeValidateTypes3({
@@ -13861,7 +13985,7 @@ async function getVercelRequestId2() {
13861
13985
  var _a932;
13862
13986
  return (_a932 = getContext2().headers) == null ? void 0 : _a932["x-vercel-id"];
13863
13987
  }
13864
- var VERSION5 = "3.0.104";
13988
+ var VERSION5 = "3.0.110";
13865
13989
  var AI_GATEWAY_PROTOCOL_VERSION2 = "0.0.1";
13866
13990
  function createGatewayProvider2(options = {}) {
13867
13991
  var _a932, _b93;
@@ -14971,7 +15095,7 @@ function getTotalTimeoutMs(timeout) {
14971
15095
  }
14972
15096
  return timeout.totalMs;
14973
15097
  }
14974
- var VERSION33 = "6.0.168";
15098
+ var VERSION33 = "6.0.175";
14975
15099
  var dataContentSchema3 = z4.z.union([
14976
15100
  z4.z.string(),
14977
15101
  z4.z.instanceof(Uint8Array),
@@ -24495,6 +24619,9 @@ var ParseError3 = class extends Error {
24495
24619
  super(message), this.name = "ParseError", this.type = options.type, this.field = options.field, this.value = options.value, this.line = options.line;
24496
24620
  }
24497
24621
  };
24622
+ var LF3 = 10;
24623
+ var CR3 = 13;
24624
+ var SPACE3 = 32;
24498
24625
  function noop3(_arg) {
24499
24626
  }
24500
24627
  function createParser3(callbacks) {
@@ -24502,39 +24629,109 @@ function createParser3(callbacks) {
24502
24629
  throw new TypeError(
24503
24630
  "`callbacks` must be an object, got a function instead. Did you mean `{onEvent: fn}`?"
24504
24631
  );
24505
- const { onEvent = noop3, onError = noop3, onRetry = noop3, onComment } = callbacks;
24506
- let incompleteLine = "", isFirstChunk = true, id, data = "", eventType = "";
24507
- function feed(newChunk) {
24508
- const chunk = isFirstChunk ? newChunk.replace(/^\xEF\xBB\xBF/, "") : newChunk, [complete, incomplete] = splitLines3(`${incompleteLine}${chunk}`);
24509
- for (const line of complete)
24510
- parseLine(line);
24511
- incompleteLine = incomplete, isFirstChunk = false;
24512
- }
24513
- function parseLine(line) {
24514
- if (line === "") {
24632
+ const { onEvent = noop3, onError = noop3, onRetry = noop3, onComment } = callbacks, pendingFragments = [];
24633
+ let isFirstChunk = true, id, data = "", dataLines = 0, eventType;
24634
+ function feed(chunk) {
24635
+ if (isFirstChunk && (isFirstChunk = false, chunk.charCodeAt(0) === 239 && chunk.charCodeAt(1) === 187 && chunk.charCodeAt(2) === 191 && (chunk = chunk.slice(3))), pendingFragments.length === 0) {
24636
+ const trailing2 = processLines(chunk);
24637
+ trailing2 !== "" && pendingFragments.push(trailing2);
24638
+ return;
24639
+ }
24640
+ if (chunk.indexOf(`
24641
+ `) === -1 && chunk.indexOf("\r") === -1) {
24642
+ pendingFragments.push(chunk);
24643
+ return;
24644
+ }
24645
+ pendingFragments.push(chunk);
24646
+ const input = pendingFragments.join("");
24647
+ pendingFragments.length = 0;
24648
+ const trailing = processLines(input);
24649
+ trailing !== "" && pendingFragments.push(trailing);
24650
+ }
24651
+ function processLines(chunk) {
24652
+ let searchIndex = 0;
24653
+ if (chunk.indexOf("\r") === -1) {
24654
+ let lfIndex = chunk.indexOf(`
24655
+ `, searchIndex);
24656
+ for (; lfIndex !== -1; ) {
24657
+ if (searchIndex === lfIndex) {
24658
+ dataLines > 0 && onEvent({ id, event: eventType, data }), id = void 0, data = "", dataLines = 0, eventType = void 0, searchIndex = lfIndex + 1, lfIndex = chunk.indexOf(`
24659
+ `, searchIndex);
24660
+ continue;
24661
+ }
24662
+ const firstCharCode = chunk.charCodeAt(searchIndex);
24663
+ if (isDataPrefix3(chunk, searchIndex, firstCharCode)) {
24664
+ const valueStart = chunk.charCodeAt(searchIndex + 5) === SPACE3 ? searchIndex + 6 : searchIndex + 5, value = chunk.slice(valueStart, lfIndex);
24665
+ if (dataLines === 0 && chunk.charCodeAt(lfIndex + 1) === LF3) {
24666
+ onEvent({ id, event: eventType, data: value }), id = void 0, data = "", eventType = void 0, searchIndex = lfIndex + 2, lfIndex = chunk.indexOf(`
24667
+ `, searchIndex);
24668
+ continue;
24669
+ }
24670
+ data = dataLines === 0 ? value : `${data}
24671
+ ${value}`, dataLines++;
24672
+ } else isEventPrefix3(chunk, searchIndex, firstCharCode) ? eventType = chunk.slice(
24673
+ chunk.charCodeAt(searchIndex + 6) === SPACE3 ? searchIndex + 7 : searchIndex + 6,
24674
+ lfIndex
24675
+ ) || void 0 : parseLine(chunk, searchIndex, lfIndex);
24676
+ searchIndex = lfIndex + 1, lfIndex = chunk.indexOf(`
24677
+ `, searchIndex);
24678
+ }
24679
+ return chunk.slice(searchIndex);
24680
+ }
24681
+ for (; searchIndex < chunk.length; ) {
24682
+ const crIndex = chunk.indexOf("\r", searchIndex), lfIndex = chunk.indexOf(`
24683
+ `, searchIndex);
24684
+ let lineEnd = -1;
24685
+ if (crIndex !== -1 && lfIndex !== -1 ? lineEnd = crIndex < lfIndex ? crIndex : lfIndex : crIndex !== -1 ? crIndex === chunk.length - 1 ? lineEnd = -1 : lineEnd = crIndex : lfIndex !== -1 && (lineEnd = lfIndex), lineEnd === -1)
24686
+ break;
24687
+ parseLine(chunk, searchIndex, lineEnd), searchIndex = lineEnd + 1, chunk.charCodeAt(searchIndex - 1) === CR3 && chunk.charCodeAt(searchIndex) === LF3 && searchIndex++;
24688
+ }
24689
+ return chunk.slice(searchIndex);
24690
+ }
24691
+ function parseLine(chunk, start, end) {
24692
+ if (start === end) {
24515
24693
  dispatchEvent();
24516
24694
  return;
24517
24695
  }
24518
- if (line.startsWith(":")) {
24519
- onComment && onComment(line.slice(line.startsWith(": ") ? 2 : 1));
24696
+ const firstCharCode = chunk.charCodeAt(start);
24697
+ if (isDataPrefix3(chunk, start, firstCharCode)) {
24698
+ const valueStart = chunk.charCodeAt(start + 5) === SPACE3 ? start + 6 : start + 5, value2 = chunk.slice(valueStart, end);
24699
+ data = dataLines === 0 ? value2 : `${data}
24700
+ ${value2}`, dataLines++;
24520
24701
  return;
24521
24702
  }
24522
- const fieldSeparatorIndex = line.indexOf(":");
24523
- if (fieldSeparatorIndex !== -1) {
24524
- const field = line.slice(0, fieldSeparatorIndex), offset = line[fieldSeparatorIndex + 1] === " " ? 2 : 1, value = line.slice(fieldSeparatorIndex + offset);
24525
- processField(field, value, line);
24703
+ if (isEventPrefix3(chunk, start, firstCharCode)) {
24704
+ eventType = chunk.slice(chunk.charCodeAt(start + 6) === SPACE3 ? start + 7 : start + 6, end) || void 0;
24526
24705
  return;
24527
24706
  }
24528
- processField(line, "", line);
24707
+ if (firstCharCode === 105 && chunk.charCodeAt(start + 1) === 100 && chunk.charCodeAt(start + 2) === 58) {
24708
+ const value2 = chunk.slice(chunk.charCodeAt(start + 3) === SPACE3 ? start + 4 : start + 3, end);
24709
+ id = value2.includes("\0") ? void 0 : value2;
24710
+ return;
24711
+ }
24712
+ if (firstCharCode === 58) {
24713
+ if (onComment) {
24714
+ const line2 = chunk.slice(start, end);
24715
+ onComment(line2.slice(chunk.charCodeAt(start + 1) === SPACE3 ? 2 : 1));
24716
+ }
24717
+ return;
24718
+ }
24719
+ const line = chunk.slice(start, end), fieldSeparatorIndex = line.indexOf(":");
24720
+ if (fieldSeparatorIndex === -1) {
24721
+ processField(line, "", line);
24722
+ return;
24723
+ }
24724
+ const field = line.slice(0, fieldSeparatorIndex), offset = line.charCodeAt(fieldSeparatorIndex + 1) === SPACE3 ? 2 : 1, value = line.slice(fieldSeparatorIndex + offset);
24725
+ processField(field, value, line);
24529
24726
  }
24530
24727
  function processField(field, value, line) {
24531
24728
  switch (field) {
24532
24729
  case "event":
24533
- eventType = value;
24730
+ eventType = value || void 0;
24534
24731
  break;
24535
24732
  case "data":
24536
- data = `${data}${value}
24537
- `;
24733
+ data = dataLines === 0 ? value : `${data}
24734
+ ${value}`, dataLines++;
24538
24735
  break;
24539
24736
  case "id":
24540
24737
  id = value.includes("\0") ? void 0 : value;
@@ -24559,37 +24756,26 @@ function createParser3(callbacks) {
24559
24756
  }
24560
24757
  }
24561
24758
  function dispatchEvent() {
24562
- data.length > 0 && onEvent({
24759
+ dataLines > 0 && onEvent({
24563
24760
  id,
24564
- event: eventType || void 0,
24565
- // If the data buffer's last character is a U+000A LINE FEED (LF) character,
24566
- // then remove the last character from the data buffer.
24567
- data: data.endsWith(`
24568
- `) ? data.slice(0, -1) : data
24569
- }), id = void 0, data = "", eventType = "";
24761
+ event: eventType,
24762
+ data
24763
+ }), id = void 0, data = "", dataLines = 0, eventType = void 0;
24570
24764
  }
24571
24765
  function reset(options = {}) {
24572
- incompleteLine && options.consume && parseLine(incompleteLine), isFirstChunk = true, id = void 0, data = "", eventType = "", incompleteLine = "";
24766
+ if (options.consume && pendingFragments.length > 0) {
24767
+ const incompleteLine = pendingFragments.join("");
24768
+ parseLine(incompleteLine, 0, incompleteLine.length);
24769
+ }
24770
+ isFirstChunk = true, id = void 0, data = "", dataLines = 0, eventType = void 0, pendingFragments.length = 0;
24573
24771
  }
24574
24772
  return { feed, reset };
24575
24773
  }
24576
- function splitLines3(chunk) {
24577
- const lines = [];
24578
- let incompleteLine = "", searchIndex = 0;
24579
- for (; searchIndex < chunk.length; ) {
24580
- const crIndex = chunk.indexOf("\r", searchIndex), lfIndex = chunk.indexOf(`
24581
- `, searchIndex);
24582
- let lineEnd = -1;
24583
- if (crIndex !== -1 && lfIndex !== -1 ? lineEnd = Math.min(crIndex, lfIndex) : crIndex !== -1 ? crIndex === chunk.length - 1 ? lineEnd = -1 : lineEnd = crIndex : lfIndex !== -1 && (lineEnd = lfIndex), lineEnd === -1) {
24584
- incompleteLine = chunk.slice(searchIndex);
24585
- break;
24586
- } else {
24587
- const line = chunk.slice(searchIndex, lineEnd);
24588
- lines.push(line), searchIndex = lineEnd + 1, chunk[searchIndex - 1] === "\r" && chunk[searchIndex] === `
24589
- ` && searchIndex++;
24590
- }
24591
- }
24592
- return [lines, incompleteLine];
24774
+ function isDataPrefix3(chunk, i, firstCharCode) {
24775
+ return firstCharCode === 100 && chunk.charCodeAt(i + 1) === 97 && chunk.charCodeAt(i + 2) === 116 && chunk.charCodeAt(i + 3) === 97 && chunk.charCodeAt(i + 4) === 58;
24776
+ }
24777
+ function isEventPrefix3(chunk, i, firstCharCode) {
24778
+ return firstCharCode === 101 && chunk.charCodeAt(i + 1) === 118 && chunk.charCodeAt(i + 2) === 101 && chunk.charCodeAt(i + 3) === 110 && chunk.charCodeAt(i + 4) === 116 && chunk.charCodeAt(i + 5) === 58;
24593
24779
  }
24594
24780
  var EventSourceParserStream3 = class extends TransformStream {
24595
24781
  constructor({ onError, onRetry, onComment } = {}) {
@@ -24725,7 +24911,7 @@ function withUserAgentSuffix3(headers, ...userAgentSuffixParts) {
24725
24911
  );
24726
24912
  return Object.fromEntries(normalizedHeaders.entries());
24727
24913
  }
24728
- var VERSION6 = "3.0.23";
24914
+ var VERSION6 = "3.0.25";
24729
24915
  var getOriginalFetch4 = () => globalThis.fetch;
24730
24916
  var getFromApi3 = async ({
24731
24917
  url,
@@ -25194,6 +25380,33 @@ var createJsonResponseHandler3 = (responseSchema) => async ({ response, url, req
25194
25380
  rawValue: parsedResult.rawValue
25195
25381
  };
25196
25382
  };
25383
+ var schemaSymbol4 = /* @__PURE__ */ Symbol.for("vercel.ai.schema");
25384
+ function lazySchema3(createSchema) {
25385
+ let schema;
25386
+ return () => {
25387
+ if (schema == null) {
25388
+ schema = createSchema();
25389
+ }
25390
+ return schema;
25391
+ };
25392
+ }
25393
+ function jsonSchema4(jsonSchema22, {
25394
+ validate
25395
+ } = {}) {
25396
+ return {
25397
+ [schemaSymbol4]: true,
25398
+ _type: void 0,
25399
+ // should never be used directly
25400
+ [validatorSymbol3]: true,
25401
+ get jsonSchema() {
25402
+ if (typeof jsonSchema22 === "function") {
25403
+ jsonSchema22 = jsonSchema22();
25404
+ }
25405
+ return jsonSchema22;
25406
+ },
25407
+ validate
25408
+ };
25409
+ }
25197
25410
  function addAdditionalPropertiesToJsonSchema3(jsonSchema22) {
25198
25411
  if (jsonSchema22.type === "object") {
25199
25412
  jsonSchema22.additionalProperties = false;
@@ -25219,13 +25432,6 @@ function addAdditionalPropertiesToJsonSchema3(jsonSchema22) {
25219
25432
  }
25220
25433
  return jsonSchema22;
25221
25434
  }
25222
- var getRelativePath4 = (pathA, pathB) => {
25223
- let i = 0;
25224
- for (; i < pathA.length && i < pathB.length; i++) {
25225
- if (pathA[i] !== pathB[i]) break;
25226
- }
25227
- return [(pathA.length - i).toString(), ...pathB.slice(i)].join("/");
25228
- };
25229
25435
  var ignoreOverride4 = /* @__PURE__ */ Symbol(
25230
25436
  "Let zodToJsonSchema decide on which parser to use"
25231
25437
  );
@@ -26169,6 +26375,13 @@ var selectParser4 = (def, typeName, refs) => {
26169
26375
  return /* @__PURE__ */ ((_) => void 0)();
26170
26376
  }
26171
26377
  };
26378
+ var getRelativePath4 = (pathA, pathB) => {
26379
+ let i = 0;
26380
+ for (; i < pathA.length && i < pathB.length; i++) {
26381
+ if (pathA[i] !== pathB[i]) break;
26382
+ }
26383
+ return [(pathA.length - i).toString(), ...pathB.slice(i)].join("/");
26384
+ };
26172
26385
  function parseDef4(def, refs, forceResolution = false) {
26173
26386
  var _a2232;
26174
26387
  const seenItem = refs.seen.get(def);
@@ -26348,33 +26561,6 @@ function zodSchema4(zodSchema22, options) {
26348
26561
  return zod3Schema3(zodSchema22);
26349
26562
  }
26350
26563
  }
26351
- var schemaSymbol4 = /* @__PURE__ */ Symbol.for("vercel.ai.schema");
26352
- function lazySchema3(createSchema) {
26353
- let schema;
26354
- return () => {
26355
- if (schema == null) {
26356
- schema = createSchema();
26357
- }
26358
- return schema;
26359
- };
26360
- }
26361
- function jsonSchema4(jsonSchema22, {
26362
- validate
26363
- } = {}) {
26364
- return {
26365
- [schemaSymbol4]: true,
26366
- _type: void 0,
26367
- // should never be used directly
26368
- [validatorSymbol3]: true,
26369
- get jsonSchema() {
26370
- if (typeof jsonSchema22 === "function") {
26371
- jsonSchema22 = jsonSchema22();
26372
- }
26373
- return jsonSchema22;
26374
- },
26375
- validate
26376
- };
26377
- }
26378
26564
  function isSchema4(value) {
26379
26565
  return typeof value === "object" && value !== null && schemaSymbol4 in value && value[schemaSymbol4] === true && "jsonSchema" in value && "validate" in value;
26380
26566
  }
@@ -26662,6 +26848,19 @@ var gatewayErrorResponseSchema3 = lazyValidator2(
26662
26848
  })
26663
26849
  )
26664
26850
  );
26851
+ function extractApiCallResponse3(error) {
26852
+ if (error.data !== void 0) {
26853
+ return error.data;
26854
+ }
26855
+ if (error.responseBody != null) {
26856
+ try {
26857
+ return JSON.parse(error.responseBody);
26858
+ } catch (e2) {
26859
+ return error.responseBody;
26860
+ }
26861
+ }
26862
+ return {};
26863
+ }
26665
26864
  var name72 = "GatewayTimeoutError";
26666
26865
  var marker82 = `vercel.ai.gateway.error.${name72}`;
26667
26866
  var symbol82 = Symbol.for(marker82);
@@ -26748,19 +26947,6 @@ async function asGatewayError3(error, authMethod) {
26748
26947
  authMethod
26749
26948
  });
26750
26949
  }
26751
- function extractApiCallResponse3(error) {
26752
- if (error.data !== void 0) {
26753
- return error.data;
26754
- }
26755
- if (error.responseBody != null) {
26756
- try {
26757
- return JSON.parse(error.responseBody);
26758
- } catch (e2) {
26759
- return error.responseBody;
26760
- }
26761
- }
26762
- return {};
26763
- }
26764
26950
  var GATEWAY_AUTH_METHOD_HEADER3 = "ai-gateway-auth-method";
26765
26951
  async function parseAuthMethod3(headers) {
26766
26952
  const result = await safeValidateTypes4({
@@ -27547,7 +27733,7 @@ async function getVercelRequestId3() {
27547
27733
  var _a93;
27548
27734
  return (_a93 = getContext3().headers) == null ? void 0 : _a93["x-vercel-id"];
27549
27735
  }
27550
- var VERSION24 = "2.0.82";
27736
+ var VERSION24 = "2.0.86";
27551
27737
  var AI_GATEWAY_PROTOCOL_VERSION3 = "0.0.1";
27552
27738
  function createGatewayProvider3(options = {}) {
27553
27739
  var _a93, _b92;
@@ -30400,7 +30586,7 @@ var LIST_AGENT_BUILDER_ACTIONS_ROUTE = chunk7756JXUH_cjs.createRoute({
30400
30586
  try {
30401
30587
  chunkIQMLYFOO_cjs.WorkflowRegistry.registerTemporaryWorkflows(agentBuilderWorkflows, mastra);
30402
30588
  logger.info("Listing agent builder actions");
30403
- return await chunkPTLWJUYU_cjs.LIST_WORKFLOWS_ROUTE.handler(ctx);
30589
+ return await chunkD5H4LH6V_cjs.LIST_WORKFLOWS_ROUTE.handler(ctx);
30404
30590
  } catch (error) {
30405
30591
  logger.error("Error listing agent builder actions", { error });
30406
30592
  return chunkB34S64RC_cjs.handleError(error, "Error getting agent builder workflows");
@@ -30430,7 +30616,7 @@ var GET_AGENT_BUILDER_ACTION_BY_ID_ROUTE = chunk7756JXUH_cjs.createRoute({
30430
30616
  });
30431
30617
  }
30432
30618
  logger.info("Getting agent builder action by ID", { actionId });
30433
- return await chunkPTLWJUYU_cjs.GET_WORKFLOW_BY_ID_ROUTE.handler({ ...ctx, workflowId: actionId });
30619
+ return await chunkD5H4LH6V_cjs.GET_WORKFLOW_BY_ID_ROUTE.handler({ ...ctx, workflowId: actionId });
30434
30620
  } catch (error) {
30435
30621
  logger.error("Error getting agent builder action by ID", { error, actionId });
30436
30622
  return chunkB34S64RC_cjs.handleError(error, "Error getting agent builder action");
@@ -30459,7 +30645,7 @@ var LIST_AGENT_BUILDER_ACTION_RUNS_ROUTE = chunk7756JXUH_cjs.createRoute({
30459
30645
  throw new chunk64ITUOXI_cjs.HTTPException(400, { message: `Invalid agent-builder action: ${actionId}` });
30460
30646
  }
30461
30647
  logger.info("Listing agent builder action runs", { actionId });
30462
- return await chunkPTLWJUYU_cjs.LIST_WORKFLOW_RUNS_ROUTE.handler({
30648
+ return await chunkD5H4LH6V_cjs.LIST_WORKFLOW_RUNS_ROUTE.handler({
30463
30649
  ...ctx,
30464
30650
  workflowId: actionId
30465
30651
  });
@@ -30491,7 +30677,7 @@ var GET_AGENT_BUILDER_ACTION_RUN_BY_ID_ROUTE = chunk7756JXUH_cjs.createRoute({
30491
30677
  throw new chunk64ITUOXI_cjs.HTTPException(400, { message: `Invalid agent-builder action: ${actionId}` });
30492
30678
  }
30493
30679
  logger.info("Getting agent builder action run by ID", { actionId, runId });
30494
- return await chunkPTLWJUYU_cjs.GET_WORKFLOW_RUN_BY_ID_ROUTE.handler({
30680
+ return await chunkD5H4LH6V_cjs.GET_WORKFLOW_RUN_BY_ID_ROUTE.handler({
30495
30681
  ...ctx,
30496
30682
  workflowId: actionId
30497
30683
  });
@@ -30523,7 +30709,7 @@ var CREATE_AGENT_BUILDER_ACTION_RUN_ROUTE = chunk7756JXUH_cjs.createRoute({
30523
30709
  throw new chunk64ITUOXI_cjs.HTTPException(400, { message: `Invalid agent-builder action: ${actionId}` });
30524
30710
  }
30525
30711
  logger.info("Creating agent builder action run", { actionId, runId });
30526
- return await chunkPTLWJUYU_cjs.CREATE_WORKFLOW_RUN_ROUTE.handler({
30712
+ return await chunkD5H4LH6V_cjs.CREATE_WORKFLOW_RUN_ROUTE.handler({
30527
30713
  ...ctx,
30528
30714
  workflowId: actionId
30529
30715
  });
@@ -30542,7 +30728,7 @@ var STREAM_AGENT_BUILDER_ACTION_ROUTE = chunk7756JXUH_cjs.createRoute({
30542
30728
  pathParamSchema: chunkSEAOI56Z_cjs.actionIdPathParams,
30543
30729
  queryParamSchema: chunkDIG2K5CV_cjs.runIdSchema,
30544
30730
  bodySchema: chunkSEAOI56Z_cjs.streamAgentBuilderBodySchema,
30545
- responseSchema: chunkGUWIV3ZN_cjs.streamResponseSchema,
30731
+ responseSchema: chunk4QZCXU3A_cjs.streamResponseSchema,
30546
30732
  summary: "Stream action execution",
30547
30733
  description: "Executes an action and streams the results in real-time",
30548
30734
  tags: ["Agent Builder"],
@@ -30556,7 +30742,7 @@ var STREAM_AGENT_BUILDER_ACTION_ROUTE = chunk7756JXUH_cjs.createRoute({
30556
30742
  throw new chunk64ITUOXI_cjs.HTTPException(400, { message: `Invalid agent-builder action: ${actionId}` });
30557
30743
  }
30558
30744
  logger.info("Streaming agent builder action", { actionId, runId });
30559
- return await chunkPTLWJUYU_cjs.STREAM_WORKFLOW_ROUTE.handler({
30745
+ return await chunkD5H4LH6V_cjs.STREAM_WORKFLOW_ROUTE.handler({
30560
30746
  ...ctx,
30561
30747
  workflowId: actionId,
30562
30748
  requestContext
@@ -30590,7 +30776,7 @@ var START_ASYNC_AGENT_BUILDER_ACTION_ROUTE = chunk7756JXUH_cjs.createRoute({
30590
30776
  throw new chunk64ITUOXI_cjs.HTTPException(400, { message: `Invalid agent-builder action: ${actionId}` });
30591
30777
  }
30592
30778
  logger.info("Starting agent builder action asynchronously", { actionId, runId });
30593
- return await chunkPTLWJUYU_cjs.START_ASYNC_WORKFLOW_ROUTE.handler({
30779
+ return await chunkD5H4LH6V_cjs.START_ASYNC_WORKFLOW_ROUTE.handler({
30594
30780
  ...ctx,
30595
30781
  workflowId: actionId,
30596
30782
  requestContext
@@ -30624,7 +30810,7 @@ var START_AGENT_BUILDER_ACTION_RUN_ROUTE = chunk7756JXUH_cjs.createRoute({
30624
30810
  throw new chunk64ITUOXI_cjs.HTTPException(400, { message: `Invalid agent-builder action: ${actionId}` });
30625
30811
  }
30626
30812
  logger.info("Starting specific agent builder action run", { actionId, runId });
30627
- return await chunkPTLWJUYU_cjs.START_WORKFLOW_RUN_ROUTE.handler({
30813
+ return await chunkD5H4LH6V_cjs.START_WORKFLOW_RUN_ROUTE.handler({
30628
30814
  ...ctx,
30629
30815
  workflowId: actionId,
30630
30816
  requestContext
@@ -30643,7 +30829,7 @@ var OBSERVE_STREAM_AGENT_BUILDER_ACTION_ROUTE = chunk7756JXUH_cjs.createRoute({
30643
30829
  responseType: "stream",
30644
30830
  pathParamSchema: chunkSEAOI56Z_cjs.actionIdPathParams,
30645
30831
  queryParamSchema: chunkDIG2K5CV_cjs.runIdSchema,
30646
- responseSchema: chunkGUWIV3ZN_cjs.streamResponseSchema,
30832
+ responseSchema: chunk4QZCXU3A_cjs.streamResponseSchema,
30647
30833
  summary: "Observe action stream",
30648
30834
  description: "Observes and streams updates from an already running action execution",
30649
30835
  tags: ["Agent Builder"],
@@ -30657,7 +30843,7 @@ var OBSERVE_STREAM_AGENT_BUILDER_ACTION_ROUTE = chunk7756JXUH_cjs.createRoute({
30657
30843
  throw new chunk64ITUOXI_cjs.HTTPException(400, { message: `Invalid agent-builder action: ${actionId}` });
30658
30844
  }
30659
30845
  logger.info("Observing agent builder action stream", { actionId, runId });
30660
- return await chunkPTLWJUYU_cjs.OBSERVE_STREAM_WORKFLOW_ROUTE.handler({
30846
+ return await chunkD5H4LH6V_cjs.OBSERVE_STREAM_WORKFLOW_ROUTE.handler({
30661
30847
  ...ctx,
30662
30848
  workflowId: actionId
30663
30849
  });
@@ -30690,7 +30876,7 @@ var RESUME_ASYNC_AGENT_BUILDER_ACTION_ROUTE = chunk7756JXUH_cjs.createRoute({
30690
30876
  throw new chunk64ITUOXI_cjs.HTTPException(400, { message: `Invalid agent-builder action: ${actionId}` });
30691
30877
  }
30692
30878
  logger.info("Resuming agent builder action asynchronously", { actionId, runId, step });
30693
- return await chunkPTLWJUYU_cjs.RESUME_ASYNC_WORKFLOW_ROUTE.handler({
30879
+ return await chunkD5H4LH6V_cjs.RESUME_ASYNC_WORKFLOW_ROUTE.handler({
30694
30880
  ...ctx,
30695
30881
  workflowId: actionId,
30696
30882
  requestContext
@@ -30724,7 +30910,7 @@ var RESUME_AGENT_BUILDER_ACTION_ROUTE = chunk7756JXUH_cjs.createRoute({
30724
30910
  throw new chunk64ITUOXI_cjs.HTTPException(400, { message: `Invalid agent-builder action: ${actionId}` });
30725
30911
  }
30726
30912
  logger.info("Resuming agent builder action", { actionId, runId, step });
30727
- return await chunkPTLWJUYU_cjs.RESUME_WORKFLOW_ROUTE.handler({
30913
+ return await chunkD5H4LH6V_cjs.RESUME_WORKFLOW_ROUTE.handler({
30728
30914
  ...ctx,
30729
30915
  workflowId: actionId,
30730
30916
  requestContext
@@ -30744,7 +30930,7 @@ var RESUME_STREAM_AGENT_BUILDER_ACTION_ROUTE = chunk7756JXUH_cjs.createRoute({
30744
30930
  pathParamSchema: chunkSEAOI56Z_cjs.actionIdPathParams,
30745
30931
  queryParamSchema: chunkDIG2K5CV_cjs.runIdSchema,
30746
30932
  bodySchema: chunkSEAOI56Z_cjs.resumeAgentBuilderBodySchema,
30747
- responseSchema: chunkGUWIV3ZN_cjs.streamResponseSchema,
30933
+ responseSchema: chunk4QZCXU3A_cjs.streamResponseSchema,
30748
30934
  summary: "Resume action stream",
30749
30935
  description: "Resumes a suspended action execution and continues streaming results",
30750
30936
  tags: ["Agent Builder"],
@@ -30758,7 +30944,7 @@ var RESUME_STREAM_AGENT_BUILDER_ACTION_ROUTE = chunk7756JXUH_cjs.createRoute({
30758
30944
  throw new chunk64ITUOXI_cjs.HTTPException(400, { message: `Invalid agent-builder action: ${actionId}` });
30759
30945
  }
30760
30946
  logger.info("Resuming agent builder action stream", { actionId, runId, step });
30761
- return await chunkPTLWJUYU_cjs.RESUME_STREAM_WORKFLOW_ROUTE.handler({
30947
+ return await chunkD5H4LH6V_cjs.RESUME_STREAM_WORKFLOW_ROUTE.handler({
30762
30948
  ...ctx,
30763
30949
  workflowId: actionId,
30764
30950
  requestContext
@@ -30790,7 +30976,7 @@ var CANCEL_AGENT_BUILDER_ACTION_RUN_ROUTE = chunk7756JXUH_cjs.createRoute({
30790
30976
  throw new chunk64ITUOXI_cjs.HTTPException(400, { message: `Invalid agent-builder action: ${actionId}` });
30791
30977
  }
30792
30978
  logger.info("Cancelling agent builder action run", { actionId, runId });
30793
- return await chunkPTLWJUYU_cjs.CANCEL_WORKFLOW_RUN_ROUTE.handler({
30979
+ return await chunkD5H4LH6V_cjs.CANCEL_WORKFLOW_RUN_ROUTE.handler({
30794
30980
  ...ctx,
30795
30981
  workflowId: actionId
30796
30982
  });
@@ -30809,7 +30995,7 @@ var STREAM_LEGACY_AGENT_BUILDER_ACTION_ROUTE = chunk7756JXUH_cjs.createRoute({
30809
30995
  pathParamSchema: chunkSEAOI56Z_cjs.actionIdPathParams,
30810
30996
  queryParamSchema: chunkDIG2K5CV_cjs.runIdSchema,
30811
30997
  bodySchema: chunkSEAOI56Z_cjs.streamLegacyAgentBuilderBodySchema,
30812
- responseSchema: chunkGUWIV3ZN_cjs.streamResponseSchema,
30998
+ responseSchema: chunk4QZCXU3A_cjs.streamResponseSchema,
30813
30999
  summary: "[DEPRECATED] Stream agent-builder action with legacy format",
30814
31000
  description: "Legacy endpoint for streaming agent-builder action execution. Use /agent-builder/:actionId/stream instead.",
30815
31001
  tags: ["Agent Builder", "Legacy"],
@@ -30823,7 +31009,7 @@ var STREAM_LEGACY_AGENT_BUILDER_ACTION_ROUTE = chunk7756JXUH_cjs.createRoute({
30823
31009
  throw new chunk64ITUOXI_cjs.HTTPException(400, { message: `Invalid agent-builder action: ${actionId}` });
30824
31010
  }
30825
31011
  logger.info("Streaming agent builder action (legacy)", { actionId, runId });
30826
- return await chunkPTLWJUYU_cjs.STREAM_LEGACY_WORKFLOW_ROUTE.handler({
31012
+ return await chunkD5H4LH6V_cjs.STREAM_LEGACY_WORKFLOW_ROUTE.handler({
30827
31013
  ...ctx,
30828
31014
  workflowId: actionId,
30829
31015
  requestContext
@@ -30842,7 +31028,7 @@ var OBSERVE_STREAM_LEGACY_AGENT_BUILDER_ACTION_ROUTE = chunk7756JXUH_cjs.createR
30842
31028
  responseType: "stream",
30843
31029
  pathParamSchema: chunkSEAOI56Z_cjs.actionIdPathParams,
30844
31030
  queryParamSchema: chunkDIG2K5CV_cjs.runIdSchema,
30845
- responseSchema: chunkGUWIV3ZN_cjs.streamResponseSchema,
31031
+ responseSchema: chunk4QZCXU3A_cjs.streamResponseSchema,
30846
31032
  summary: "[DEPRECATED] Observe agent-builder action stream with legacy format",
30847
31033
  description: "Legacy endpoint for observing agent-builder action stream. Use /agent-builder/:actionId/observe instead.",
30848
31034
  tags: ["Agent Builder", "Legacy"],
@@ -30856,7 +31042,7 @@ var OBSERVE_STREAM_LEGACY_AGENT_BUILDER_ACTION_ROUTE = chunk7756JXUH_cjs.createR
30856
31042
  throw new chunk64ITUOXI_cjs.HTTPException(400, { message: `Invalid agent-builder action: ${actionId}` });
30857
31043
  }
30858
31044
  logger.info("Observing agent builder action stream (legacy)", { actionId, runId });
30859
- return await chunkPTLWJUYU_cjs.OBSERVE_STREAM_LEGACY_WORKFLOW_ROUTE.handler({
31045
+ return await chunkD5H4LH6V_cjs.OBSERVE_STREAM_LEGACY_WORKFLOW_ROUTE.handler({
30860
31046
  ...ctx,
30861
31047
  workflowId: actionId
30862
31048
  });
@@ -30885,5 +31071,5 @@ exports.START_ASYNC_AGENT_BUILDER_ACTION_ROUTE = START_ASYNC_AGENT_BUILDER_ACTIO
30885
31071
  exports.STREAM_AGENT_BUILDER_ACTION_ROUTE = STREAM_AGENT_BUILDER_ACTION_ROUTE;
30886
31072
  exports.STREAM_LEGACY_AGENT_BUILDER_ACTION_ROUTE = STREAM_LEGACY_AGENT_BUILDER_ACTION_ROUTE;
30887
31073
  exports.agent_builder_exports = agent_builder_exports;
30888
- //# sourceMappingURL=chunk-FOZ7WC36.cjs.map
30889
- //# sourceMappingURL=chunk-FOZ7WC36.cjs.map
31074
+ //# sourceMappingURL=chunk-GWLMGMHI.cjs.map
31075
+ //# sourceMappingURL=chunk-GWLMGMHI.cjs.map