@meetkai/mka1 0.54.7 → 0.54.9

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 (268) hide show
  1. package/bin/mcp-server.js +509 -370
  2. package/bin/mcp-server.js.map +37 -34
  3. package/dist/commonjs/hooks/multipartFilename.d.ts +12 -0
  4. package/dist/commonjs/hooks/multipartFilename.d.ts.map +1 -0
  5. package/dist/commonjs/hooks/multipartFilename.js +50 -0
  6. package/dist/commonjs/hooks/multipartFilename.js.map +1 -0
  7. package/dist/commonjs/hooks/registration.d.ts.map +1 -1
  8. package/dist/commonjs/hooks/registration.js +2 -1
  9. package/dist/commonjs/hooks/registration.js.map +1 -1
  10. package/dist/commonjs/lib/config.d.ts +2 -2
  11. package/dist/commonjs/lib/config.js +2 -2
  12. package/dist/commonjs/mcp-server/mcp-server.js +1 -1
  13. package/dist/commonjs/mcp-server/server.js +1 -1
  14. package/dist/commonjs/models/components/agentschedulespec.d.ts +2 -1
  15. package/dist/commonjs/models/components/agentschedulespec.d.ts.map +1 -1
  16. package/dist/commonjs/models/components/agentschedulespec.js +6 -5
  17. package/dist/commonjs/models/components/agentschedulespec.js.map +1 -1
  18. package/dist/commonjs/models/components/chunkingstrategy.d.ts +2 -1
  19. package/dist/commonjs/models/components/chunkingstrategy.d.ts.map +1 -1
  20. package/dist/commonjs/models/components/chunkingstrategy.js +6 -5
  21. package/dist/commonjs/models/components/chunkingstrategy.js.map +1 -1
  22. package/dist/commonjs/models/components/codeinterpreteroutput.d.ts +2 -1
  23. package/dist/commonjs/models/components/codeinterpreteroutput.d.ts.map +1 -1
  24. package/dist/commonjs/models/components/codeinterpreteroutput.js +5 -4
  25. package/dist/commonjs/models/components/codeinterpreteroutput.js.map +1 -1
  26. package/dist/commonjs/models/components/computeraction.d.ts +2 -1
  27. package/dist/commonjs/models/components/computeraction.d.ts.map +1 -1
  28. package/dist/commonjs/models/components/computeraction.js +12 -11
  29. package/dist/commonjs/models/components/computeraction.js.map +1 -1
  30. package/dist/commonjs/models/components/customtoolformat.d.ts +2 -1
  31. package/dist/commonjs/models/components/customtoolformat.d.ts.map +1 -1
  32. package/dist/commonjs/models/components/customtoolformat.js +5 -1
  33. package/dist/commonjs/models/components/customtoolformat.js.map +1 -1
  34. package/dist/commonjs/models/components/filesearchcompoundfilter.d.ts +3 -2
  35. package/dist/commonjs/models/components/filesearchcompoundfilter.d.ts.map +1 -1
  36. package/dist/commonjs/models/components/filesearchcompoundfilter.js +21 -20
  37. package/dist/commonjs/models/components/filesearchcompoundfilter.js.map +1 -1
  38. package/dist/commonjs/models/components/githubpullrequestrequest.d.ts +2 -0
  39. package/dist/commonjs/models/components/githubpullrequestrequest.d.ts.map +1 -1
  40. package/dist/commonjs/models/components/githubpullrequestrequest.js +11 -0
  41. package/dist/commonjs/models/components/githubpullrequestrequest.js.map +1 -1
  42. package/dist/commonjs/models/components/guardrailconfig.d.ts +2 -1
  43. package/dist/commonjs/models/components/guardrailconfig.d.ts.map +1 -1
  44. package/dist/commonjs/models/components/guardrailconfig.js +6 -5
  45. package/dist/commonjs/models/components/guardrailconfig.js.map +1 -1
  46. package/dist/commonjs/models/components/method.d.ts +6 -5
  47. package/dist/commonjs/models/components/method.d.ts.map +1 -1
  48. package/dist/commonjs/models/components/method.js +36 -35
  49. package/dist/commonjs/models/components/method.js.map +1 -1
  50. package/dist/commonjs/models/components/openaichatcompletionchoice.d.ts +4 -3
  51. package/dist/commonjs/models/components/openaichatcompletionchoice.d.ts.map +1 -1
  52. package/dist/commonjs/models/components/openaichatcompletionchoice.js +19 -18
  53. package/dist/commonjs/models/components/openaichatcompletionchoice.js.map +1 -1
  54. package/dist/commonjs/models/components/openaichatcompletionchunk.d.ts +4 -3
  55. package/dist/commonjs/models/components/openaichatcompletionchunk.d.ts.map +1 -1
  56. package/dist/commonjs/models/components/openaichatcompletionchunk.js +19 -18
  57. package/dist/commonjs/models/components/openaichatcompletionchunk.js.map +1 -1
  58. package/dist/commonjs/models/components/outputmessage.d.ts +3 -2
  59. package/dist/commonjs/models/components/outputmessage.d.ts.map +1 -1
  60. package/dist/commonjs/models/components/outputmessage.js +9 -8
  61. package/dist/commonjs/models/components/outputmessage.js.map +1 -1
  62. package/dist/commonjs/models/components/outputmessagewithid.d.ts +3 -2
  63. package/dist/commonjs/models/components/outputmessagewithid.d.ts.map +1 -1
  64. package/dist/commonjs/models/components/outputmessagewithid.js +9 -8
  65. package/dist/commonjs/models/components/outputmessagewithid.js.map +1 -1
  66. package/dist/commonjs/models/components/outputtext.d.ts +3 -2
  67. package/dist/commonjs/models/components/outputtext.d.ts.map +1 -1
  68. package/dist/commonjs/models/components/outputtext.js +13 -12
  69. package/dist/commonjs/models/components/outputtext.js.map +1 -1
  70. package/dist/commonjs/models/components/responsecontentpartaddedevent.d.ts +3 -2
  71. package/dist/commonjs/models/components/responsecontentpartaddedevent.d.ts.map +1 -1
  72. package/dist/commonjs/models/components/responsecontentpartaddedevent.js +11 -11
  73. package/dist/commonjs/models/components/responsecontentpartaddedevent.js.map +1 -1
  74. package/dist/commonjs/models/components/responsecontentpartdoneevent.d.ts +3 -2
  75. package/dist/commonjs/models/components/responsecontentpartdoneevent.d.ts.map +1 -1
  76. package/dist/commonjs/models/components/responsecontentpartdoneevent.js +11 -10
  77. package/dist/commonjs/models/components/responsecontentpartdoneevent.js.map +1 -1
  78. package/dist/commonjs/models/components/responseformat.d.ts +2 -1
  79. package/dist/commonjs/models/components/responseformat.d.ts.map +1 -1
  80. package/dist/commonjs/models/components/responseformat.js +6 -5
  81. package/dist/commonjs/models/components/responseformat.js.map +1 -1
  82. package/dist/commonjs/models/components/responseobject.d.ts +5 -4
  83. package/dist/commonjs/models/components/responseobject.d.ts.map +1 -1
  84. package/dist/commonjs/models/components/responseobject.js +41 -40
  85. package/dist/commonjs/models/components/responseobject.js.map +1 -1
  86. package/dist/commonjs/models/components/responsestreamingevent.d.ts +2 -1
  87. package/dist/commonjs/models/components/responsestreamingevent.d.ts.map +1 -1
  88. package/dist/commonjs/models/components/responsestreamingevent.js +68 -67
  89. package/dist/commonjs/models/components/responsestreamingevent.js.map +1 -1
  90. package/dist/commonjs/models/components/sessionrecord.d.ts +2 -0
  91. package/dist/commonjs/models/components/sessionrecord.d.ts.map +1 -1
  92. package/dist/commonjs/models/components/sessionrecord.js +4 -0
  93. package/dist/commonjs/models/components/sessionrecord.js.map +1 -1
  94. package/dist/commonjs/models/components/shellenvironment.d.ts +2 -1
  95. package/dist/commonjs/models/components/shellenvironment.d.ts.map +1 -1
  96. package/dist/commonjs/models/components/shellenvironment.js +5 -4
  97. package/dist/commonjs/models/components/shellenvironment.js.map +1 -1
  98. package/dist/commonjs/models/components/skillentry.d.ts +2 -1
  99. package/dist/commonjs/models/components/skillentry.d.ts.map +1 -1
  100. package/dist/commonjs/models/components/skillentry.js +5 -4
  101. package/dist/commonjs/models/components/skillentry.js.map +1 -1
  102. package/dist/commonjs/models/components/tooldefinition.d.ts +5 -4
  103. package/dist/commonjs/models/components/tooldefinition.d.ts.map +1 -1
  104. package/dist/commonjs/models/components/tooldefinition.js +29 -28
  105. package/dist/commonjs/models/components/tooldefinition.js.map +1 -1
  106. package/dist/commonjs/models/components/websearchaction.d.ts +2 -1
  107. package/dist/commonjs/models/components/websearchaction.d.ts.map +1 -1
  108. package/dist/commonjs/models/components/websearchaction.js +6 -5
  109. package/dist/commonjs/models/components/websearchaction.js.map +1 -1
  110. package/dist/commonjs/models/operations/createchatcompletionstream.d.ts +2 -1
  111. package/dist/commonjs/models/operations/createchatcompletionstream.d.ts.map +1 -1
  112. package/dist/commonjs/models/operations/createchatcompletionstream.js +6 -5
  113. package/dist/commonjs/models/operations/createchatcompletionstream.js.map +1 -1
  114. package/dist/commonjs/models/operations/uploadfile.d.ts +1 -1
  115. package/dist/commonjs/types/discriminatedUnion.d.ts +25 -0
  116. package/dist/commonjs/types/discriminatedUnion.d.ts.map +1 -0
  117. package/dist/commonjs/types/discriminatedUnion.js +94 -0
  118. package/dist/commonjs/types/discriminatedUnion.js.map +1 -0
  119. package/dist/esm/hooks/multipartFilename.d.ts +12 -0
  120. package/dist/esm/hooks/multipartFilename.d.ts.map +1 -0
  121. package/dist/esm/hooks/multipartFilename.js +46 -0
  122. package/dist/esm/hooks/multipartFilename.js.map +1 -0
  123. package/dist/esm/hooks/registration.d.ts.map +1 -1
  124. package/dist/esm/hooks/registration.js +2 -1
  125. package/dist/esm/hooks/registration.js.map +1 -1
  126. package/dist/esm/lib/config.d.ts +2 -2
  127. package/dist/esm/lib/config.js +2 -2
  128. package/dist/esm/mcp-server/mcp-server.js +1 -1
  129. package/dist/esm/mcp-server/server.js +1 -1
  130. package/dist/esm/models/components/agentschedulespec.d.ts +2 -1
  131. package/dist/esm/models/components/agentschedulespec.d.ts.map +1 -1
  132. package/dist/esm/models/components/agentschedulespec.js +6 -5
  133. package/dist/esm/models/components/agentschedulespec.js.map +1 -1
  134. package/dist/esm/models/components/chunkingstrategy.d.ts +2 -1
  135. package/dist/esm/models/components/chunkingstrategy.d.ts.map +1 -1
  136. package/dist/esm/models/components/chunkingstrategy.js +6 -5
  137. package/dist/esm/models/components/chunkingstrategy.js.map +1 -1
  138. package/dist/esm/models/components/codeinterpreteroutput.d.ts +2 -1
  139. package/dist/esm/models/components/codeinterpreteroutput.d.ts.map +1 -1
  140. package/dist/esm/models/components/codeinterpreteroutput.js +5 -4
  141. package/dist/esm/models/components/codeinterpreteroutput.js.map +1 -1
  142. package/dist/esm/models/components/computeraction.d.ts +2 -1
  143. package/dist/esm/models/components/computeraction.d.ts.map +1 -1
  144. package/dist/esm/models/components/computeraction.js +12 -11
  145. package/dist/esm/models/components/computeraction.js.map +1 -1
  146. package/dist/esm/models/components/customtoolformat.d.ts +2 -1
  147. package/dist/esm/models/components/customtoolformat.d.ts.map +1 -1
  148. package/dist/esm/models/components/customtoolformat.js +5 -1
  149. package/dist/esm/models/components/customtoolformat.js.map +1 -1
  150. package/dist/esm/models/components/filesearchcompoundfilter.d.ts +3 -2
  151. package/dist/esm/models/components/filesearchcompoundfilter.d.ts.map +1 -1
  152. package/dist/esm/models/components/filesearchcompoundfilter.js +21 -20
  153. package/dist/esm/models/components/filesearchcompoundfilter.js.map +1 -1
  154. package/dist/esm/models/components/githubpullrequestrequest.d.ts +2 -0
  155. package/dist/esm/models/components/githubpullrequestrequest.d.ts.map +1 -1
  156. package/dist/esm/models/components/githubpullrequestrequest.js +11 -0
  157. package/dist/esm/models/components/githubpullrequestrequest.js.map +1 -1
  158. package/dist/esm/models/components/guardrailconfig.d.ts +2 -1
  159. package/dist/esm/models/components/guardrailconfig.d.ts.map +1 -1
  160. package/dist/esm/models/components/guardrailconfig.js +6 -5
  161. package/dist/esm/models/components/guardrailconfig.js.map +1 -1
  162. package/dist/esm/models/components/method.d.ts +6 -5
  163. package/dist/esm/models/components/method.d.ts.map +1 -1
  164. package/dist/esm/models/components/method.js +36 -35
  165. package/dist/esm/models/components/method.js.map +1 -1
  166. package/dist/esm/models/components/openaichatcompletionchoice.d.ts +4 -3
  167. package/dist/esm/models/components/openaichatcompletionchoice.d.ts.map +1 -1
  168. package/dist/esm/models/components/openaichatcompletionchoice.js +19 -18
  169. package/dist/esm/models/components/openaichatcompletionchoice.js.map +1 -1
  170. package/dist/esm/models/components/openaichatcompletionchunk.d.ts +4 -3
  171. package/dist/esm/models/components/openaichatcompletionchunk.d.ts.map +1 -1
  172. package/dist/esm/models/components/openaichatcompletionchunk.js +19 -18
  173. package/dist/esm/models/components/openaichatcompletionchunk.js.map +1 -1
  174. package/dist/esm/models/components/outputmessage.d.ts +3 -2
  175. package/dist/esm/models/components/outputmessage.d.ts.map +1 -1
  176. package/dist/esm/models/components/outputmessage.js +9 -8
  177. package/dist/esm/models/components/outputmessage.js.map +1 -1
  178. package/dist/esm/models/components/outputmessagewithid.d.ts +3 -2
  179. package/dist/esm/models/components/outputmessagewithid.d.ts.map +1 -1
  180. package/dist/esm/models/components/outputmessagewithid.js +9 -8
  181. package/dist/esm/models/components/outputmessagewithid.js.map +1 -1
  182. package/dist/esm/models/components/outputtext.d.ts +3 -2
  183. package/dist/esm/models/components/outputtext.d.ts.map +1 -1
  184. package/dist/esm/models/components/outputtext.js +13 -12
  185. package/dist/esm/models/components/outputtext.js.map +1 -1
  186. package/dist/esm/models/components/responsecontentpartaddedevent.d.ts +3 -2
  187. package/dist/esm/models/components/responsecontentpartaddedevent.d.ts.map +1 -1
  188. package/dist/esm/models/components/responsecontentpartaddedevent.js +11 -11
  189. package/dist/esm/models/components/responsecontentpartaddedevent.js.map +1 -1
  190. package/dist/esm/models/components/responsecontentpartdoneevent.d.ts +3 -2
  191. package/dist/esm/models/components/responsecontentpartdoneevent.d.ts.map +1 -1
  192. package/dist/esm/models/components/responsecontentpartdoneevent.js +11 -10
  193. package/dist/esm/models/components/responsecontentpartdoneevent.js.map +1 -1
  194. package/dist/esm/models/components/responseformat.d.ts +2 -1
  195. package/dist/esm/models/components/responseformat.d.ts.map +1 -1
  196. package/dist/esm/models/components/responseformat.js +6 -5
  197. package/dist/esm/models/components/responseformat.js.map +1 -1
  198. package/dist/esm/models/components/responseobject.d.ts +5 -4
  199. package/dist/esm/models/components/responseobject.d.ts.map +1 -1
  200. package/dist/esm/models/components/responseobject.js +41 -40
  201. package/dist/esm/models/components/responseobject.js.map +1 -1
  202. package/dist/esm/models/components/responsestreamingevent.d.ts +2 -1
  203. package/dist/esm/models/components/responsestreamingevent.d.ts.map +1 -1
  204. package/dist/esm/models/components/responsestreamingevent.js +68 -67
  205. package/dist/esm/models/components/responsestreamingevent.js.map +1 -1
  206. package/dist/esm/models/components/sessionrecord.d.ts +2 -0
  207. package/dist/esm/models/components/sessionrecord.d.ts.map +1 -1
  208. package/dist/esm/models/components/sessionrecord.js +4 -0
  209. package/dist/esm/models/components/sessionrecord.js.map +1 -1
  210. package/dist/esm/models/components/shellenvironment.d.ts +2 -1
  211. package/dist/esm/models/components/shellenvironment.d.ts.map +1 -1
  212. package/dist/esm/models/components/shellenvironment.js +5 -4
  213. package/dist/esm/models/components/shellenvironment.js.map +1 -1
  214. package/dist/esm/models/components/skillentry.d.ts +2 -1
  215. package/dist/esm/models/components/skillentry.d.ts.map +1 -1
  216. package/dist/esm/models/components/skillentry.js +5 -4
  217. package/dist/esm/models/components/skillentry.js.map +1 -1
  218. package/dist/esm/models/components/tooldefinition.d.ts +5 -4
  219. package/dist/esm/models/components/tooldefinition.d.ts.map +1 -1
  220. package/dist/esm/models/components/tooldefinition.js +29 -28
  221. package/dist/esm/models/components/tooldefinition.js.map +1 -1
  222. package/dist/esm/models/components/websearchaction.d.ts +2 -1
  223. package/dist/esm/models/components/websearchaction.d.ts.map +1 -1
  224. package/dist/esm/models/components/websearchaction.js +6 -5
  225. package/dist/esm/models/components/websearchaction.js.map +1 -1
  226. package/dist/esm/models/operations/createchatcompletionstream.d.ts +2 -1
  227. package/dist/esm/models/operations/createchatcompletionstream.d.ts.map +1 -1
  228. package/dist/esm/models/operations/createchatcompletionstream.js +6 -5
  229. package/dist/esm/models/operations/createchatcompletionstream.js.map +1 -1
  230. package/dist/esm/models/operations/uploadfile.d.ts +1 -1
  231. package/dist/esm/types/discriminatedUnion.d.ts +25 -0
  232. package/dist/esm/types/discriminatedUnion.d.ts.map +1 -0
  233. package/dist/esm/types/discriminatedUnion.js +57 -0
  234. package/dist/esm/types/discriminatedUnion.js.map +1 -0
  235. package/jsr.json +1 -1
  236. package/package.json +1 -1
  237. package/src/hooks/multipartFilename.ts +60 -0
  238. package/src/hooks/registration.ts +2 -1
  239. package/src/lib/config.ts +2 -2
  240. package/src/mcp-server/mcp-server.ts +1 -1
  241. package/src/mcp-server/server.ts +1 -1
  242. package/src/models/components/agentschedulespec.ts +9 -6
  243. package/src/models/components/chunkingstrategy.ts +9 -6
  244. package/src/models/components/codeinterpreteroutput.ts +8 -5
  245. package/src/models/components/computeraction.ts +15 -12
  246. package/src/models/components/customtoolformat.ts +10 -2
  247. package/src/models/components/filesearchcompoundfilter.ts +41 -39
  248. package/src/models/components/githubpullrequestrequest.ts +13 -0
  249. package/src/models/components/guardrailconfig.ts +9 -6
  250. package/src/models/components/method.ts +75 -43
  251. package/src/models/components/openaichatcompletionchoice.ts +24 -21
  252. package/src/models/components/openaichatcompletionchunk.ts +24 -21
  253. package/src/models/components/outputmessage.ts +19 -10
  254. package/src/models/components/outputmessagewithid.ts +19 -10
  255. package/src/models/components/outputtext.ts +23 -16
  256. package/src/models/components/responsecontentpartaddedevent.ts +25 -13
  257. package/src/models/components/responsecontentpartdoneevent.ts +22 -12
  258. package/src/models/components/responseformat.ts +9 -6
  259. package/src/models/components/responseobject.ts +62 -48
  260. package/src/models/components/responsestreamingevent.ts +118 -68
  261. package/src/models/components/sessionrecord.ts +6 -0
  262. package/src/models/components/shellenvironment.ts +8 -5
  263. package/src/models/components/skillentry.ts +10 -5
  264. package/src/models/components/tooldefinition.ts +42 -31
  265. package/src/models/components/websearchaction.ts +12 -6
  266. package/src/models/operations/createchatcompletionstream.ts +12 -6
  267. package/src/models/operations/uploadfile.ts +1 -1
  268. package/src/types/discriminatedUnion.ts +96 -0
package/bin/mcp-server.js CHANGED
@@ -52686,8 +52686,81 @@ var init_mcp = __esm(() => {
52686
52686
  };
52687
52687
  });
52688
52688
 
52689
+ // src/models/errors/httpclienterrors.ts
52690
+ var HTTPClientError, UnexpectedClientError, InvalidRequestError, RequestAbortedError, RequestTimeoutError, ConnectionError;
52691
+ var init_httpclienterrors = __esm(() => {
52692
+ HTTPClientError = class HTTPClientError extends Error {
52693
+ cause;
52694
+ name = "HTTPClientError";
52695
+ constructor(message, opts) {
52696
+ let msg = message;
52697
+ if (opts?.cause) {
52698
+ msg += `: ${opts.cause}`;
52699
+ }
52700
+ super(msg, opts);
52701
+ if (typeof this.cause === "undefined") {
52702
+ this.cause = opts?.cause;
52703
+ }
52704
+ }
52705
+ };
52706
+ UnexpectedClientError = class UnexpectedClientError extends HTTPClientError {
52707
+ name = "UnexpectedClientError";
52708
+ };
52709
+ InvalidRequestError = class InvalidRequestError extends HTTPClientError {
52710
+ name = "InvalidRequestError";
52711
+ };
52712
+ RequestAbortedError = class RequestAbortedError extends HTTPClientError {
52713
+ name = "RequestAbortedError";
52714
+ };
52715
+ RequestTimeoutError = class RequestTimeoutError extends HTTPClientError {
52716
+ name = "RequestTimeoutError";
52717
+ };
52718
+ ConnectionError = class ConnectionError extends HTTPClientError {
52719
+ name = "ConnectionError";
52720
+ };
52721
+ });
52722
+
52723
+ // src/hooks/multipartFilename.ts
52724
+ class MultipartFilenameHook {
52725
+ beforeCreateRequest(hookCtx, input) {
52726
+ const field = FILE_FIELDS[hookCtx.operationID];
52727
+ const body = input.options?.body;
52728
+ if (field == null || !(body instanceof FormData)) {
52729
+ return input;
52730
+ }
52731
+ for (const entry of body.getAll(field)) {
52732
+ if (typeof entry === "string") {
52733
+ continue;
52734
+ }
52735
+ const rawName = Reflect.get(entry, "name");
52736
+ const normalizedName = typeof rawName === "string" ? rawName.trim() : "";
52737
+ if (!normalizedName || normalizedName === PLACEHOLDER_NAME) {
52738
+ throw new InvalidRequestError(`The "${field}" part of the ${hookCtx.operationID} request has no ` + "filename and the platform requires one to detect the file type. " + 'Pass a File, e.g. new File([bytes], "report.pdf"), or the ' + "{ fileName, content } object form instead of a raw Blob. (A " + `file literally named "${PLACEHOLDER_NAME}" is indistinguishable ` + "from the runtime placeholder and is also rejected; include an " + "extension in its name.)");
52739
+ }
52740
+ }
52741
+ return input;
52742
+ }
52743
+ }
52744
+ var FILE_FIELDS, PLACEHOLDER_NAME = "blob";
52745
+ var init_multipartFilename = __esm(() => {
52746
+ init_httpclienterrors();
52747
+ FILE_FIELDS = {
52748
+ uploadFile: "file",
52749
+ extract: "file",
52750
+ extractWithSchema: "file",
52751
+ transcribe: "file",
52752
+ createSkill: "files[]",
52753
+ createSkillVersion: "files[]"
52754
+ };
52755
+ });
52756
+
52689
52757
  // src/hooks/registration.ts
52690
- function initHooks(hooks) {}
52758
+ function initHooks(hooks) {
52759
+ hooks.registerBeforeCreateRequestHook(new MultipartFilenameHook);
52760
+ }
52761
+ var init_registration = __esm(() => {
52762
+ init_multipartFilename();
52763
+ });
52691
52764
 
52692
52765
  // src/hooks/hooks.ts
52693
52766
  class SDKHooks {
@@ -52767,40 +52840,8 @@ class SDKHooks {
52767
52840
  return { response: res, error: err };
52768
52841
  }
52769
52842
  }
52770
- var init_hooks = () => {};
52771
-
52772
- // src/models/errors/httpclienterrors.ts
52773
- var HTTPClientError, UnexpectedClientError, InvalidRequestError, RequestAbortedError, RequestTimeoutError, ConnectionError;
52774
- var init_httpclienterrors = __esm(() => {
52775
- HTTPClientError = class HTTPClientError extends Error {
52776
- cause;
52777
- name = "HTTPClientError";
52778
- constructor(message, opts) {
52779
- let msg = message;
52780
- if (opts?.cause) {
52781
- msg += `: ${opts.cause}`;
52782
- }
52783
- super(msg, opts);
52784
- if (typeof this.cause === "undefined") {
52785
- this.cause = opts?.cause;
52786
- }
52787
- }
52788
- };
52789
- UnexpectedClientError = class UnexpectedClientError extends HTTPClientError {
52790
- name = "UnexpectedClientError";
52791
- };
52792
- InvalidRequestError = class InvalidRequestError extends HTTPClientError {
52793
- name = "InvalidRequestError";
52794
- };
52795
- RequestAbortedError = class RequestAbortedError extends HTTPClientError {
52796
- name = "RequestAbortedError";
52797
- };
52798
- RequestTimeoutError = class RequestTimeoutError extends HTTPClientError {
52799
- name = "RequestTimeoutError";
52800
- };
52801
- ConnectionError = class ConnectionError extends HTTPClientError {
52802
- name = "ConnectionError";
52803
- };
52843
+ var init_hooks = __esm(() => {
52844
+ init_registration();
52804
52845
  });
52805
52846
 
52806
52847
  // src/types/fp.ts
@@ -52876,9 +52917,9 @@ var init_config = __esm(() => {
52876
52917
  SDK_METADATA = {
52877
52918
  language: "typescript",
52878
52919
  openapiDocVersion: "1.1.0",
52879
- sdkVersion: "0.54.7",
52920
+ sdkVersion: "0.54.9",
52880
52921
  genVersion: "2.933.0",
52881
- userAgent: "speakeasy-sdk/typescript 0.54.7 2.933.0 1.1.0 @meetkai/mka1"
52922
+ userAgent: "speakeasy-sdk/typescript 0.54.9 2.933.0 1.1.0 @meetkai/mka1"
52882
52923
  };
52883
52924
  });
52884
52925
 
@@ -55250,6 +55291,63 @@ var init_agenttextconfiguration = __esm(() => {
55250
55291
  });
55251
55292
  });
55252
55293
 
55294
+ // src/types/unrecognized.ts
55295
+ function startCountingUnrecognized() {
55296
+ refCount++;
55297
+ const start = globalCount;
55298
+ return {
55299
+ end: (delta) => {
55300
+ const count = globalCount - start;
55301
+ globalCount = start + (delta ?? count);
55302
+ if (--refCount === 0)
55303
+ globalCount = 0;
55304
+ return count;
55305
+ }
55306
+ };
55307
+ }
55308
+ var globalCount = 0, refCount = 0;
55309
+ var init_unrecognized = () => {};
55310
+
55311
+ // src/types/discriminatedUnion.ts
55312
+ function discriminatedUnion2(inputPropertyName, options, opts = {}) {
55313
+ const { unknownValue = "UNKNOWN", outputPropertyName } = opts;
55314
+ return unknownType().transform((input) => {
55315
+ const fallback = Object.defineProperties({
55316
+ raw: input,
55317
+ [outputPropertyName ?? inputPropertyName]: unknownValue,
55318
+ isUnknown: true
55319
+ }, { [UNKNOWN]: { value: true, enumerable: false, configurable: false } });
55320
+ const isObject2 = typeof input === "object" && input !== null;
55321
+ if (!isObject2)
55322
+ return fallback;
55323
+ const discriminator = input[inputPropertyName];
55324
+ if (typeof discriminator !== "string")
55325
+ return fallback;
55326
+ if (!(discriminator in options))
55327
+ return fallback;
55328
+ const schema = options[discriminator];
55329
+ if (!schema)
55330
+ return fallback;
55331
+ const unrecognizedCtr = startCountingUnrecognized();
55332
+ const result = schema.safeParse(input);
55333
+ if (!result.success) {
55334
+ unrecognizedCtr.end(0);
55335
+ return fallback;
55336
+ }
55337
+ unrecognizedCtr.end();
55338
+ if (outputPropertyName) {
55339
+ result.data[outputPropertyName] = discriminator;
55340
+ }
55341
+ return result.data;
55342
+ });
55343
+ }
55344
+ var UNKNOWN;
55345
+ var init_discriminatedUnion = __esm(() => {
55346
+ init_esm();
55347
+ init_unrecognized();
55348
+ UNKNOWN = Symbol("UNKNOWN");
55349
+ });
55350
+
55253
55351
  // src/models/components/filesearchcomparisonfilter.ts
55254
55352
  var FileSearchComparisonFilterType, FileSearchComparisonFilterType$inboundSchema, FileSearchComparisonFilterType$outboundSchema, FileSearchComparisonFilterValue$inboundSchema, FileSearchComparisonFilterValue$outboundSchema, FileSearchComparisonFilter$inboundSchema, FileSearchComparisonFilter$outboundSchema;
55255
55353
  var init_filesearchcomparisonfilter = __esm(() => {
@@ -55282,6 +55380,7 @@ var init_filesearchcomparisonfilter = __esm(() => {
55282
55380
  var FileSearchCompoundFilterType, FileSearchCompoundFilterType$inboundSchema, FileSearchCompoundFilterType$outboundSchema, FileSearchCompoundFilter$inboundSchema, FileSearchCompoundFilter$outboundSchema, FileSearchCompoundFilterFilters$inboundSchema, FileSearchCompoundFilterFilters$outboundSchema;
55283
55381
  var init_filesearchcompoundfilter = __esm(() => {
55284
55382
  init_esm();
55383
+ init_discriminatedUnion();
55285
55384
  init_filesearchcomparisonfilter();
55286
55385
  FileSearchCompoundFilterType = {
55287
55386
  And: "and",
@@ -55291,16 +55390,16 @@ var init_filesearchcompoundfilter = __esm(() => {
55291
55390
  FileSearchCompoundFilterType$outboundSchema = FileSearchCompoundFilterType$inboundSchema;
55292
55391
  FileSearchCompoundFilter$inboundSchema = objectType({
55293
55392
  type: FileSearchCompoundFilterType$inboundSchema,
55294
- filters: arrayType(unionType([
55295
- FileSearchComparisonFilter$inboundSchema.and(objectType({ type: literalType("eq") })),
55296
- FileSearchComparisonFilter$inboundSchema.and(objectType({ type: literalType("ne") })),
55297
- FileSearchComparisonFilter$inboundSchema.and(objectType({ type: literalType("gt") })),
55298
- FileSearchComparisonFilter$inboundSchema.and(objectType({ type: literalType("gte") })),
55299
- FileSearchComparisonFilter$inboundSchema.and(objectType({ type: literalType("lt") })),
55300
- FileSearchComparisonFilter$inboundSchema.and(objectType({ type: literalType("lte") })),
55301
- lazyType(() => FileSearchCompoundFilter$inboundSchema).and(objectType({ type: literalType("and") })),
55302
- lazyType(() => FileSearchCompoundFilter$inboundSchema).and(objectType({ type: literalType("or") }))
55303
- ]))
55393
+ filters: arrayType(discriminatedUnion2("type", {
55394
+ eq: FileSearchComparisonFilter$inboundSchema.and(objectType({ type: literalType("eq") })),
55395
+ ne: FileSearchComparisonFilter$inboundSchema.and(objectType({ type: literalType("ne") })),
55396
+ gt: FileSearchComparisonFilter$inboundSchema.and(objectType({ type: literalType("gt") })),
55397
+ gte: FileSearchComparisonFilter$inboundSchema.and(objectType({ type: literalType("gte") })),
55398
+ lt: FileSearchComparisonFilter$inboundSchema.and(objectType({ type: literalType("lt") })),
55399
+ lte: FileSearchComparisonFilter$inboundSchema.and(objectType({ type: literalType("lte") })),
55400
+ and: lazyType(() => FileSearchCompoundFilter$inboundSchema).and(objectType({ type: literalType("and") })),
55401
+ or: lazyType(() => FileSearchCompoundFilter$inboundSchema).and(objectType({ type: literalType("or") }))
55402
+ }))
55304
55403
  });
55305
55404
  FileSearchCompoundFilter$outboundSchema = objectType({
55306
55405
  type: FileSearchCompoundFilterType$outboundSchema,
@@ -55315,16 +55414,16 @@ var init_filesearchcompoundfilter = __esm(() => {
55315
55414
  lazyType(() => FileSearchCompoundFilter$outboundSchema).and(objectType({ type: literalType("or") }))
55316
55415
  ]))
55317
55416
  });
55318
- FileSearchCompoundFilterFilters$inboundSchema = unionType([
55319
- FileSearchComparisonFilter$inboundSchema.and(objectType({ type: literalType("eq") })),
55320
- FileSearchComparisonFilter$inboundSchema.and(objectType({ type: literalType("ne") })),
55321
- FileSearchComparisonFilter$inboundSchema.and(objectType({ type: literalType("gt") })),
55322
- FileSearchComparisonFilter$inboundSchema.and(objectType({ type: literalType("gte") })),
55323
- FileSearchComparisonFilter$inboundSchema.and(objectType({ type: literalType("lt") })),
55324
- FileSearchComparisonFilter$inboundSchema.and(objectType({ type: literalType("lte") })),
55325
- lazyType(() => FileSearchCompoundFilter$inboundSchema).and(objectType({ type: literalType("and") })),
55326
- lazyType(() => FileSearchCompoundFilter$inboundSchema).and(objectType({ type: literalType("or") }))
55327
- ]);
55417
+ FileSearchCompoundFilterFilters$inboundSchema = discriminatedUnion2("type", {
55418
+ eq: FileSearchComparisonFilter$inboundSchema.and(objectType({ type: literalType("eq") })),
55419
+ ne: FileSearchComparisonFilter$inboundSchema.and(objectType({ type: literalType("ne") })),
55420
+ gt: FileSearchComparisonFilter$inboundSchema.and(objectType({ type: literalType("gt") })),
55421
+ gte: FileSearchComparisonFilter$inboundSchema.and(objectType({ type: literalType("gte") })),
55422
+ lt: FileSearchComparisonFilter$inboundSchema.and(objectType({ type: literalType("lt") })),
55423
+ lte: FileSearchComparisonFilter$inboundSchema.and(objectType({ type: literalType("lte") })),
55424
+ and: lazyType(() => FileSearchCompoundFilter$inboundSchema).and(objectType({ type: literalType("and") })),
55425
+ or: lazyType(() => FileSearchCompoundFilter$inboundSchema).and(objectType({ type: literalType("or") }))
55426
+ });
55328
55427
  FileSearchCompoundFilterFilters$outboundSchema = unionType([
55329
55428
  FileSearchComparisonFilter$outboundSchema.and(objectType({ type: literalType("eq") })),
55330
55429
  FileSearchComparisonFilter$outboundSchema.and(objectType({ type: literalType("ne") })),
@@ -55367,6 +55466,7 @@ var ToolDefinition7Type, ToolDefinitionEnvironmentAccess, EnvironmentAccess, Too
55367
55466
  var init_tooldefinition = __esm(() => {
55368
55467
  init_esm();
55369
55468
  init_primitives();
55469
+ init_discriminatedUnion();
55370
55470
  init_filesearchcomparisonfilter();
55371
55471
  init_filesearchcompoundfilter();
55372
55472
  init_mcptoolfilter();
@@ -55522,20 +55622,20 @@ var init_tooldefinition = __esm(() => {
55522
55622
  memoryStores: "memory_stores"
55523
55623
  });
55524
55624
  });
55525
- Environment$inboundSchema = unionType([
55526
- lazyType(() => Environment1$inboundSchema),
55527
- lazyType(() => Environment2$inboundSchema)
55528
- ]);
55625
+ Environment$inboundSchema = discriminatedUnion2("type", {
55626
+ container_auto: lazyType(() => Environment1$inboundSchema),
55627
+ container_reference: lazyType(() => Environment2$inboundSchema)
55628
+ });
55529
55629
  Environment$outboundSchema = unionType([
55530
55630
  lazyType(() => Environment1$outboundSchema),
55531
55631
  lazyType(() => Environment2$outboundSchema)
55532
55632
  ]);
55533
55633
  Seven$inboundSchema = objectType({
55534
55634
  type: ToolDefinition7Type$inboundSchema,
55535
- environment: unionType([
55536
- lazyType(() => Environment1$inboundSchema),
55537
- lazyType(() => Environment2$inboundSchema)
55538
- ]).optional()
55635
+ environment: discriminatedUnion2("type", {
55636
+ container_auto: lazyType(() => Environment1$inboundSchema),
55637
+ container_reference: lazyType(() => Environment2$inboundSchema)
55638
+ }).optional()
55539
55639
  });
55540
55640
  Seven$outboundSchema = objectType({
55541
55641
  type: ToolDefinition7Type$outboundSchema,
@@ -55562,16 +55662,16 @@ var init_tooldefinition = __esm(() => {
55562
55662
  });
55563
55663
  ToolDefinition4Type$inboundSchema = nativeEnumType(ToolDefinition4Type);
55564
55664
  ToolDefinition4Type$outboundSchema = ToolDefinition4Type$inboundSchema;
55565
- ToolDefinition4Filters$inboundSchema = unionType([
55566
- FileSearchComparisonFilter$inboundSchema.and(objectType({ type: literalType("eq") })),
55567
- FileSearchComparisonFilter$inboundSchema.and(objectType({ type: literalType("ne") })),
55568
- FileSearchComparisonFilter$inboundSchema.and(objectType({ type: literalType("gt") })),
55569
- FileSearchComparisonFilter$inboundSchema.and(objectType({ type: literalType("gte") })),
55570
- FileSearchComparisonFilter$inboundSchema.and(objectType({ type: literalType("lt") })),
55571
- FileSearchComparisonFilter$inboundSchema.and(objectType({ type: literalType("lte") })),
55572
- FileSearchCompoundFilter$inboundSchema.and(objectType({ type: literalType("and") })),
55573
- FileSearchCompoundFilter$inboundSchema.and(objectType({ type: literalType("or") }))
55574
- ]);
55665
+ ToolDefinition4Filters$inboundSchema = discriminatedUnion2("type", {
55666
+ eq: FileSearchComparisonFilter$inboundSchema.and(objectType({ type: literalType("eq") })),
55667
+ ne: FileSearchComparisonFilter$inboundSchema.and(objectType({ type: literalType("ne") })),
55668
+ gt: FileSearchComparisonFilter$inboundSchema.and(objectType({ type: literalType("gt") })),
55669
+ gte: FileSearchComparisonFilter$inboundSchema.and(objectType({ type: literalType("gte") })),
55670
+ lt: FileSearchComparisonFilter$inboundSchema.and(objectType({ type: literalType("lt") })),
55671
+ lte: FileSearchComparisonFilter$inboundSchema.and(objectType({ type: literalType("lte") })),
55672
+ and: FileSearchCompoundFilter$inboundSchema.and(objectType({ type: literalType("and") })),
55673
+ or: FileSearchCompoundFilter$inboundSchema.and(objectType({ type: literalType("or") }))
55674
+ });
55575
55675
  ToolDefinition4Filters$outboundSchema = unionType([
55576
55676
  FileSearchComparisonFilter$outboundSchema.and(objectType({ type: literalType("eq") })),
55577
55677
  FileSearchComparisonFilter$outboundSchema.and(objectType({ type: literalType("ne") })),
@@ -55601,16 +55701,16 @@ var init_tooldefinition = __esm(() => {
55601
55701
  ToolDefinition4$inboundSchema = objectType({
55602
55702
  type: ToolDefinition4Type$inboundSchema,
55603
55703
  vector_store_ids: arrayType(stringType()),
55604
- filters: unionType([
55605
- FileSearchComparisonFilter$inboundSchema.and(objectType({ type: literalType("eq") })),
55606
- FileSearchComparisonFilter$inboundSchema.and(objectType({ type: literalType("ne") })),
55607
- FileSearchComparisonFilter$inboundSchema.and(objectType({ type: literalType("gt") })),
55608
- FileSearchComparisonFilter$inboundSchema.and(objectType({ type: literalType("gte") })),
55609
- FileSearchComparisonFilter$inboundSchema.and(objectType({ type: literalType("lt") })),
55610
- FileSearchComparisonFilter$inboundSchema.and(objectType({ type: literalType("lte") })),
55611
- FileSearchCompoundFilter$inboundSchema.and(objectType({ type: literalType("and") })),
55612
- FileSearchCompoundFilter$inboundSchema.and(objectType({ type: literalType("or") }))
55613
- ]).optional(),
55704
+ filters: discriminatedUnion2("type", {
55705
+ eq: FileSearchComparisonFilter$inboundSchema.and(objectType({ type: literalType("eq") })),
55706
+ ne: FileSearchComparisonFilter$inboundSchema.and(objectType({ type: literalType("ne") })),
55707
+ gt: FileSearchComparisonFilter$inboundSchema.and(objectType({ type: literalType("gt") })),
55708
+ gte: FileSearchComparisonFilter$inboundSchema.and(objectType({ type: literalType("gte") })),
55709
+ lt: FileSearchComparisonFilter$inboundSchema.and(objectType({ type: literalType("lt") })),
55710
+ lte: FileSearchComparisonFilter$inboundSchema.and(objectType({ type: literalType("lte") })),
55711
+ and: FileSearchCompoundFilter$inboundSchema.and(objectType({ type: literalType("and") })),
55712
+ or: FileSearchCompoundFilter$inboundSchema.and(objectType({ type: literalType("or") }))
55713
+ }).optional(),
55614
55714
  max_num_results: numberType().int().optional(),
55615
55715
  ranking_options: lazyType(() => ToolDefinitionRankingOptions$inboundSchema).optional()
55616
55716
  }).transform((v2) => {
@@ -56363,6 +56463,7 @@ var AgentScheduleSpec3$inboundSchema, AgentScheduleSpec3$outboundSchema, AgentSc
56363
56463
  var init_agentschedulespec = __esm(() => {
56364
56464
  init_esm();
56365
56465
  init_primitives();
56466
+ init_discriminatedUnion();
56366
56467
  AgentScheduleSpec3$inboundSchema = objectType({
56367
56468
  type: literalType("cron"),
56368
56469
  cron_expression: stringType(),
@@ -56421,11 +56522,11 @@ var init_agentschedulespec = __esm(() => {
56421
56522
  runAt: "run_at"
56422
56523
  });
56423
56524
  });
56424
- AgentScheduleSpec$inboundSchema = unionType([
56425
- lazyType(() => AgentScheduleSpec1$inboundSchema),
56426
- lazyType(() => AgentScheduleSpec2$inboundSchema),
56427
- lazyType(() => AgentScheduleSpec3$inboundSchema)
56428
- ]);
56525
+ AgentScheduleSpec$inboundSchema = discriminatedUnion2("type", {
56526
+ once: lazyType(() => AgentScheduleSpec1$inboundSchema),
56527
+ interval: lazyType(() => AgentScheduleSpec2$inboundSchema),
56528
+ cron: lazyType(() => AgentScheduleSpec3$inboundSchema)
56529
+ });
56429
56530
  AgentScheduleSpec$outboundSchema = unionType([
56430
56531
  lazyType(() => AgentScheduleSpec1$outboundSchema),
56431
56532
  lazyType(() => AgentScheduleSpec2$outboundSchema),
@@ -57360,14 +57461,15 @@ var init_staticchunkingstrategy = __esm(() => {
57360
57461
  var ChunkingStrategy$inboundSchema, ChunkingStrategy$outboundSchema;
57361
57462
  var init_chunkingstrategy = __esm(() => {
57362
57463
  init_esm();
57464
+ init_discriminatedUnion();
57363
57465
  init_autochunkingstrategy();
57364
57466
  init_otherchunkingstrategy();
57365
57467
  init_staticchunkingstrategy();
57366
- ChunkingStrategy$inboundSchema = unionType([
57367
- AutoChunkingStrategy$inboundSchema,
57368
- StaticChunkingStrategy$inboundSchema,
57369
- OtherChunkingStrategy$inboundSchema
57370
- ]);
57468
+ ChunkingStrategy$inboundSchema = discriminatedUnion2("type", {
57469
+ auto: AutoChunkingStrategy$inboundSchema,
57470
+ static: StaticChunkingStrategy$inboundSchema,
57471
+ other: OtherChunkingStrategy$inboundSchema
57472
+ });
57371
57473
  ChunkingStrategy$outboundSchema = unionType([
57372
57474
  AutoChunkingStrategy$outboundSchema,
57373
57475
  StaticChunkingStrategy$outboundSchema,
@@ -57586,12 +57688,13 @@ var init_codeinterpreteroutputlogs = __esm(() => {
57586
57688
  var CodeInterpreterOutput$inboundSchema, CodeInterpreterOutput$outboundSchema;
57587
57689
  var init_codeinterpreteroutput = __esm(() => {
57588
57690
  init_esm();
57691
+ init_discriminatedUnion();
57589
57692
  init_codeinterpreteroutputimage();
57590
57693
  init_codeinterpreteroutputlogs();
57591
- CodeInterpreterOutput$inboundSchema = unionType([
57592
- CodeInterpreterOutputLogs$inboundSchema,
57593
- CodeInterpreterOutputImage$inboundSchema
57594
- ]);
57694
+ CodeInterpreterOutput$inboundSchema = discriminatedUnion2("type", {
57695
+ logs: CodeInterpreterOutputLogs$inboundSchema,
57696
+ image: CodeInterpreterOutputImage$inboundSchema
57697
+ });
57595
57698
  CodeInterpreterOutput$outboundSchema = unionType([
57596
57699
  CodeInterpreterOutputLogs$outboundSchema,
57597
57700
  CodeInterpreterOutputImage$outboundSchema
@@ -58061,6 +58164,7 @@ var init_waitaction = __esm(() => {
58061
58164
  var ComputerAction$inboundSchema, ComputerAction$outboundSchema;
58062
58165
  var init_computeraction = __esm(() => {
58063
58166
  init_esm();
58167
+ init_discriminatedUnion();
58064
58168
  init_clickaction();
58065
58169
  init_doubleclickaction();
58066
58170
  init_dragaction();
@@ -58070,17 +58174,17 @@ var init_computeraction = __esm(() => {
58070
58174
  init_scrollaction();
58071
58175
  init_typeaction();
58072
58176
  init_waitaction();
58073
- ComputerAction$inboundSchema = unionType([
58074
- ClickAction$inboundSchema,
58075
- DoubleClickAction$inboundSchema,
58076
- DragAction$inboundSchema,
58077
- KeyPressAction$inboundSchema,
58078
- MoveAction$inboundSchema,
58079
- ScreenshotAction$inboundSchema,
58080
- ScrollAction$inboundSchema,
58081
- TypeAction$inboundSchema,
58082
- WaitAction$inboundSchema
58083
- ]);
58177
+ ComputerAction$inboundSchema = discriminatedUnion2("type", {
58178
+ click: ClickAction$inboundSchema,
58179
+ double_click: DoubleClickAction$inboundSchema,
58180
+ drag: DragAction$inboundSchema,
58181
+ keypress: KeyPressAction$inboundSchema,
58182
+ move: MoveAction$inboundSchema,
58183
+ screenshot: ScreenshotAction$inboundSchema,
58184
+ scroll: ScrollAction$inboundSchema,
58185
+ type: TypeAction$inboundSchema,
58186
+ wait: WaitAction$inboundSchema
58187
+ });
58084
58188
  ComputerAction$outboundSchema = unionType([
58085
58189
  ClickAction$outboundSchema,
58086
58190
  DoubleClickAction$outboundSchema,
@@ -58728,17 +58832,18 @@ var init_urlcitation = __esm(() => {
58728
58832
  var Annotations$inboundSchema, Annotations$outboundSchema, OutputText$inboundSchema, OutputText$outboundSchema;
58729
58833
  var init_outputtext = __esm(() => {
58730
58834
  init_esm();
58835
+ init_discriminatedUnion();
58731
58836
  init_containerfilecitation();
58732
58837
  init_filecitation();
58733
58838
  init_filepath();
58734
58839
  init_logprob();
58735
58840
  init_urlcitation();
58736
- Annotations$inboundSchema = unionType([
58737
- FileCitation$inboundSchema,
58738
- URLCitation$inboundSchema,
58739
- ContainerFileCitation$inboundSchema,
58740
- FilePath$inboundSchema
58741
- ]);
58841
+ Annotations$inboundSchema = discriminatedUnion2("type", {
58842
+ file_citation: FileCitation$inboundSchema,
58843
+ url_citation: URLCitation$inboundSchema,
58844
+ container_file_citation: ContainerFileCitation$inboundSchema,
58845
+ file_path: FilePath$inboundSchema
58846
+ });
58742
58847
  Annotations$outboundSchema = unionType([
58743
58848
  FileCitation$outboundSchema,
58744
58849
  URLCitation$outboundSchema,
@@ -58748,12 +58853,12 @@ var init_outputtext = __esm(() => {
58748
58853
  OutputText$inboundSchema = objectType({
58749
58854
  type: literalType("output_text"),
58750
58855
  text: stringType(),
58751
- annotations: arrayType(unionType([
58752
- FileCitation$inboundSchema,
58753
- URLCitation$inboundSchema,
58754
- ContainerFileCitation$inboundSchema,
58755
- FilePath$inboundSchema
58756
- ])).optional(),
58856
+ annotations: arrayType(discriminatedUnion2("type", {
58857
+ file_citation: FileCitation$inboundSchema,
58858
+ url_citation: URLCitation$inboundSchema,
58859
+ container_file_citation: ContainerFileCitation$inboundSchema,
58860
+ file_path: FilePath$inboundSchema
58861
+ })).optional(),
58757
58862
  logprobs: arrayType(LogProb$inboundSchema).optional()
58758
58863
  });
58759
58864
  OutputText$outboundSchema = objectType({
@@ -59124,6 +59229,7 @@ var init_outputaudioitem = __esm(() => {
59124
59229
  var OutputMessageStatus, Phase, OutputMessageContent$inboundSchema, OutputMessageContent$outboundSchema, OutputMessageStatus$inboundSchema, OutputMessageStatus$outboundSchema, Phase$inboundSchema, Phase$outboundSchema, OutputMessage$inboundSchema, OutputMessage$outboundSchema;
59125
59230
  var init_outputmessage = __esm(() => {
59126
59231
  init_esm();
59232
+ init_discriminatedUnion();
59127
59233
  init_outputtext();
59128
59234
  init_refusal();
59129
59235
  OutputMessageStatus = {
@@ -59135,10 +59241,10 @@ var init_outputmessage = __esm(() => {
59135
59241
  Commentary: "commentary",
59136
59242
  FinalAnswer: "final_answer"
59137
59243
  };
59138
- OutputMessageContent$inboundSchema = unionType([
59139
- OutputText$inboundSchema.and(objectType({ type: literalType("output_text") })),
59140
- Refusal$inboundSchema.and(objectType({ type: literalType("refusal") }))
59141
- ]);
59244
+ OutputMessageContent$inboundSchema = discriminatedUnion2("type", {
59245
+ output_text: OutputText$inboundSchema.and(objectType({ type: literalType("output_text") })),
59246
+ refusal: Refusal$inboundSchema.and(objectType({ type: literalType("refusal") }))
59247
+ });
59142
59248
  OutputMessageContent$outboundSchema = unionType([
59143
59249
  OutputText$outboundSchema.and(objectType({ type: literalType("output_text") })),
59144
59250
  Refusal$outboundSchema.and(objectType({ type: literalType("refusal") }))
@@ -59151,10 +59257,10 @@ var init_outputmessage = __esm(() => {
59151
59257
  type: literalType("message"),
59152
59258
  id: stringType(),
59153
59259
  role: literalType("assistant"),
59154
- content: arrayType(unionType([
59155
- OutputText$inboundSchema.and(objectType({ type: literalType("output_text") })),
59156
- Refusal$inboundSchema.and(objectType({ type: literalType("refusal") }))
59157
- ])),
59260
+ content: arrayType(discriminatedUnion2("type", {
59261
+ output_text: OutputText$inboundSchema.and(objectType({ type: literalType("output_text") })),
59262
+ refusal: Refusal$inboundSchema.and(objectType({ type: literalType("refusal") }))
59263
+ })),
59158
59264
  status: OutputMessageStatus$inboundSchema,
59159
59265
  phase: Phase$inboundSchema.optional()
59160
59266
  });
@@ -59457,14 +59563,15 @@ var init_searchaction = __esm(() => {
59457
59563
  var WebSearchAction$inboundSchema, WebSearchAction$outboundSchema;
59458
59564
  var init_websearchaction = __esm(() => {
59459
59565
  init_esm();
59566
+ init_discriminatedUnion();
59460
59567
  init_findaction();
59461
59568
  init_openpageaction();
59462
59569
  init_searchaction();
59463
- WebSearchAction$inboundSchema = unionType([
59464
- SearchAction$inboundSchema,
59465
- OpenPageAction$inboundSchema,
59466
- FindAction$inboundSchema
59467
- ]);
59570
+ WebSearchAction$inboundSchema = discriminatedUnion2("type", {
59571
+ search: SearchAction$inboundSchema,
59572
+ open_page: OpenPageAction$inboundSchema,
59573
+ find: FindAction$inboundSchema
59574
+ });
59468
59575
  WebSearchAction$outboundSchema = unionType([
59469
59576
  SearchAction$outboundSchema,
59470
59577
  OpenPageAction$outboundSchema,
@@ -63879,6 +63986,7 @@ var Type, MethodSamplingParamsReasoningEffort, GradersEvaluationMetric, GradersO
63879
63986
  var init_method = __esm(() => {
63880
63987
  init_esm();
63881
63988
  init_primitives();
63989
+ init_discriminatedUnion();
63882
63990
  init_dpohyperparameters();
63883
63991
  init_reinforcementhyperparameters();
63884
63992
  init_supervisedhyperparameters();
@@ -64101,13 +64209,13 @@ var init_method = __esm(() => {
64101
64209
  reference: stringType(),
64102
64210
  operation: GradersOperation$outboundSchema
64103
64211
  });
64104
- Graders$inboundSchema = unionType([
64105
- lazyType(() => Graders1$inboundSchema),
64106
- lazyType(() => Graders2$inboundSchema),
64107
- lazyType(() => Graders3$inboundSchema),
64108
- lazyType(() => Graders4$inboundSchema),
64109
- lazyType(() => Graders5$inboundSchema)
64110
- ]);
64212
+ Graders$inboundSchema = discriminatedUnion2("type", {
64213
+ string_check: lazyType(() => Graders1$inboundSchema),
64214
+ text_similarity: lazyType(() => Graders2$inboundSchema),
64215
+ python: lazyType(() => Graders3$inboundSchema),
64216
+ score_model: lazyType(() => Graders4$inboundSchema),
64217
+ label_model: lazyType(() => Graders5$inboundSchema)
64218
+ });
64111
64219
  Graders$outboundSchema = unionType([
64112
64220
  lazyType(() => Graders1$outboundSchema),
64113
64221
  lazyType(() => Graders2$outboundSchema),
@@ -64118,13 +64226,13 @@ var init_method = __esm(() => {
64118
64226
  Grader2$inboundSchema = objectType({
64119
64227
  type: literalType("multi"),
64120
64228
  name: stringType(),
64121
- graders: recordType(unionType([
64122
- lazyType(() => Graders1$inboundSchema),
64123
- lazyType(() => Graders2$inboundSchema),
64124
- lazyType(() => Graders3$inboundSchema),
64125
- lazyType(() => Graders4$inboundSchema),
64126
- lazyType(() => Graders5$inboundSchema)
64127
- ])),
64229
+ graders: recordType(discriminatedUnion2("type", {
64230
+ string_check: lazyType(() => Graders1$inboundSchema),
64231
+ text_similarity: lazyType(() => Graders2$inboundSchema),
64232
+ python: lazyType(() => Graders3$inboundSchema),
64233
+ score_model: lazyType(() => Graders4$inboundSchema),
64234
+ label_model: lazyType(() => Graders5$inboundSchema)
64235
+ })),
64128
64236
  calculate_output: stringType()
64129
64237
  }).transform((v2) => {
64130
64238
  return remap(v2, {
@@ -64299,13 +64407,13 @@ var init_method = __esm(() => {
64299
64407
  reference: stringType(),
64300
64408
  operation: Operation$outboundSchema
64301
64409
  });
64302
- Grader1$inboundSchema = unionType([
64303
- lazyType(() => One1$inboundSchema),
64304
- lazyType(() => One2$inboundSchema),
64305
- lazyType(() => One3$inboundSchema),
64306
- lazyType(() => One4$inboundSchema),
64307
- lazyType(() => One5$inboundSchema)
64308
- ]);
64410
+ Grader1$inboundSchema = discriminatedUnion2("type", {
64411
+ string_check: lazyType(() => One1$inboundSchema),
64412
+ text_similarity: lazyType(() => One2$inboundSchema),
64413
+ python: lazyType(() => One3$inboundSchema),
64414
+ score_model: lazyType(() => One4$inboundSchema),
64415
+ label_model: lazyType(() => One5$inboundSchema)
64416
+ });
64309
64417
  Grader1$outboundSchema = unionType([
64310
64418
  lazyType(() => One1$outboundSchema),
64311
64419
  lazyType(() => One2$outboundSchema),
@@ -64315,13 +64423,13 @@ var init_method = __esm(() => {
64315
64423
  ]);
64316
64424
  Grader$inboundSchema = unionType([
64317
64425
  lazyType(() => Grader2$inboundSchema),
64318
- unionType([
64319
- lazyType(() => One1$inboundSchema),
64320
- lazyType(() => One2$inboundSchema),
64321
- lazyType(() => One3$inboundSchema),
64322
- lazyType(() => One4$inboundSchema),
64323
- lazyType(() => One5$inboundSchema)
64324
- ])
64426
+ discriminatedUnion2("type", {
64427
+ string_check: lazyType(() => One1$inboundSchema),
64428
+ text_similarity: lazyType(() => One2$inboundSchema),
64429
+ python: lazyType(() => One3$inboundSchema),
64430
+ score_model: lazyType(() => One4$inboundSchema),
64431
+ label_model: lazyType(() => One5$inboundSchema)
64432
+ })
64325
64433
  ]);
64326
64434
  Grader$outboundSchema = unionType([
64327
64435
  lazyType(() => Grader2$outboundSchema),
@@ -64336,13 +64444,13 @@ var init_method = __esm(() => {
64336
64444
  Reinforcement$inboundSchema = objectType({
64337
64445
  grader: unionType([
64338
64446
  lazyType(() => Grader2$inboundSchema),
64339
- unionType([
64340
- lazyType(() => One1$inboundSchema),
64341
- lazyType(() => One2$inboundSchema),
64342
- lazyType(() => One3$inboundSchema),
64343
- lazyType(() => One4$inboundSchema),
64344
- lazyType(() => One5$inboundSchema)
64345
- ])
64447
+ discriminatedUnion2("type", {
64448
+ string_check: lazyType(() => One1$inboundSchema),
64449
+ text_similarity: lazyType(() => One2$inboundSchema),
64450
+ python: lazyType(() => One3$inboundSchema),
64451
+ score_model: lazyType(() => One4$inboundSchema),
64452
+ label_model: lazyType(() => One5$inboundSchema)
64453
+ })
64346
64454
  ]),
64347
64455
  hyperparameters: nullableType(ReinforcementHyperparameters$inboundSchema).optional()
64348
64456
  });
@@ -65015,6 +65123,7 @@ var init_sessionrecord = __esm(() => {
65015
65123
  resource_class: nullableType(SandboxResourceClass$inboundSchema).optional(),
65016
65124
  assignment_generation: numberType().int().default(1),
65017
65125
  managed_services: arrayType(ManagedServiceRecord$inboundSchema).optional(),
65126
+ github_repository_manifest_version: nullableType(numberType().int()).optional(),
65018
65127
  ttl_seconds: numberType().int().default(600),
65019
65128
  workspace_expires_at: nullableType(stringType().datetime({ offset: true }).transform((v2) => new Date(v2))).optional(),
65020
65129
  sandbox_features: arrayType(SandboxFeature$inboundSchema).optional(),
@@ -65036,6 +65145,7 @@ var init_sessionrecord = __esm(() => {
65036
65145
  resource_class: "resourceClass",
65037
65146
  assignment_generation: "assignmentGeneration",
65038
65147
  managed_services: "managedServices",
65148
+ github_repository_manifest_version: "githubRepositoryManifestVersion",
65039
65149
  ttl_seconds: "ttlSeconds",
65040
65150
  workspace_expires_at: "workspaceExpiresAt",
65041
65151
  sandbox_features: "sandboxFeatures",
@@ -65058,6 +65168,7 @@ var init_sessionrecord = __esm(() => {
65058
65168
  resourceClass: nullableType(SandboxResourceClass$outboundSchema).optional(),
65059
65169
  assignmentGeneration: numberType().int().default(1),
65060
65170
  managedServices: arrayType(ManagedServiceRecord$outboundSchema).optional(),
65171
+ githubRepositoryManifestVersion: nullableType(numberType().int()).optional(),
65061
65172
  ttlSeconds: numberType().int().default(600),
65062
65173
  workspaceExpiresAt: nullableType(dateType().transform((v2) => v2.toISOString())).optional(),
65063
65174
  sandboxFeatures: arrayType(SandboxFeature$outboundSchema).optional(),
@@ -65079,6 +65190,7 @@ var init_sessionrecord = __esm(() => {
65079
65190
  resourceClass: "resource_class",
65080
65191
  assignmentGeneration: "assignment_generation",
65081
65192
  managedServices: "managed_services",
65193
+ githubRepositoryManifestVersion: "github_repository_manifest_version",
65082
65194
  ttlSeconds: "ttl_seconds",
65083
65195
  workspaceExpiresAt: "workspace_expires_at",
65084
65196
  sandboxFeatures: "sandbox_features",
@@ -65495,9 +65607,13 @@ var init_textformat = __esm(() => {
65495
65607
  var CustomToolFormat$inboundSchema, CustomToolFormat$outboundSchema;
65496
65608
  var init_customtoolformat = __esm(() => {
65497
65609
  init_esm();
65610
+ init_discriminatedUnion();
65498
65611
  init_grammarformat();
65499
65612
  init_textformat();
65500
- CustomToolFormat$inboundSchema = unionType([TextFormat$inboundSchema, GrammarFormat$inboundSchema]);
65613
+ CustomToolFormat$inboundSchema = discriminatedUnion2("type", {
65614
+ text: TextFormat$inboundSchema,
65615
+ grammar: GrammarFormat$inboundSchema
65616
+ });
65501
65617
  CustomToolFormat$outboundSchema = unionType([TextFormat$outboundSchema, GrammarFormat$outboundSchema]);
65502
65618
  });
65503
65619
 
@@ -67631,14 +67747,15 @@ var init_promptinjectionguardrail = __esm(() => {
67631
67747
  var GuardrailConfig$inboundSchema, GuardrailConfig$outboundSchema;
67632
67748
  var init_guardrailconfig = __esm(() => {
67633
67749
  init_esm();
67750
+ init_discriminatedUnion();
67634
67751
  init_banwordsguardrail();
67635
67752
  init_leakageguardrail();
67636
67753
  init_promptinjectionguardrail();
67637
- GuardrailConfig$inboundSchema = unionType([
67638
- BanWordsGuardrail$inboundSchema,
67639
- PromptInjectionGuardrail$inboundSchema,
67640
- LeakageGuardrail$inboundSchema
67641
- ]);
67754
+ GuardrailConfig$inboundSchema = discriminatedUnion2("mode", {
67755
+ ban_words: BanWordsGuardrail$inboundSchema,
67756
+ prompt_injection: PromptInjectionGuardrail$inboundSchema,
67757
+ leakage: LeakageGuardrail$inboundSchema
67758
+ });
67642
67759
  GuardrailConfig$outboundSchema = unionType([
67643
67760
  BanWordsGuardrail$outboundSchema,
67644
67761
  PromptInjectionGuardrail$outboundSchema,
@@ -67716,19 +67833,30 @@ var init_getpromptresponse = __esm(() => {
67716
67833
  var GitHubPullRequestRequest$inboundSchema, GitHubPullRequestRequest$outboundSchema;
67717
67834
  var init_githubpullrequestrequest = __esm(() => {
67718
67835
  init_esm();
67836
+ init_primitives();
67719
67837
  GitHubPullRequestRequest$inboundSchema = objectType({
67720
67838
  branch: stringType(),
67721
67839
  title: stringType(),
67722
67840
  body: stringType().default(""),
67723
67841
  base: nullableType(stringType()).optional(),
67724
- draft: booleanType().default(false)
67842
+ draft: booleanType().default(false),
67843
+ checkout_path: stringType().default("")
67844
+ }).transform((v2) => {
67845
+ return remap(v2, {
67846
+ checkout_path: "checkoutPath"
67847
+ });
67725
67848
  });
67726
67849
  GitHubPullRequestRequest$outboundSchema = objectType({
67727
67850
  branch: stringType(),
67728
67851
  title: stringType(),
67729
67852
  body: stringType().default(""),
67730
67853
  base: nullableType(stringType()).optional(),
67731
- draft: booleanType().default(false)
67854
+ draft: booleanType().default(false),
67855
+ checkoutPath: stringType().default("")
67856
+ }).transform((v2) => {
67857
+ return remap(v2, {
67858
+ checkoutPath: "checkout_path"
67859
+ });
67732
67860
  });
67733
67861
  });
67734
67862
 
@@ -69211,12 +69339,13 @@ var init_skillreference = __esm(() => {
69211
69339
  var SkillEntry$inboundSchema, SkillEntry$outboundSchema;
69212
69340
  var init_skillentry = __esm(() => {
69213
69341
  init_esm();
69342
+ init_discriminatedUnion();
69214
69343
  init_preconfiguredskillreference();
69215
69344
  init_skillreference();
69216
- SkillEntry$inboundSchema = unionType([
69217
- SkillReference$inboundSchema,
69218
- PreconfiguredSkillReference$inboundSchema
69219
- ]);
69345
+ SkillEntry$inboundSchema = discriminatedUnion2("type", {
69346
+ skill_reference: SkillReference$inboundSchema,
69347
+ preconfigured: PreconfiguredSkillReference$inboundSchema
69348
+ });
69220
69349
  SkillEntry$outboundSchema = unionType([
69221
69350
  SkillReference$outboundSchema,
69222
69351
  PreconfiguredSkillReference$outboundSchema
@@ -69295,12 +69424,13 @@ var init_shellenvironmentcontainerreference = __esm(() => {
69295
69424
  var ShellEnvironment$inboundSchema, ShellEnvironment$outboundSchema;
69296
69425
  var init_shellenvironment = __esm(() => {
69297
69426
  init_esm();
69427
+ init_discriminatedUnion();
69298
69428
  init_shellenvironmentcontainerauto();
69299
69429
  init_shellenvironmentcontainerreference();
69300
- ShellEnvironment$inboundSchema = unionType([
69301
- ShellEnvironmentContainerAuto$inboundSchema,
69302
- ShellEnvironmentContainerReference$inboundSchema
69303
- ]);
69430
+ ShellEnvironment$inboundSchema = discriminatedUnion2("type", {
69431
+ container_auto: ShellEnvironmentContainerAuto$inboundSchema,
69432
+ container_reference: ShellEnvironmentContainerReference$inboundSchema
69433
+ });
69304
69434
  ShellEnvironment$outboundSchema = unionType([
69305
69435
  ShellEnvironmentContainerAuto$outboundSchema,
69306
69436
  ShellEnvironmentContainerReference$outboundSchema
@@ -69375,14 +69505,15 @@ var init_textresponseformat = __esm(() => {
69375
69505
  var ResponseFormat$inboundSchema, ResponseFormat$outboundSchema;
69376
69506
  var init_responseformat = __esm(() => {
69377
69507
  init_esm();
69508
+ init_discriminatedUnion();
69378
69509
  init_jsonobjectresponseformat();
69379
69510
  init_jsonschemaresponseformat();
69380
69511
  init_textresponseformat();
69381
- ResponseFormat$inboundSchema = unionType([
69382
- TextResponseFormat$inboundSchema,
69383
- JSONSchemaResponseFormat$inboundSchema,
69384
- JSONObjectResponseFormat$inboundSchema
69385
- ]);
69512
+ ResponseFormat$inboundSchema = discriminatedUnion2("type", {
69513
+ text: TextResponseFormat$inboundSchema,
69514
+ json_schema: JSONSchemaResponseFormat$inboundSchema,
69515
+ json_object: JSONObjectResponseFormat$inboundSchema
69516
+ });
69386
69517
  ResponseFormat$outboundSchema = unionType([
69387
69518
  TextResponseFormat$outboundSchema,
69388
69519
  JSONSchemaResponseFormat$outboundSchema,
@@ -70517,6 +70648,7 @@ var OpenAIChatCompletionChoice2Format, OpenAIChatCompletionChoice2Detail, One, O
70517
70648
  var init_openaichatcompletionchoice = __esm(() => {
70518
70649
  init_esm();
70519
70650
  init_primitives();
70651
+ init_discriminatedUnion();
70520
70652
  OpenAIChatCompletionChoice2Format = {
70521
70653
  Wav: "wav",
70522
70654
  Mp3: "mp3"
@@ -70646,12 +70778,12 @@ var init_openaichatcompletionchoice = __esm(() => {
70646
70778
  type: literalType("text"),
70647
70779
  text: stringType()
70648
70780
  });
70649
- Content2$inboundSchema = unionType([
70650
- lazyType(() => OpenAIChatCompletionChoice21$inboundSchema),
70651
- lazyType(() => OpenAIChatCompletionChoice22$inboundSchema),
70652
- lazyType(() => OpenAIChatCompletionChoice23$inboundSchema),
70653
- lazyType(() => OpenAIChatCompletionChoice24$inboundSchema)
70654
- ]);
70781
+ Content2$inboundSchema = discriminatedUnion2("type", {
70782
+ text: lazyType(() => OpenAIChatCompletionChoice21$inboundSchema),
70783
+ image_url: lazyType(() => OpenAIChatCompletionChoice22$inboundSchema),
70784
+ input_audio: lazyType(() => OpenAIChatCompletionChoice23$inboundSchema),
70785
+ file: lazyType(() => OpenAIChatCompletionChoice24$inboundSchema)
70786
+ });
70655
70787
  Content2$outboundSchema = unionType([
70656
70788
  lazyType(() => OpenAIChatCompletionChoice21$outboundSchema),
70657
70789
  lazyType(() => OpenAIChatCompletionChoice22$outboundSchema),
@@ -70660,12 +70792,12 @@ var init_openaichatcompletionchoice = __esm(() => {
70660
70792
  ]);
70661
70793
  OpenAIChatCompletionChoiceContent$inboundSchema = unionType([
70662
70794
  stringType(),
70663
- arrayType(unionType([
70664
- lazyType(() => OpenAIChatCompletionChoice21$inboundSchema),
70665
- lazyType(() => OpenAIChatCompletionChoice22$inboundSchema),
70666
- lazyType(() => OpenAIChatCompletionChoice23$inboundSchema),
70667
- lazyType(() => OpenAIChatCompletionChoice24$inboundSchema)
70668
- ]))
70795
+ arrayType(discriminatedUnion2("type", {
70796
+ text: lazyType(() => OpenAIChatCompletionChoice21$inboundSchema),
70797
+ image_url: lazyType(() => OpenAIChatCompletionChoice22$inboundSchema),
70798
+ input_audio: lazyType(() => OpenAIChatCompletionChoice23$inboundSchema),
70799
+ file: lazyType(() => OpenAIChatCompletionChoice24$inboundSchema)
70800
+ }))
70669
70801
  ]);
70670
70802
  OpenAIChatCompletionChoiceContent$outboundSchema = unionType([
70671
70803
  stringType(),
@@ -70700,12 +70832,12 @@ var init_openaichatcompletionchoice = __esm(() => {
70700
70832
  tool_call_id: stringType().optional(),
70701
70833
  content: nullableType(unionType([
70702
70834
  stringType(),
70703
- arrayType(unionType([
70704
- lazyType(() => OpenAIChatCompletionChoice21$inboundSchema),
70705
- lazyType(() => OpenAIChatCompletionChoice22$inboundSchema),
70706
- lazyType(() => OpenAIChatCompletionChoice23$inboundSchema),
70707
- lazyType(() => OpenAIChatCompletionChoice24$inboundSchema)
70708
- ]))
70835
+ arrayType(discriminatedUnion2("type", {
70836
+ text: lazyType(() => OpenAIChatCompletionChoice21$inboundSchema),
70837
+ image_url: lazyType(() => OpenAIChatCompletionChoice22$inboundSchema),
70838
+ input_audio: lazyType(() => OpenAIChatCompletionChoice23$inboundSchema),
70839
+ file: lazyType(() => OpenAIChatCompletionChoice24$inboundSchema)
70840
+ }))
70709
70841
  ])),
70710
70842
  reasoning: nullableType(stringType()).optional(),
70711
70843
  tool_calls: arrayType(lazyType(() => OpenAIChatCompletionChoiceToolCalls$inboundSchema)).optional()
@@ -70920,6 +71052,7 @@ var OpenAIChatCompletionChunk2Format, OpenAIChatCompletionChunk2Detail, FinishRe
70920
71052
  var init_openaichatcompletionchunk = __esm(() => {
70921
71053
  init_esm();
70922
71054
  init_primitives();
71055
+ init_discriminatedUnion();
70923
71056
  init_openaichatcompletionusage();
70924
71057
  OpenAIChatCompletionChunk2Format = {
70925
71058
  Wav: "wav",
@@ -71050,12 +71183,12 @@ var init_openaichatcompletionchunk = __esm(() => {
71050
71183
  type: literalType("text"),
71051
71184
  text: stringType()
71052
71185
  });
71053
- OpenAIChatCompletionChunkContent2$inboundSchema = unionType([
71054
- lazyType(() => OpenAIChatCompletionChunk21$inboundSchema),
71055
- lazyType(() => OpenAIChatCompletionChunk22$inboundSchema),
71056
- lazyType(() => OpenAIChatCompletionChunk23$inboundSchema),
71057
- lazyType(() => OpenAIChatCompletionChunk24$inboundSchema)
71058
- ]);
71186
+ OpenAIChatCompletionChunkContent2$inboundSchema = discriminatedUnion2("type", {
71187
+ text: lazyType(() => OpenAIChatCompletionChunk21$inboundSchema),
71188
+ image_url: lazyType(() => OpenAIChatCompletionChunk22$inboundSchema),
71189
+ input_audio: lazyType(() => OpenAIChatCompletionChunk23$inboundSchema),
71190
+ file: lazyType(() => OpenAIChatCompletionChunk24$inboundSchema)
71191
+ });
71059
71192
  OpenAIChatCompletionChunkContent2$outboundSchema = unionType([
71060
71193
  lazyType(() => OpenAIChatCompletionChunk21$outboundSchema),
71061
71194
  lazyType(() => OpenAIChatCompletionChunk22$outboundSchema),
@@ -71064,12 +71197,12 @@ var init_openaichatcompletionchunk = __esm(() => {
71064
71197
  ]);
71065
71198
  OpenAIChatCompletionChunkContent$inboundSchema = unionType([
71066
71199
  stringType(),
71067
- arrayType(unionType([
71068
- lazyType(() => OpenAIChatCompletionChunk21$inboundSchema),
71069
- lazyType(() => OpenAIChatCompletionChunk22$inboundSchema),
71070
- lazyType(() => OpenAIChatCompletionChunk23$inboundSchema),
71071
- lazyType(() => OpenAIChatCompletionChunk24$inboundSchema)
71072
- ]))
71200
+ arrayType(discriminatedUnion2("type", {
71201
+ text: lazyType(() => OpenAIChatCompletionChunk21$inboundSchema),
71202
+ image_url: lazyType(() => OpenAIChatCompletionChunk22$inboundSchema),
71203
+ input_audio: lazyType(() => OpenAIChatCompletionChunk23$inboundSchema),
71204
+ file: lazyType(() => OpenAIChatCompletionChunk24$inboundSchema)
71205
+ }))
71073
71206
  ]);
71074
71207
  OpenAIChatCompletionChunkContent$outboundSchema = unionType([
71075
71208
  stringType(),
@@ -71104,12 +71237,12 @@ var init_openaichatcompletionchunk = __esm(() => {
71104
71237
  role: literalType("assistant").optional(),
71105
71238
  content: nullableType(unionType([
71106
71239
  stringType(),
71107
- arrayType(unionType([
71108
- lazyType(() => OpenAIChatCompletionChunk21$inboundSchema),
71109
- lazyType(() => OpenAIChatCompletionChunk22$inboundSchema),
71110
- lazyType(() => OpenAIChatCompletionChunk23$inboundSchema),
71111
- lazyType(() => OpenAIChatCompletionChunk24$inboundSchema)
71112
- ]))
71240
+ arrayType(discriminatedUnion2("type", {
71241
+ text: lazyType(() => OpenAIChatCompletionChunk21$inboundSchema),
71242
+ image_url: lazyType(() => OpenAIChatCompletionChunk22$inboundSchema),
71243
+ input_audio: lazyType(() => OpenAIChatCompletionChunk23$inboundSchema),
71244
+ file: lazyType(() => OpenAIChatCompletionChunk24$inboundSchema)
71245
+ }))
71113
71246
  ])).optional(),
71114
71247
  reasoning: nullableType(stringType()).optional(),
71115
71248
  tool_calls: arrayType(lazyType(() => OpenAIChatCompletionChunkToolCalls$inboundSchema)).optional()
@@ -71665,6 +71798,7 @@ var OutputMessageWithIdStatus, OutputMessageWithIdPhase, OutputMessageWithIdCont
71665
71798
  var init_outputmessagewithid = __esm(() => {
71666
71799
  init_esm();
71667
71800
  init_primitives();
71801
+ init_discriminatedUnion();
71668
71802
  init_outputtext();
71669
71803
  init_refusal();
71670
71804
  OutputMessageWithIdStatus = {
@@ -71676,10 +71810,10 @@ var init_outputmessagewithid = __esm(() => {
71676
71810
  Commentary: "commentary",
71677
71811
  FinalAnswer: "final_answer"
71678
71812
  };
71679
- OutputMessageWithIdContent$inboundSchema = unionType([
71680
- OutputText$inboundSchema.and(objectType({ type: literalType("output_text") })),
71681
- Refusal$inboundSchema.and(objectType({ type: literalType("refusal") }))
71682
- ]);
71813
+ OutputMessageWithIdContent$inboundSchema = discriminatedUnion2("type", {
71814
+ output_text: OutputText$inboundSchema.and(objectType({ type: literalType("output_text") })),
71815
+ refusal: Refusal$inboundSchema.and(objectType({ type: literalType("refusal") }))
71816
+ });
71683
71817
  OutputMessageWithIdContent$outboundSchema = unionType([
71684
71818
  OutputText$outboundSchema.and(objectType({ type: literalType("output_text") })),
71685
71819
  Refusal$outboundSchema.and(objectType({ type: literalType("refusal") }))
@@ -71692,10 +71826,10 @@ var init_outputmessagewithid = __esm(() => {
71692
71826
  type: literalType("message"),
71693
71827
  id: stringType(),
71694
71828
  role: literalType("assistant"),
71695
- content: arrayType(unionType([
71696
- OutputText$inboundSchema.and(objectType({ type: literalType("output_text") })),
71697
- Refusal$inboundSchema.and(objectType({ type: literalType("refusal") }))
71698
- ])),
71829
+ content: arrayType(discriminatedUnion2("type", {
71830
+ output_text: OutputText$inboundSchema.and(objectType({ type: literalType("output_text") })),
71831
+ refusal: Refusal$inboundSchema.and(objectType({ type: literalType("refusal") }))
71832
+ })),
71699
71833
  status: OutputMessageWithIdStatus$inboundSchema,
71700
71834
  phase: OutputMessageWithIdPhase$inboundSchema.optional(),
71701
71835
  response_id: nullableType(stringType()).optional(),
@@ -72071,6 +72205,7 @@ var ResponseObjectServiceTier, FiltersType, ResponseObjectFiltersType, ResponseO
72071
72205
  var init_responseobject = __esm(() => {
72072
72206
  init_esm();
72073
72207
  init_primitives();
72208
+ init_discriminatedUnion();
72074
72209
  init_codeinterpretertooldefinition();
72075
72210
  init_compactioncontextmanagement();
72076
72211
  init_comparisonfilter();
@@ -72130,16 +72265,16 @@ var init_responseobject = __esm(() => {
72130
72265
  type: ResponseObjectFiltersType$outboundSchema,
72131
72266
  filters: arrayType(nullableType(anyType()))
72132
72267
  });
72133
- FiltersFilters$inboundSchema = unionType([
72134
- ComparisonFilter$inboundSchema.and(objectType({ type: literalType("eq") })),
72135
- ComparisonFilter$inboundSchema.and(objectType({ type: literalType("ne") })),
72136
- ComparisonFilter$inboundSchema.and(objectType({ type: literalType("gt") })),
72137
- ComparisonFilter$inboundSchema.and(objectType({ type: literalType("gte") })),
72138
- ComparisonFilter$inboundSchema.and(objectType({ type: literalType("lt") })),
72139
- ComparisonFilter$inboundSchema.and(objectType({ type: literalType("lte") })),
72140
- lazyType(() => ResponseObjectFilters2$inboundSchema).and(objectType({ type: literalType("and") })),
72141
- lazyType(() => ResponseObjectFilters2$inboundSchema).and(objectType({ type: literalType("or") }))
72142
- ]);
72268
+ FiltersFilters$inboundSchema = discriminatedUnion2("type", {
72269
+ eq: ComparisonFilter$inboundSchema.and(objectType({ type: literalType("eq") })),
72270
+ ne: ComparisonFilter$inboundSchema.and(objectType({ type: literalType("ne") })),
72271
+ gt: ComparisonFilter$inboundSchema.and(objectType({ type: literalType("gt") })),
72272
+ gte: ComparisonFilter$inboundSchema.and(objectType({ type: literalType("gte") })),
72273
+ lt: ComparisonFilter$inboundSchema.and(objectType({ type: literalType("lt") })),
72274
+ lte: ComparisonFilter$inboundSchema.and(objectType({ type: literalType("lte") })),
72275
+ and: lazyType(() => ResponseObjectFilters2$inboundSchema).and(objectType({ type: literalType("and") })),
72276
+ or: lazyType(() => ResponseObjectFilters2$inboundSchema).and(objectType({ type: literalType("or") }))
72277
+ });
72143
72278
  FiltersFilters$outboundSchema = unionType([
72144
72279
  ComparisonFilter$outboundSchema.and(objectType({ type: literalType("eq") })),
72145
72280
  ComparisonFilter$outboundSchema.and(objectType({ type: literalType("ne") })),
@@ -72152,16 +72287,16 @@ var init_responseobject = __esm(() => {
72152
72287
  ]);
72153
72288
  Filters2$inboundSchema = objectType({
72154
72289
  type: FiltersType$inboundSchema,
72155
- filters: arrayType(unionType([
72156
- ComparisonFilter$inboundSchema.and(objectType({ type: literalType("eq") })),
72157
- ComparisonFilter$inboundSchema.and(objectType({ type: literalType("ne") })),
72158
- ComparisonFilter$inboundSchema.and(objectType({ type: literalType("gt") })),
72159
- ComparisonFilter$inboundSchema.and(objectType({ type: literalType("gte") })),
72160
- ComparisonFilter$inboundSchema.and(objectType({ type: literalType("lt") })),
72161
- ComparisonFilter$inboundSchema.and(objectType({ type: literalType("lte") })),
72162
- lazyType(() => ResponseObjectFilters2$inboundSchema).and(objectType({ type: literalType("and") })),
72163
- lazyType(() => ResponseObjectFilters2$inboundSchema).and(objectType({ type: literalType("or") }))
72164
- ]))
72290
+ filters: arrayType(discriminatedUnion2("type", {
72291
+ eq: ComparisonFilter$inboundSchema.and(objectType({ type: literalType("eq") })),
72292
+ ne: ComparisonFilter$inboundSchema.and(objectType({ type: literalType("ne") })),
72293
+ gt: ComparisonFilter$inboundSchema.and(objectType({ type: literalType("gt") })),
72294
+ gte: ComparisonFilter$inboundSchema.and(objectType({ type: literalType("gte") })),
72295
+ lt: ComparisonFilter$inboundSchema.and(objectType({ type: literalType("lt") })),
72296
+ lte: ComparisonFilter$inboundSchema.and(objectType({ type: literalType("lte") })),
72297
+ and: lazyType(() => ResponseObjectFilters2$inboundSchema).and(objectType({ type: literalType("and") })),
72298
+ or: lazyType(() => ResponseObjectFilters2$inboundSchema).and(objectType({ type: literalType("or") }))
72299
+ }))
72165
72300
  });
72166
72301
  Filters2$outboundSchema = objectType({
72167
72302
  type: FiltersType$outboundSchema,
@@ -72176,16 +72311,16 @@ var init_responseobject = __esm(() => {
72176
72311
  lazyType(() => ResponseObjectFilters2$outboundSchema).and(objectType({ type: literalType("or") }))
72177
72312
  ]))
72178
72313
  });
72179
- ToolsFilters$inboundSchema = unionType([
72180
- ComparisonFilter$inboundSchema.and(objectType({ type: literalType("eq") })),
72181
- ComparisonFilter$inboundSchema.and(objectType({ type: literalType("ne") })),
72182
- ComparisonFilter$inboundSchema.and(objectType({ type: literalType("gt") })),
72183
- ComparisonFilter$inboundSchema.and(objectType({ type: literalType("gte") })),
72184
- ComparisonFilter$inboundSchema.and(objectType({ type: literalType("lt") })),
72185
- ComparisonFilter$inboundSchema.and(objectType({ type: literalType("lte") })),
72186
- lazyType(() => Filters2$inboundSchema).and(objectType({ type: literalType("and") })),
72187
- lazyType(() => Filters2$inboundSchema).and(objectType({ type: literalType("or") }))
72188
- ]);
72314
+ ToolsFilters$inboundSchema = discriminatedUnion2("type", {
72315
+ eq: ComparisonFilter$inboundSchema.and(objectType({ type: literalType("eq") })),
72316
+ ne: ComparisonFilter$inboundSchema.and(objectType({ type: literalType("ne") })),
72317
+ gt: ComparisonFilter$inboundSchema.and(objectType({ type: literalType("gt") })),
72318
+ gte: ComparisonFilter$inboundSchema.and(objectType({ type: literalType("gte") })),
72319
+ lt: ComparisonFilter$inboundSchema.and(objectType({ type: literalType("lt") })),
72320
+ lte: ComparisonFilter$inboundSchema.and(objectType({ type: literalType("lte") })),
72321
+ and: lazyType(() => Filters2$inboundSchema).and(objectType({ type: literalType("and") })),
72322
+ or: lazyType(() => Filters2$inboundSchema).and(objectType({ type: literalType("or") }))
72323
+ });
72189
72324
  ToolsFilters$outboundSchema = unionType([
72190
72325
  ComparisonFilter$outboundSchema.and(objectType({ type: literalType("eq") })),
72191
72326
  ComparisonFilter$outboundSchema.and(objectType({ type: literalType("ne") })),
@@ -72199,16 +72334,16 @@ var init_responseobject = __esm(() => {
72199
72334
  ToolsFileSearchToolDefinition$inboundSchema = objectType({
72200
72335
  type: literalType("file_search"),
72201
72336
  vector_store_ids: arrayType(stringType()),
72202
- filters: unionType([
72203
- ComparisonFilter$inboundSchema.and(objectType({ type: literalType("eq") })),
72204
- ComparisonFilter$inboundSchema.and(objectType({ type: literalType("ne") })),
72205
- ComparisonFilter$inboundSchema.and(objectType({ type: literalType("gt") })),
72206
- ComparisonFilter$inboundSchema.and(objectType({ type: literalType("gte") })),
72207
- ComparisonFilter$inboundSchema.and(objectType({ type: literalType("lt") })),
72208
- ComparisonFilter$inboundSchema.and(objectType({ type: literalType("lte") })),
72209
- lazyType(() => Filters2$inboundSchema).and(objectType({ type: literalType("and") })),
72210
- lazyType(() => Filters2$inboundSchema).and(objectType({ type: literalType("or") }))
72211
- ]).optional(),
72337
+ filters: discriminatedUnion2("type", {
72338
+ eq: ComparisonFilter$inboundSchema.and(objectType({ type: literalType("eq") })),
72339
+ ne: ComparisonFilter$inboundSchema.and(objectType({ type: literalType("ne") })),
72340
+ gt: ComparisonFilter$inboundSchema.and(objectType({ type: literalType("gt") })),
72341
+ gte: ComparisonFilter$inboundSchema.and(objectType({ type: literalType("gte") })),
72342
+ lt: ComparisonFilter$inboundSchema.and(objectType({ type: literalType("lt") })),
72343
+ lte: ComparisonFilter$inboundSchema.and(objectType({ type: literalType("lte") })),
72344
+ and: lazyType(() => Filters2$inboundSchema).and(objectType({ type: literalType("and") })),
72345
+ or: lazyType(() => Filters2$inboundSchema).and(objectType({ type: literalType("or") }))
72346
+ }).optional(),
72212
72347
  max_num_results: numberType().int().optional(),
72213
72348
  ranking_options: RankingOptions$inboundSchema.optional()
72214
72349
  }).transform((v2) => {
@@ -72675,14 +72810,15 @@ var Part$inboundSchema, Part$outboundSchema, ResponseContentPartAddedEvent$inbou
72675
72810
  var init_responsecontentpartaddedevent = __esm(() => {
72676
72811
  init_esm();
72677
72812
  init_primitives();
72813
+ init_discriminatedUnion();
72678
72814
  init_outputtext();
72679
72815
  init_reasoningtext();
72680
72816
  init_refusal();
72681
- Part$inboundSchema = unionType([
72682
- OutputText$inboundSchema.and(objectType({ type: literalType("output_text") })),
72683
- Refusal$inboundSchema.and(objectType({ type: literalType("refusal") })),
72684
- ReasoningText$inboundSchema.and(objectType({ type: literalType("reasoning_text") }))
72685
- ]);
72817
+ Part$inboundSchema = discriminatedUnion2("type", {
72818
+ output_text: OutputText$inboundSchema.and(objectType({ type: literalType("output_text") })),
72819
+ refusal: Refusal$inboundSchema.and(objectType({ type: literalType("refusal") })),
72820
+ reasoning_text: ReasoningText$inboundSchema.and(objectType({ type: literalType("reasoning_text") }))
72821
+ });
72686
72822
  Part$outboundSchema = unionType([
72687
72823
  OutputText$outboundSchema.and(objectType({ type: literalType("output_text") })),
72688
72824
  Refusal$outboundSchema.and(objectType({ type: literalType("refusal") })),
@@ -72694,11 +72830,11 @@ var init_responsecontentpartaddedevent = __esm(() => {
72694
72830
  item_id: stringType(),
72695
72831
  output_index: numberType().int(),
72696
72832
  content_index: numberType().int(),
72697
- part: unionType([
72698
- OutputText$inboundSchema.and(objectType({ type: literalType("output_text") })),
72699
- Refusal$inboundSchema.and(objectType({ type: literalType("refusal") })),
72700
- ReasoningText$inboundSchema.and(objectType({ type: literalType("reasoning_text") }))
72701
- ])
72833
+ part: discriminatedUnion2("type", {
72834
+ output_text: OutputText$inboundSchema.and(objectType({ type: literalType("output_text") })),
72835
+ refusal: Refusal$inboundSchema.and(objectType({ type: literalType("refusal") })),
72836
+ reasoning_text: ReasoningText$inboundSchema.and(objectType({ type: literalType("reasoning_text") }))
72837
+ })
72702
72838
  }).transform((v2) => {
72703
72839
  return remap(v2, {
72704
72840
  sequence_number: "sequenceNumber",
@@ -72733,14 +72869,15 @@ var ResponseContentPartDoneEventPart$inboundSchema, ResponseContentPartDoneEvent
72733
72869
  var init_responsecontentpartdoneevent = __esm(() => {
72734
72870
  init_esm();
72735
72871
  init_primitives();
72872
+ init_discriminatedUnion();
72736
72873
  init_outputtext();
72737
72874
  init_reasoningtext();
72738
72875
  init_refusal();
72739
- ResponseContentPartDoneEventPart$inboundSchema = unionType([
72740
- OutputText$inboundSchema.and(objectType({ type: literalType("output_text") })),
72741
- Refusal$inboundSchema.and(objectType({ type: literalType("refusal") })),
72742
- ReasoningText$inboundSchema.and(objectType({ type: literalType("reasoning_text") }))
72743
- ]);
72876
+ ResponseContentPartDoneEventPart$inboundSchema = discriminatedUnion2("type", {
72877
+ output_text: OutputText$inboundSchema.and(objectType({ type: literalType("output_text") })),
72878
+ refusal: Refusal$inboundSchema.and(objectType({ type: literalType("refusal") })),
72879
+ reasoning_text: ReasoningText$inboundSchema.and(objectType({ type: literalType("reasoning_text") }))
72880
+ });
72744
72881
  ResponseContentPartDoneEventPart$outboundSchema = unionType([
72745
72882
  OutputText$outboundSchema.and(objectType({ type: literalType("output_text") })),
72746
72883
  Refusal$outboundSchema.and(objectType({ type: literalType("refusal") })),
@@ -72752,11 +72889,11 @@ var init_responsecontentpartdoneevent = __esm(() => {
72752
72889
  item_id: stringType(),
72753
72890
  output_index: numberType().int(),
72754
72891
  content_index: numberType().int(),
72755
- part: unionType([
72756
- OutputText$inboundSchema.and(objectType({ type: literalType("output_text") })),
72757
- Refusal$inboundSchema.and(objectType({ type: literalType("refusal") })),
72758
- ReasoningText$inboundSchema.and(objectType({ type: literalType("reasoning_text") }))
72759
- ])
72892
+ part: discriminatedUnion2("type", {
72893
+ output_text: OutputText$inboundSchema.and(objectType({ type: literalType("output_text") })),
72894
+ refusal: Refusal$inboundSchema.and(objectType({ type: literalType("refusal") })),
72895
+ reasoning_text: ReasoningText$inboundSchema.and(objectType({ type: literalType("reasoning_text") }))
72896
+ })
72760
72897
  }).transform((v2) => {
72761
72898
  return remap(v2, {
72762
72899
  sequence_number: "sequenceNumber",
@@ -75138,6 +75275,7 @@ var init_responsewebsearchcallsearchingevent = __esm(() => {
75138
75275
  var ResponseStreamingEvent$inboundSchema, ResponseStreamingEvent$outboundSchema;
75139
75276
  var init_responsestreamingevent = __esm(() => {
75140
75277
  init_esm();
75278
+ init_discriminatedUnion();
75141
75279
  init_errorevent();
75142
75280
  init_responsecancelledevent();
75143
75281
  init_responsecodeinterpretercallcodedeltaevent();
@@ -75203,73 +75341,73 @@ var init_responsestreamingevent = __esm(() => {
75203
75341
  init_responsewebsearchcallcompletedevent();
75204
75342
  init_responsewebsearchcallinprogressevent();
75205
75343
  init_responsewebsearchcallsearchingevent();
75206
- ResponseStreamingEvent$inboundSchema = unionType([
75207
- ResponseCreatedEvent$inboundSchema,
75208
- ResponseInProgressEvent$inboundSchema,
75209
- ResponseCompletedEvent$inboundSchema,
75210
- ResponseFailedEvent$inboundSchema,
75211
- ResponseIncompleteEvent$inboundSchema,
75212
- ResponseQueuedEvent$inboundSchema,
75213
- ResponseCancelledEvent$inboundSchema,
75214
- ResponseOutputItemAddedEvent$inboundSchema,
75215
- ResponseOutputItemDoneEvent$inboundSchema,
75216
- ResponseContentPartAddedEvent$inboundSchema,
75217
- ResponseContentPartDoneEvent$inboundSchema,
75218
- ResponseOutputTextDeltaEvent$inboundSchema,
75219
- ResponseOutputTextDoneEvent$inboundSchema,
75220
- ResponseRefusalDeltaEvent$inboundSchema,
75221
- ResponseRefusalDoneEvent$inboundSchema,
75222
- ResponseFunctionCallArgumentsDeltaEvent$inboundSchema,
75223
- ResponseFunctionCallArgumentsDoneEvent$inboundSchema,
75224
- ResponseFileSearchCallInProgressEvent$inboundSchema,
75225
- ResponseFileSearchCallSearchingEvent$inboundSchema,
75226
- ResponseFileSearchCallCompletedEvent$inboundSchema,
75227
- ResponseWebSearchCallInProgressEvent$inboundSchema,
75228
- ResponseWebSearchCallSearchingEvent$inboundSchema,
75229
- ResponseWebSearchCallCompletedEvent$inboundSchema,
75230
- ResponseHistoryCallInProgressEvent$inboundSchema,
75231
- ResponseHistoryCallSearchingEvent$inboundSchema,
75232
- ResponseHistoryCallCompletedEvent$inboundSchema,
75233
- ResponseSleepCallInProgressEvent$inboundSchema,
75234
- ResponseSleepCallSleepingEvent$inboundSchema,
75235
- ResponseSleepCallCompletedEvent$inboundSchema,
75236
- ResponseToolSearchCallInProgressEvent$inboundSchema,
75237
- ResponseToolSearchCallSearchingEvent$inboundSchema,
75238
- ResponseToolSearchCallCompletedEvent$inboundSchema,
75239
- ResponseReasoningSummaryPartAddedEvent$inboundSchema,
75240
- ResponseReasoningSummaryPartDoneEvent$inboundSchema,
75241
- ResponseReasoningSummaryTextDeltaEvent$inboundSchema,
75242
- ResponseReasoningSummaryTextDoneEvent$inboundSchema,
75243
- ResponseReasoningTextDeltaEvent$inboundSchema,
75244
- ResponseReasoningTextDoneEvent$inboundSchema,
75245
- ResponseImageGenerationCallInProgressEvent$inboundSchema,
75246
- ResponseImageGenerationCallGeneratingEvent$inboundSchema,
75247
- ResponseImageGenerationCallCompletedEvent$inboundSchema,
75248
- ResponseImageGenerationCallPartialImageEvent$inboundSchema,
75249
- ResponseMCPCallArgumentsDeltaEvent$inboundSchema,
75250
- ResponseMCPCallArgumentsDoneEvent$inboundSchema,
75251
- ResponseMCPCallInProgressEvent$inboundSchema,
75252
- ResponseMCPCallCompletedEvent$inboundSchema,
75253
- ResponseMCPCallFailedEvent$inboundSchema,
75254
- ResponseMCPListToolsInProgressEvent$inboundSchema,
75255
- ResponseMCPListToolsCompletedEvent$inboundSchema,
75256
- ResponseMCPListToolsFailedEvent$inboundSchema,
75257
- ResponseReadFileCallInProgressEvent$inboundSchema,
75258
- ResponseReadFileCallReadingEvent$inboundSchema,
75259
- ResponseReadFileCallCompletedEvent$inboundSchema,
75260
- ResponseCodeInterpreterCallInProgressEvent$inboundSchema,
75261
- ResponseCodeInterpreterCallInterpretingEvent$inboundSchema,
75262
- ResponseCodeInterpreterCallCompletedEvent$inboundSchema,
75263
- ResponseCodeInterpreterCallCodeDeltaEvent$inboundSchema,
75264
- ResponseCodeInterpreterCallCodeDoneEvent$inboundSchema,
75265
- ResponseShellCallInProgressEvent$inboundSchema,
75266
- ResponseShellCallExecutingEvent$inboundSchema,
75267
- ResponseShellCallCompletedEvent$inboundSchema,
75268
- ResponseCustomToolCallInputDeltaEvent$inboundSchema,
75269
- ResponseCustomToolCallInputDoneEvent$inboundSchema,
75270
- ResponseOutputTextAnnotationAddedEvent$inboundSchema,
75271
- ErrorEvent$inboundSchema
75272
- ]);
75344
+ ResponseStreamingEvent$inboundSchema = discriminatedUnion2("type", {
75345
+ ["response.created"]: ResponseCreatedEvent$inboundSchema,
75346
+ ["response.in_progress"]: ResponseInProgressEvent$inboundSchema,
75347
+ ["response.completed"]: ResponseCompletedEvent$inboundSchema,
75348
+ ["response.failed"]: ResponseFailedEvent$inboundSchema,
75349
+ ["response.incomplete"]: ResponseIncompleteEvent$inboundSchema,
75350
+ ["response.queued"]: ResponseQueuedEvent$inboundSchema,
75351
+ ["response.cancelled"]: ResponseCancelledEvent$inboundSchema,
75352
+ ["response.output_item.added"]: ResponseOutputItemAddedEvent$inboundSchema,
75353
+ ["response.output_item.done"]: ResponseOutputItemDoneEvent$inboundSchema,
75354
+ ["response.content_part.added"]: ResponseContentPartAddedEvent$inboundSchema,
75355
+ ["response.content_part.done"]: ResponseContentPartDoneEvent$inboundSchema,
75356
+ ["response.output_text.delta"]: ResponseOutputTextDeltaEvent$inboundSchema,
75357
+ ["response.output_text.done"]: ResponseOutputTextDoneEvent$inboundSchema,
75358
+ ["response.refusal.delta"]: ResponseRefusalDeltaEvent$inboundSchema,
75359
+ ["response.refusal.done"]: ResponseRefusalDoneEvent$inboundSchema,
75360
+ ["response.function_call_arguments.delta"]: ResponseFunctionCallArgumentsDeltaEvent$inboundSchema,
75361
+ ["response.function_call_arguments.done"]: ResponseFunctionCallArgumentsDoneEvent$inboundSchema,
75362
+ ["response.file_search_call.in_progress"]: ResponseFileSearchCallInProgressEvent$inboundSchema,
75363
+ ["response.file_search_call.searching"]: ResponseFileSearchCallSearchingEvent$inboundSchema,
75364
+ ["response.file_search_call.completed"]: ResponseFileSearchCallCompletedEvent$inboundSchema,
75365
+ ["response.web_search_call.in_progress"]: ResponseWebSearchCallInProgressEvent$inboundSchema,
75366
+ ["response.web_search_call.searching"]: ResponseWebSearchCallSearchingEvent$inboundSchema,
75367
+ ["response.web_search_call.completed"]: ResponseWebSearchCallCompletedEvent$inboundSchema,
75368
+ ["response.history_call.in_progress"]: ResponseHistoryCallInProgressEvent$inboundSchema,
75369
+ ["response.history_call.searching"]: ResponseHistoryCallSearchingEvent$inboundSchema,
75370
+ ["response.history_call.completed"]: ResponseHistoryCallCompletedEvent$inboundSchema,
75371
+ ["response.sleep_call.in_progress"]: ResponseSleepCallInProgressEvent$inboundSchema,
75372
+ ["response.sleep_call.sleeping"]: ResponseSleepCallSleepingEvent$inboundSchema,
75373
+ ["response.sleep_call.completed"]: ResponseSleepCallCompletedEvent$inboundSchema,
75374
+ ["response.tool_search_call.in_progress"]: ResponseToolSearchCallInProgressEvent$inboundSchema,
75375
+ ["response.tool_search_call.searching"]: ResponseToolSearchCallSearchingEvent$inboundSchema,
75376
+ ["response.tool_search_call.completed"]: ResponseToolSearchCallCompletedEvent$inboundSchema,
75377
+ ["response.reasoning_summary_part.added"]: ResponseReasoningSummaryPartAddedEvent$inboundSchema,
75378
+ ["response.reasoning_summary_part.done"]: ResponseReasoningSummaryPartDoneEvent$inboundSchema,
75379
+ ["response.reasoning_summary_text.delta"]: ResponseReasoningSummaryTextDeltaEvent$inboundSchema,
75380
+ ["response.reasoning_summary_text.done"]: ResponseReasoningSummaryTextDoneEvent$inboundSchema,
75381
+ ["response.reasoning_text.delta"]: ResponseReasoningTextDeltaEvent$inboundSchema,
75382
+ ["response.reasoning_text.done"]: ResponseReasoningTextDoneEvent$inboundSchema,
75383
+ ["response.image_generation_call.in_progress"]: ResponseImageGenerationCallInProgressEvent$inboundSchema,
75384
+ ["response.image_generation_call.generating"]: ResponseImageGenerationCallGeneratingEvent$inboundSchema,
75385
+ ["response.image_generation_call.completed"]: ResponseImageGenerationCallCompletedEvent$inboundSchema,
75386
+ ["response.image_generation_call.partial_image"]: ResponseImageGenerationCallPartialImageEvent$inboundSchema,
75387
+ ["response.mcp_call_arguments.delta"]: ResponseMCPCallArgumentsDeltaEvent$inboundSchema,
75388
+ ["response.mcp_call_arguments.done"]: ResponseMCPCallArgumentsDoneEvent$inboundSchema,
75389
+ ["response.mcp_call.in_progress"]: ResponseMCPCallInProgressEvent$inboundSchema,
75390
+ ["response.mcp_call.completed"]: ResponseMCPCallCompletedEvent$inboundSchema,
75391
+ ["response.mcp_call.failed"]: ResponseMCPCallFailedEvent$inboundSchema,
75392
+ ["response.mcp_list_tools.in_progress"]: ResponseMCPListToolsInProgressEvent$inboundSchema,
75393
+ ["response.mcp_list_tools.completed"]: ResponseMCPListToolsCompletedEvent$inboundSchema,
75394
+ ["response.mcp_list_tools.failed"]: ResponseMCPListToolsFailedEvent$inboundSchema,
75395
+ ["response.read_file_call.in_progress"]: ResponseReadFileCallInProgressEvent$inboundSchema,
75396
+ ["response.read_file_call.reading"]: ResponseReadFileCallReadingEvent$inboundSchema,
75397
+ ["response.read_file_call.completed"]: ResponseReadFileCallCompletedEvent$inboundSchema,
75398
+ ["response.code_interpreter_call.in_progress"]: ResponseCodeInterpreterCallInProgressEvent$inboundSchema,
75399
+ ["response.code_interpreter_call.interpreting"]: ResponseCodeInterpreterCallInterpretingEvent$inboundSchema,
75400
+ ["response.code_interpreter_call.completed"]: ResponseCodeInterpreterCallCompletedEvent$inboundSchema,
75401
+ ["response.code_interpreter_call_code.delta"]: ResponseCodeInterpreterCallCodeDeltaEvent$inboundSchema,
75402
+ ["response.code_interpreter_call_code.done"]: ResponseCodeInterpreterCallCodeDoneEvent$inboundSchema,
75403
+ ["response.shell_call.in_progress"]: ResponseShellCallInProgressEvent$inboundSchema,
75404
+ ["response.shell_call.executing"]: ResponseShellCallExecutingEvent$inboundSchema,
75405
+ ["response.shell_call.completed"]: ResponseShellCallCompletedEvent$inboundSchema,
75406
+ ["response.custom_tool_call_input.delta"]: ResponseCustomToolCallInputDeltaEvent$inboundSchema,
75407
+ ["response.custom_tool_call_input.done"]: ResponseCustomToolCallInputDoneEvent$inboundSchema,
75408
+ ["response.output_text.annotation.added"]: ResponseOutputTextAnnotationAddedEvent$inboundSchema,
75409
+ error: ErrorEvent$inboundSchema
75410
+ });
75273
75411
  ResponseStreamingEvent$outboundSchema = unionType([
75274
75412
  ResponseCreatedEvent$outboundSchema,
75275
75413
  ResponseInProgressEvent$outboundSchema,
@@ -87477,6 +87615,7 @@ var CreateChatCompletionStreamRequest$inboundSchema, CreateChatCompletionStreamR
87477
87615
  var init_createchatcompletionstream = __esm(() => {
87478
87616
  init_esm();
87479
87617
  init_primitives();
87618
+ init_discriminatedUnion();
87480
87619
  init_components();
87481
87620
  CreateChatCompletionStreamRequest$inboundSchema = objectType({
87482
87621
  "X-On-Behalf-Of": stringType().optional(),
@@ -87541,11 +87680,11 @@ var init_createchatcompletionstream = __esm(() => {
87541
87680
  id: stringType().optional(),
87542
87681
  retry: numberType().int().optional()
87543
87682
  });
87544
- CreateChatCompletionStreamResponseBody$inboundSchema = unionType([
87545
- lazyType(() => One$inboundSchema2),
87546
- lazyType(() => Two$inboundSchema2),
87547
- lazyType(() => Three$inboundSchema2)
87548
- ]);
87683
+ CreateChatCompletionStreamResponseBody$inboundSchema = discriminatedUnion2("event", {
87684
+ message: lazyType(() => One$inboundSchema2),
87685
+ done: lazyType(() => Two$inboundSchema2),
87686
+ error: lazyType(() => Three$inboundSchema2)
87687
+ });
87549
87688
  CreateChatCompletionStreamResponseBody$outboundSchema = unionType([
87550
87689
  lazyType(() => One$outboundSchema2),
87551
87690
  lazyType(() => Two$outboundSchema2),
@@ -148255,7 +148394,7 @@ Aggregate sandbox usage (session lifecycle, execution, and workspace operations)
148255
148394
  function createMCPServer(deps) {
148256
148395
  const server = new McpServer({
148257
148396
  name: "SDK",
148258
- version: "0.54.7"
148397
+ version: "0.54.9"
148259
148398
  });
148260
148399
  const client = new SDKCore({
148261
148400
  bearerAuth: deps.bearerAuth,
@@ -150183,7 +150322,7 @@ var routes = rn({
150183
150322
  var app = Ve(routes, {
150184
150323
  name: "mcp",
150185
150324
  versionInfo: {
150186
- currentVersion: "0.54.7"
150325
+ currentVersion: "0.54.9"
150187
150326
  }
150188
150327
  });
150189
150328
  _t(app, process3.argv.slice(2), buildContext(process3));
@@ -150191,5 +150330,5 @@ export {
150191
150330
  app
150192
150331
  };
150193
150332
 
150194
- //# debugId=FCEFB3A9C7E7836564756E2164756E21
150333
+ //# debugId=F9A940859707118164756E2164756E21
150195
150334
  //# sourceMappingURL=mcp-server.js.map