@meetkai/mka1 0.54.7 → 0.54.8

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 (250) hide show
  1. package/bin/mcp-server.js +492 -368
  2. package/bin/mcp-server.js.map +35 -32
  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/guardrailconfig.d.ts +2 -1
  39. package/dist/commonjs/models/components/guardrailconfig.d.ts.map +1 -1
  40. package/dist/commonjs/models/components/guardrailconfig.js +6 -5
  41. package/dist/commonjs/models/components/guardrailconfig.js.map +1 -1
  42. package/dist/commonjs/models/components/method.d.ts +6 -5
  43. package/dist/commonjs/models/components/method.d.ts.map +1 -1
  44. package/dist/commonjs/models/components/method.js +36 -35
  45. package/dist/commonjs/models/components/method.js.map +1 -1
  46. package/dist/commonjs/models/components/openaichatcompletionchoice.d.ts +4 -3
  47. package/dist/commonjs/models/components/openaichatcompletionchoice.d.ts.map +1 -1
  48. package/dist/commonjs/models/components/openaichatcompletionchoice.js +19 -18
  49. package/dist/commonjs/models/components/openaichatcompletionchoice.js.map +1 -1
  50. package/dist/commonjs/models/components/openaichatcompletionchunk.d.ts +4 -3
  51. package/dist/commonjs/models/components/openaichatcompletionchunk.d.ts.map +1 -1
  52. package/dist/commonjs/models/components/openaichatcompletionchunk.js +19 -18
  53. package/dist/commonjs/models/components/openaichatcompletionchunk.js.map +1 -1
  54. package/dist/commonjs/models/components/outputmessage.d.ts +3 -2
  55. package/dist/commonjs/models/components/outputmessage.d.ts.map +1 -1
  56. package/dist/commonjs/models/components/outputmessage.js +9 -8
  57. package/dist/commonjs/models/components/outputmessage.js.map +1 -1
  58. package/dist/commonjs/models/components/outputmessagewithid.d.ts +3 -2
  59. package/dist/commonjs/models/components/outputmessagewithid.d.ts.map +1 -1
  60. package/dist/commonjs/models/components/outputmessagewithid.js +9 -8
  61. package/dist/commonjs/models/components/outputmessagewithid.js.map +1 -1
  62. package/dist/commonjs/models/components/outputtext.d.ts +3 -2
  63. package/dist/commonjs/models/components/outputtext.d.ts.map +1 -1
  64. package/dist/commonjs/models/components/outputtext.js +13 -12
  65. package/dist/commonjs/models/components/outputtext.js.map +1 -1
  66. package/dist/commonjs/models/components/responsecontentpartaddedevent.d.ts +3 -2
  67. package/dist/commonjs/models/components/responsecontentpartaddedevent.d.ts.map +1 -1
  68. package/dist/commonjs/models/components/responsecontentpartaddedevent.js +11 -11
  69. package/dist/commonjs/models/components/responsecontentpartaddedevent.js.map +1 -1
  70. package/dist/commonjs/models/components/responsecontentpartdoneevent.d.ts +3 -2
  71. package/dist/commonjs/models/components/responsecontentpartdoneevent.d.ts.map +1 -1
  72. package/dist/commonjs/models/components/responsecontentpartdoneevent.js +11 -10
  73. package/dist/commonjs/models/components/responsecontentpartdoneevent.js.map +1 -1
  74. package/dist/commonjs/models/components/responseformat.d.ts +2 -1
  75. package/dist/commonjs/models/components/responseformat.d.ts.map +1 -1
  76. package/dist/commonjs/models/components/responseformat.js +6 -5
  77. package/dist/commonjs/models/components/responseformat.js.map +1 -1
  78. package/dist/commonjs/models/components/responseobject.d.ts +5 -4
  79. package/dist/commonjs/models/components/responseobject.d.ts.map +1 -1
  80. package/dist/commonjs/models/components/responseobject.js +41 -40
  81. package/dist/commonjs/models/components/responseobject.js.map +1 -1
  82. package/dist/commonjs/models/components/responsestreamingevent.d.ts +2 -1
  83. package/dist/commonjs/models/components/responsestreamingevent.d.ts.map +1 -1
  84. package/dist/commonjs/models/components/responsestreamingevent.js +68 -67
  85. package/dist/commonjs/models/components/responsestreamingevent.js.map +1 -1
  86. package/dist/commonjs/models/components/shellenvironment.d.ts +2 -1
  87. package/dist/commonjs/models/components/shellenvironment.d.ts.map +1 -1
  88. package/dist/commonjs/models/components/shellenvironment.js +5 -4
  89. package/dist/commonjs/models/components/shellenvironment.js.map +1 -1
  90. package/dist/commonjs/models/components/skillentry.d.ts +2 -1
  91. package/dist/commonjs/models/components/skillentry.d.ts.map +1 -1
  92. package/dist/commonjs/models/components/skillentry.js +5 -4
  93. package/dist/commonjs/models/components/skillentry.js.map +1 -1
  94. package/dist/commonjs/models/components/tooldefinition.d.ts +5 -4
  95. package/dist/commonjs/models/components/tooldefinition.d.ts.map +1 -1
  96. package/dist/commonjs/models/components/tooldefinition.js +29 -28
  97. package/dist/commonjs/models/components/tooldefinition.js.map +1 -1
  98. package/dist/commonjs/models/components/websearchaction.d.ts +2 -1
  99. package/dist/commonjs/models/components/websearchaction.d.ts.map +1 -1
  100. package/dist/commonjs/models/components/websearchaction.js +6 -5
  101. package/dist/commonjs/models/components/websearchaction.js.map +1 -1
  102. package/dist/commonjs/models/operations/createchatcompletionstream.d.ts +2 -1
  103. package/dist/commonjs/models/operations/createchatcompletionstream.d.ts.map +1 -1
  104. package/dist/commonjs/models/operations/createchatcompletionstream.js +6 -5
  105. package/dist/commonjs/models/operations/createchatcompletionstream.js.map +1 -1
  106. package/dist/commonjs/models/operations/uploadfile.d.ts +1 -1
  107. package/dist/commonjs/types/discriminatedUnion.d.ts +25 -0
  108. package/dist/commonjs/types/discriminatedUnion.d.ts.map +1 -0
  109. package/dist/commonjs/types/discriminatedUnion.js +94 -0
  110. package/dist/commonjs/types/discriminatedUnion.js.map +1 -0
  111. package/dist/esm/hooks/multipartFilename.d.ts +12 -0
  112. package/dist/esm/hooks/multipartFilename.d.ts.map +1 -0
  113. package/dist/esm/hooks/multipartFilename.js +46 -0
  114. package/dist/esm/hooks/multipartFilename.js.map +1 -0
  115. package/dist/esm/hooks/registration.d.ts.map +1 -1
  116. package/dist/esm/hooks/registration.js +2 -1
  117. package/dist/esm/hooks/registration.js.map +1 -1
  118. package/dist/esm/lib/config.d.ts +2 -2
  119. package/dist/esm/lib/config.js +2 -2
  120. package/dist/esm/mcp-server/mcp-server.js +1 -1
  121. package/dist/esm/mcp-server/server.js +1 -1
  122. package/dist/esm/models/components/agentschedulespec.d.ts +2 -1
  123. package/dist/esm/models/components/agentschedulespec.d.ts.map +1 -1
  124. package/dist/esm/models/components/agentschedulespec.js +6 -5
  125. package/dist/esm/models/components/agentschedulespec.js.map +1 -1
  126. package/dist/esm/models/components/chunkingstrategy.d.ts +2 -1
  127. package/dist/esm/models/components/chunkingstrategy.d.ts.map +1 -1
  128. package/dist/esm/models/components/chunkingstrategy.js +6 -5
  129. package/dist/esm/models/components/chunkingstrategy.js.map +1 -1
  130. package/dist/esm/models/components/codeinterpreteroutput.d.ts +2 -1
  131. package/dist/esm/models/components/codeinterpreteroutput.d.ts.map +1 -1
  132. package/dist/esm/models/components/codeinterpreteroutput.js +5 -4
  133. package/dist/esm/models/components/codeinterpreteroutput.js.map +1 -1
  134. package/dist/esm/models/components/computeraction.d.ts +2 -1
  135. package/dist/esm/models/components/computeraction.d.ts.map +1 -1
  136. package/dist/esm/models/components/computeraction.js +12 -11
  137. package/dist/esm/models/components/computeraction.js.map +1 -1
  138. package/dist/esm/models/components/customtoolformat.d.ts +2 -1
  139. package/dist/esm/models/components/customtoolformat.d.ts.map +1 -1
  140. package/dist/esm/models/components/customtoolformat.js +5 -1
  141. package/dist/esm/models/components/customtoolformat.js.map +1 -1
  142. package/dist/esm/models/components/filesearchcompoundfilter.d.ts +3 -2
  143. package/dist/esm/models/components/filesearchcompoundfilter.d.ts.map +1 -1
  144. package/dist/esm/models/components/filesearchcompoundfilter.js +21 -20
  145. package/dist/esm/models/components/filesearchcompoundfilter.js.map +1 -1
  146. package/dist/esm/models/components/guardrailconfig.d.ts +2 -1
  147. package/dist/esm/models/components/guardrailconfig.d.ts.map +1 -1
  148. package/dist/esm/models/components/guardrailconfig.js +6 -5
  149. package/dist/esm/models/components/guardrailconfig.js.map +1 -1
  150. package/dist/esm/models/components/method.d.ts +6 -5
  151. package/dist/esm/models/components/method.d.ts.map +1 -1
  152. package/dist/esm/models/components/method.js +36 -35
  153. package/dist/esm/models/components/method.js.map +1 -1
  154. package/dist/esm/models/components/openaichatcompletionchoice.d.ts +4 -3
  155. package/dist/esm/models/components/openaichatcompletionchoice.d.ts.map +1 -1
  156. package/dist/esm/models/components/openaichatcompletionchoice.js +19 -18
  157. package/dist/esm/models/components/openaichatcompletionchoice.js.map +1 -1
  158. package/dist/esm/models/components/openaichatcompletionchunk.d.ts +4 -3
  159. package/dist/esm/models/components/openaichatcompletionchunk.d.ts.map +1 -1
  160. package/dist/esm/models/components/openaichatcompletionchunk.js +19 -18
  161. package/dist/esm/models/components/openaichatcompletionchunk.js.map +1 -1
  162. package/dist/esm/models/components/outputmessage.d.ts +3 -2
  163. package/dist/esm/models/components/outputmessage.d.ts.map +1 -1
  164. package/dist/esm/models/components/outputmessage.js +9 -8
  165. package/dist/esm/models/components/outputmessage.js.map +1 -1
  166. package/dist/esm/models/components/outputmessagewithid.d.ts +3 -2
  167. package/dist/esm/models/components/outputmessagewithid.d.ts.map +1 -1
  168. package/dist/esm/models/components/outputmessagewithid.js +9 -8
  169. package/dist/esm/models/components/outputmessagewithid.js.map +1 -1
  170. package/dist/esm/models/components/outputtext.d.ts +3 -2
  171. package/dist/esm/models/components/outputtext.d.ts.map +1 -1
  172. package/dist/esm/models/components/outputtext.js +13 -12
  173. package/dist/esm/models/components/outputtext.js.map +1 -1
  174. package/dist/esm/models/components/responsecontentpartaddedevent.d.ts +3 -2
  175. package/dist/esm/models/components/responsecontentpartaddedevent.d.ts.map +1 -1
  176. package/dist/esm/models/components/responsecontentpartaddedevent.js +11 -11
  177. package/dist/esm/models/components/responsecontentpartaddedevent.js.map +1 -1
  178. package/dist/esm/models/components/responsecontentpartdoneevent.d.ts +3 -2
  179. package/dist/esm/models/components/responsecontentpartdoneevent.d.ts.map +1 -1
  180. package/dist/esm/models/components/responsecontentpartdoneevent.js +11 -10
  181. package/dist/esm/models/components/responsecontentpartdoneevent.js.map +1 -1
  182. package/dist/esm/models/components/responseformat.d.ts +2 -1
  183. package/dist/esm/models/components/responseformat.d.ts.map +1 -1
  184. package/dist/esm/models/components/responseformat.js +6 -5
  185. package/dist/esm/models/components/responseformat.js.map +1 -1
  186. package/dist/esm/models/components/responseobject.d.ts +5 -4
  187. package/dist/esm/models/components/responseobject.d.ts.map +1 -1
  188. package/dist/esm/models/components/responseobject.js +41 -40
  189. package/dist/esm/models/components/responseobject.js.map +1 -1
  190. package/dist/esm/models/components/responsestreamingevent.d.ts +2 -1
  191. package/dist/esm/models/components/responsestreamingevent.d.ts.map +1 -1
  192. package/dist/esm/models/components/responsestreamingevent.js +68 -67
  193. package/dist/esm/models/components/responsestreamingevent.js.map +1 -1
  194. package/dist/esm/models/components/shellenvironment.d.ts +2 -1
  195. package/dist/esm/models/components/shellenvironment.d.ts.map +1 -1
  196. package/dist/esm/models/components/shellenvironment.js +5 -4
  197. package/dist/esm/models/components/shellenvironment.js.map +1 -1
  198. package/dist/esm/models/components/skillentry.d.ts +2 -1
  199. package/dist/esm/models/components/skillentry.d.ts.map +1 -1
  200. package/dist/esm/models/components/skillentry.js +5 -4
  201. package/dist/esm/models/components/skillentry.js.map +1 -1
  202. package/dist/esm/models/components/tooldefinition.d.ts +5 -4
  203. package/dist/esm/models/components/tooldefinition.d.ts.map +1 -1
  204. package/dist/esm/models/components/tooldefinition.js +29 -28
  205. package/dist/esm/models/components/tooldefinition.js.map +1 -1
  206. package/dist/esm/models/components/websearchaction.d.ts +2 -1
  207. package/dist/esm/models/components/websearchaction.d.ts.map +1 -1
  208. package/dist/esm/models/components/websearchaction.js +6 -5
  209. package/dist/esm/models/components/websearchaction.js.map +1 -1
  210. package/dist/esm/models/operations/createchatcompletionstream.d.ts +2 -1
  211. package/dist/esm/models/operations/createchatcompletionstream.d.ts.map +1 -1
  212. package/dist/esm/models/operations/createchatcompletionstream.js +6 -5
  213. package/dist/esm/models/operations/createchatcompletionstream.js.map +1 -1
  214. package/dist/esm/models/operations/uploadfile.d.ts +1 -1
  215. package/dist/esm/types/discriminatedUnion.d.ts +25 -0
  216. package/dist/esm/types/discriminatedUnion.d.ts.map +1 -0
  217. package/dist/esm/types/discriminatedUnion.js +57 -0
  218. package/dist/esm/types/discriminatedUnion.js.map +1 -0
  219. package/jsr.json +1 -1
  220. package/package.json +1 -1
  221. package/src/hooks/multipartFilename.ts +60 -0
  222. package/src/hooks/registration.ts +2 -1
  223. package/src/lib/config.ts +2 -2
  224. package/src/mcp-server/mcp-server.ts +1 -1
  225. package/src/mcp-server/server.ts +1 -1
  226. package/src/models/components/agentschedulespec.ts +9 -6
  227. package/src/models/components/chunkingstrategy.ts +9 -6
  228. package/src/models/components/codeinterpreteroutput.ts +8 -5
  229. package/src/models/components/computeraction.ts +15 -12
  230. package/src/models/components/customtoolformat.ts +10 -2
  231. package/src/models/components/filesearchcompoundfilter.ts +41 -39
  232. package/src/models/components/guardrailconfig.ts +9 -6
  233. package/src/models/components/method.ts +75 -43
  234. package/src/models/components/openaichatcompletionchoice.ts +24 -21
  235. package/src/models/components/openaichatcompletionchunk.ts +24 -21
  236. package/src/models/components/outputmessage.ts +19 -10
  237. package/src/models/components/outputmessagewithid.ts +19 -10
  238. package/src/models/components/outputtext.ts +23 -16
  239. package/src/models/components/responsecontentpartaddedevent.ts +25 -13
  240. package/src/models/components/responsecontentpartdoneevent.ts +22 -12
  241. package/src/models/components/responseformat.ts +9 -6
  242. package/src/models/components/responseobject.ts +62 -48
  243. package/src/models/components/responsestreamingevent.ts +118 -68
  244. package/src/models/components/shellenvironment.ts +8 -5
  245. package/src/models/components/skillentry.ts +10 -5
  246. package/src/models/components/tooldefinition.ts +42 -31
  247. package/src/models/components/websearchaction.ts +12 -6
  248. package/src/models/operations/createchatcompletionstream.ts +12 -6
  249. package/src/models/operations/uploadfile.ts +1 -1
  250. 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.8",
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.8 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
  });
@@ -65495,9 +65603,13 @@ var init_textformat = __esm(() => {
65495
65603
  var CustomToolFormat$inboundSchema, CustomToolFormat$outboundSchema;
65496
65604
  var init_customtoolformat = __esm(() => {
65497
65605
  init_esm();
65606
+ init_discriminatedUnion();
65498
65607
  init_grammarformat();
65499
65608
  init_textformat();
65500
- CustomToolFormat$inboundSchema = unionType([TextFormat$inboundSchema, GrammarFormat$inboundSchema]);
65609
+ CustomToolFormat$inboundSchema = discriminatedUnion2("type", {
65610
+ text: TextFormat$inboundSchema,
65611
+ grammar: GrammarFormat$inboundSchema
65612
+ });
65501
65613
  CustomToolFormat$outboundSchema = unionType([TextFormat$outboundSchema, GrammarFormat$outboundSchema]);
65502
65614
  });
65503
65615
 
@@ -67631,14 +67743,15 @@ var init_promptinjectionguardrail = __esm(() => {
67631
67743
  var GuardrailConfig$inboundSchema, GuardrailConfig$outboundSchema;
67632
67744
  var init_guardrailconfig = __esm(() => {
67633
67745
  init_esm();
67746
+ init_discriminatedUnion();
67634
67747
  init_banwordsguardrail();
67635
67748
  init_leakageguardrail();
67636
67749
  init_promptinjectionguardrail();
67637
- GuardrailConfig$inboundSchema = unionType([
67638
- BanWordsGuardrail$inboundSchema,
67639
- PromptInjectionGuardrail$inboundSchema,
67640
- LeakageGuardrail$inboundSchema
67641
- ]);
67750
+ GuardrailConfig$inboundSchema = discriminatedUnion2("mode", {
67751
+ ban_words: BanWordsGuardrail$inboundSchema,
67752
+ prompt_injection: PromptInjectionGuardrail$inboundSchema,
67753
+ leakage: LeakageGuardrail$inboundSchema
67754
+ });
67642
67755
  GuardrailConfig$outboundSchema = unionType([
67643
67756
  BanWordsGuardrail$outboundSchema,
67644
67757
  PromptInjectionGuardrail$outboundSchema,
@@ -69211,12 +69324,13 @@ var init_skillreference = __esm(() => {
69211
69324
  var SkillEntry$inboundSchema, SkillEntry$outboundSchema;
69212
69325
  var init_skillentry = __esm(() => {
69213
69326
  init_esm();
69327
+ init_discriminatedUnion();
69214
69328
  init_preconfiguredskillreference();
69215
69329
  init_skillreference();
69216
- SkillEntry$inboundSchema = unionType([
69217
- SkillReference$inboundSchema,
69218
- PreconfiguredSkillReference$inboundSchema
69219
- ]);
69330
+ SkillEntry$inboundSchema = discriminatedUnion2("type", {
69331
+ skill_reference: SkillReference$inboundSchema,
69332
+ preconfigured: PreconfiguredSkillReference$inboundSchema
69333
+ });
69220
69334
  SkillEntry$outboundSchema = unionType([
69221
69335
  SkillReference$outboundSchema,
69222
69336
  PreconfiguredSkillReference$outboundSchema
@@ -69295,12 +69409,13 @@ var init_shellenvironmentcontainerreference = __esm(() => {
69295
69409
  var ShellEnvironment$inboundSchema, ShellEnvironment$outboundSchema;
69296
69410
  var init_shellenvironment = __esm(() => {
69297
69411
  init_esm();
69412
+ init_discriminatedUnion();
69298
69413
  init_shellenvironmentcontainerauto();
69299
69414
  init_shellenvironmentcontainerreference();
69300
- ShellEnvironment$inboundSchema = unionType([
69301
- ShellEnvironmentContainerAuto$inboundSchema,
69302
- ShellEnvironmentContainerReference$inboundSchema
69303
- ]);
69415
+ ShellEnvironment$inboundSchema = discriminatedUnion2("type", {
69416
+ container_auto: ShellEnvironmentContainerAuto$inboundSchema,
69417
+ container_reference: ShellEnvironmentContainerReference$inboundSchema
69418
+ });
69304
69419
  ShellEnvironment$outboundSchema = unionType([
69305
69420
  ShellEnvironmentContainerAuto$outboundSchema,
69306
69421
  ShellEnvironmentContainerReference$outboundSchema
@@ -69375,14 +69490,15 @@ var init_textresponseformat = __esm(() => {
69375
69490
  var ResponseFormat$inboundSchema, ResponseFormat$outboundSchema;
69376
69491
  var init_responseformat = __esm(() => {
69377
69492
  init_esm();
69493
+ init_discriminatedUnion();
69378
69494
  init_jsonobjectresponseformat();
69379
69495
  init_jsonschemaresponseformat();
69380
69496
  init_textresponseformat();
69381
- ResponseFormat$inboundSchema = unionType([
69382
- TextResponseFormat$inboundSchema,
69383
- JSONSchemaResponseFormat$inboundSchema,
69384
- JSONObjectResponseFormat$inboundSchema
69385
- ]);
69497
+ ResponseFormat$inboundSchema = discriminatedUnion2("type", {
69498
+ text: TextResponseFormat$inboundSchema,
69499
+ json_schema: JSONSchemaResponseFormat$inboundSchema,
69500
+ json_object: JSONObjectResponseFormat$inboundSchema
69501
+ });
69386
69502
  ResponseFormat$outboundSchema = unionType([
69387
69503
  TextResponseFormat$outboundSchema,
69388
69504
  JSONSchemaResponseFormat$outboundSchema,
@@ -70517,6 +70633,7 @@ var OpenAIChatCompletionChoice2Format, OpenAIChatCompletionChoice2Detail, One, O
70517
70633
  var init_openaichatcompletionchoice = __esm(() => {
70518
70634
  init_esm();
70519
70635
  init_primitives();
70636
+ init_discriminatedUnion();
70520
70637
  OpenAIChatCompletionChoice2Format = {
70521
70638
  Wav: "wav",
70522
70639
  Mp3: "mp3"
@@ -70646,12 +70763,12 @@ var init_openaichatcompletionchoice = __esm(() => {
70646
70763
  type: literalType("text"),
70647
70764
  text: stringType()
70648
70765
  });
70649
- Content2$inboundSchema = unionType([
70650
- lazyType(() => OpenAIChatCompletionChoice21$inboundSchema),
70651
- lazyType(() => OpenAIChatCompletionChoice22$inboundSchema),
70652
- lazyType(() => OpenAIChatCompletionChoice23$inboundSchema),
70653
- lazyType(() => OpenAIChatCompletionChoice24$inboundSchema)
70654
- ]);
70766
+ Content2$inboundSchema = discriminatedUnion2("type", {
70767
+ text: lazyType(() => OpenAIChatCompletionChoice21$inboundSchema),
70768
+ image_url: lazyType(() => OpenAIChatCompletionChoice22$inboundSchema),
70769
+ input_audio: lazyType(() => OpenAIChatCompletionChoice23$inboundSchema),
70770
+ file: lazyType(() => OpenAIChatCompletionChoice24$inboundSchema)
70771
+ });
70655
70772
  Content2$outboundSchema = unionType([
70656
70773
  lazyType(() => OpenAIChatCompletionChoice21$outboundSchema),
70657
70774
  lazyType(() => OpenAIChatCompletionChoice22$outboundSchema),
@@ -70660,12 +70777,12 @@ var init_openaichatcompletionchoice = __esm(() => {
70660
70777
  ]);
70661
70778
  OpenAIChatCompletionChoiceContent$inboundSchema = unionType([
70662
70779
  stringType(),
70663
- arrayType(unionType([
70664
- lazyType(() => OpenAIChatCompletionChoice21$inboundSchema),
70665
- lazyType(() => OpenAIChatCompletionChoice22$inboundSchema),
70666
- lazyType(() => OpenAIChatCompletionChoice23$inboundSchema),
70667
- lazyType(() => OpenAIChatCompletionChoice24$inboundSchema)
70668
- ]))
70780
+ arrayType(discriminatedUnion2("type", {
70781
+ text: lazyType(() => OpenAIChatCompletionChoice21$inboundSchema),
70782
+ image_url: lazyType(() => OpenAIChatCompletionChoice22$inboundSchema),
70783
+ input_audio: lazyType(() => OpenAIChatCompletionChoice23$inboundSchema),
70784
+ file: lazyType(() => OpenAIChatCompletionChoice24$inboundSchema)
70785
+ }))
70669
70786
  ]);
70670
70787
  OpenAIChatCompletionChoiceContent$outboundSchema = unionType([
70671
70788
  stringType(),
@@ -70700,12 +70817,12 @@ var init_openaichatcompletionchoice = __esm(() => {
70700
70817
  tool_call_id: stringType().optional(),
70701
70818
  content: nullableType(unionType([
70702
70819
  stringType(),
70703
- arrayType(unionType([
70704
- lazyType(() => OpenAIChatCompletionChoice21$inboundSchema),
70705
- lazyType(() => OpenAIChatCompletionChoice22$inboundSchema),
70706
- lazyType(() => OpenAIChatCompletionChoice23$inboundSchema),
70707
- lazyType(() => OpenAIChatCompletionChoice24$inboundSchema)
70708
- ]))
70820
+ arrayType(discriminatedUnion2("type", {
70821
+ text: lazyType(() => OpenAIChatCompletionChoice21$inboundSchema),
70822
+ image_url: lazyType(() => OpenAIChatCompletionChoice22$inboundSchema),
70823
+ input_audio: lazyType(() => OpenAIChatCompletionChoice23$inboundSchema),
70824
+ file: lazyType(() => OpenAIChatCompletionChoice24$inboundSchema)
70825
+ }))
70709
70826
  ])),
70710
70827
  reasoning: nullableType(stringType()).optional(),
70711
70828
  tool_calls: arrayType(lazyType(() => OpenAIChatCompletionChoiceToolCalls$inboundSchema)).optional()
@@ -70920,6 +71037,7 @@ var OpenAIChatCompletionChunk2Format, OpenAIChatCompletionChunk2Detail, FinishRe
70920
71037
  var init_openaichatcompletionchunk = __esm(() => {
70921
71038
  init_esm();
70922
71039
  init_primitives();
71040
+ init_discriminatedUnion();
70923
71041
  init_openaichatcompletionusage();
70924
71042
  OpenAIChatCompletionChunk2Format = {
70925
71043
  Wav: "wav",
@@ -71050,12 +71168,12 @@ var init_openaichatcompletionchunk = __esm(() => {
71050
71168
  type: literalType("text"),
71051
71169
  text: stringType()
71052
71170
  });
71053
- OpenAIChatCompletionChunkContent2$inboundSchema = unionType([
71054
- lazyType(() => OpenAIChatCompletionChunk21$inboundSchema),
71055
- lazyType(() => OpenAIChatCompletionChunk22$inboundSchema),
71056
- lazyType(() => OpenAIChatCompletionChunk23$inboundSchema),
71057
- lazyType(() => OpenAIChatCompletionChunk24$inboundSchema)
71058
- ]);
71171
+ OpenAIChatCompletionChunkContent2$inboundSchema = discriminatedUnion2("type", {
71172
+ text: lazyType(() => OpenAIChatCompletionChunk21$inboundSchema),
71173
+ image_url: lazyType(() => OpenAIChatCompletionChunk22$inboundSchema),
71174
+ input_audio: lazyType(() => OpenAIChatCompletionChunk23$inboundSchema),
71175
+ file: lazyType(() => OpenAIChatCompletionChunk24$inboundSchema)
71176
+ });
71059
71177
  OpenAIChatCompletionChunkContent2$outboundSchema = unionType([
71060
71178
  lazyType(() => OpenAIChatCompletionChunk21$outboundSchema),
71061
71179
  lazyType(() => OpenAIChatCompletionChunk22$outboundSchema),
@@ -71064,12 +71182,12 @@ var init_openaichatcompletionchunk = __esm(() => {
71064
71182
  ]);
71065
71183
  OpenAIChatCompletionChunkContent$inboundSchema = unionType([
71066
71184
  stringType(),
71067
- arrayType(unionType([
71068
- lazyType(() => OpenAIChatCompletionChunk21$inboundSchema),
71069
- lazyType(() => OpenAIChatCompletionChunk22$inboundSchema),
71070
- lazyType(() => OpenAIChatCompletionChunk23$inboundSchema),
71071
- lazyType(() => OpenAIChatCompletionChunk24$inboundSchema)
71072
- ]))
71185
+ arrayType(discriminatedUnion2("type", {
71186
+ text: lazyType(() => OpenAIChatCompletionChunk21$inboundSchema),
71187
+ image_url: lazyType(() => OpenAIChatCompletionChunk22$inboundSchema),
71188
+ input_audio: lazyType(() => OpenAIChatCompletionChunk23$inboundSchema),
71189
+ file: lazyType(() => OpenAIChatCompletionChunk24$inboundSchema)
71190
+ }))
71073
71191
  ]);
71074
71192
  OpenAIChatCompletionChunkContent$outboundSchema = unionType([
71075
71193
  stringType(),
@@ -71104,12 +71222,12 @@ var init_openaichatcompletionchunk = __esm(() => {
71104
71222
  role: literalType("assistant").optional(),
71105
71223
  content: nullableType(unionType([
71106
71224
  stringType(),
71107
- arrayType(unionType([
71108
- lazyType(() => OpenAIChatCompletionChunk21$inboundSchema),
71109
- lazyType(() => OpenAIChatCompletionChunk22$inboundSchema),
71110
- lazyType(() => OpenAIChatCompletionChunk23$inboundSchema),
71111
- lazyType(() => OpenAIChatCompletionChunk24$inboundSchema)
71112
- ]))
71225
+ arrayType(discriminatedUnion2("type", {
71226
+ text: lazyType(() => OpenAIChatCompletionChunk21$inboundSchema),
71227
+ image_url: lazyType(() => OpenAIChatCompletionChunk22$inboundSchema),
71228
+ input_audio: lazyType(() => OpenAIChatCompletionChunk23$inboundSchema),
71229
+ file: lazyType(() => OpenAIChatCompletionChunk24$inboundSchema)
71230
+ }))
71113
71231
  ])).optional(),
71114
71232
  reasoning: nullableType(stringType()).optional(),
71115
71233
  tool_calls: arrayType(lazyType(() => OpenAIChatCompletionChunkToolCalls$inboundSchema)).optional()
@@ -71665,6 +71783,7 @@ var OutputMessageWithIdStatus, OutputMessageWithIdPhase, OutputMessageWithIdCont
71665
71783
  var init_outputmessagewithid = __esm(() => {
71666
71784
  init_esm();
71667
71785
  init_primitives();
71786
+ init_discriminatedUnion();
71668
71787
  init_outputtext();
71669
71788
  init_refusal();
71670
71789
  OutputMessageWithIdStatus = {
@@ -71676,10 +71795,10 @@ var init_outputmessagewithid = __esm(() => {
71676
71795
  Commentary: "commentary",
71677
71796
  FinalAnswer: "final_answer"
71678
71797
  };
71679
- OutputMessageWithIdContent$inboundSchema = unionType([
71680
- OutputText$inboundSchema.and(objectType({ type: literalType("output_text") })),
71681
- Refusal$inboundSchema.and(objectType({ type: literalType("refusal") }))
71682
- ]);
71798
+ OutputMessageWithIdContent$inboundSchema = discriminatedUnion2("type", {
71799
+ output_text: OutputText$inboundSchema.and(objectType({ type: literalType("output_text") })),
71800
+ refusal: Refusal$inboundSchema.and(objectType({ type: literalType("refusal") }))
71801
+ });
71683
71802
  OutputMessageWithIdContent$outboundSchema = unionType([
71684
71803
  OutputText$outboundSchema.and(objectType({ type: literalType("output_text") })),
71685
71804
  Refusal$outboundSchema.and(objectType({ type: literalType("refusal") }))
@@ -71692,10 +71811,10 @@ var init_outputmessagewithid = __esm(() => {
71692
71811
  type: literalType("message"),
71693
71812
  id: stringType(),
71694
71813
  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
- ])),
71814
+ content: arrayType(discriminatedUnion2("type", {
71815
+ output_text: OutputText$inboundSchema.and(objectType({ type: literalType("output_text") })),
71816
+ refusal: Refusal$inboundSchema.and(objectType({ type: literalType("refusal") }))
71817
+ })),
71699
71818
  status: OutputMessageWithIdStatus$inboundSchema,
71700
71819
  phase: OutputMessageWithIdPhase$inboundSchema.optional(),
71701
71820
  response_id: nullableType(stringType()).optional(),
@@ -72071,6 +72190,7 @@ var ResponseObjectServiceTier, FiltersType, ResponseObjectFiltersType, ResponseO
72071
72190
  var init_responseobject = __esm(() => {
72072
72191
  init_esm();
72073
72192
  init_primitives();
72193
+ init_discriminatedUnion();
72074
72194
  init_codeinterpretertooldefinition();
72075
72195
  init_compactioncontextmanagement();
72076
72196
  init_comparisonfilter();
@@ -72130,16 +72250,16 @@ var init_responseobject = __esm(() => {
72130
72250
  type: ResponseObjectFiltersType$outboundSchema,
72131
72251
  filters: arrayType(nullableType(anyType()))
72132
72252
  });
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
- ]);
72253
+ FiltersFilters$inboundSchema = discriminatedUnion2("type", {
72254
+ eq: ComparisonFilter$inboundSchema.and(objectType({ type: literalType("eq") })),
72255
+ ne: ComparisonFilter$inboundSchema.and(objectType({ type: literalType("ne") })),
72256
+ gt: ComparisonFilter$inboundSchema.and(objectType({ type: literalType("gt") })),
72257
+ gte: ComparisonFilter$inboundSchema.and(objectType({ type: literalType("gte") })),
72258
+ lt: ComparisonFilter$inboundSchema.and(objectType({ type: literalType("lt") })),
72259
+ lte: ComparisonFilter$inboundSchema.and(objectType({ type: literalType("lte") })),
72260
+ and: lazyType(() => ResponseObjectFilters2$inboundSchema).and(objectType({ type: literalType("and") })),
72261
+ or: lazyType(() => ResponseObjectFilters2$inboundSchema).and(objectType({ type: literalType("or") }))
72262
+ });
72143
72263
  FiltersFilters$outboundSchema = unionType([
72144
72264
  ComparisonFilter$outboundSchema.and(objectType({ type: literalType("eq") })),
72145
72265
  ComparisonFilter$outboundSchema.and(objectType({ type: literalType("ne") })),
@@ -72152,16 +72272,16 @@ var init_responseobject = __esm(() => {
72152
72272
  ]);
72153
72273
  Filters2$inboundSchema = objectType({
72154
72274
  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
- ]))
72275
+ filters: arrayType(discriminatedUnion2("type", {
72276
+ eq: ComparisonFilter$inboundSchema.and(objectType({ type: literalType("eq") })),
72277
+ ne: ComparisonFilter$inboundSchema.and(objectType({ type: literalType("ne") })),
72278
+ gt: ComparisonFilter$inboundSchema.and(objectType({ type: literalType("gt") })),
72279
+ gte: ComparisonFilter$inboundSchema.and(objectType({ type: literalType("gte") })),
72280
+ lt: ComparisonFilter$inboundSchema.and(objectType({ type: literalType("lt") })),
72281
+ lte: ComparisonFilter$inboundSchema.and(objectType({ type: literalType("lte") })),
72282
+ and: lazyType(() => ResponseObjectFilters2$inboundSchema).and(objectType({ type: literalType("and") })),
72283
+ or: lazyType(() => ResponseObjectFilters2$inboundSchema).and(objectType({ type: literalType("or") }))
72284
+ }))
72165
72285
  });
72166
72286
  Filters2$outboundSchema = objectType({
72167
72287
  type: FiltersType$outboundSchema,
@@ -72176,16 +72296,16 @@ var init_responseobject = __esm(() => {
72176
72296
  lazyType(() => ResponseObjectFilters2$outboundSchema).and(objectType({ type: literalType("or") }))
72177
72297
  ]))
72178
72298
  });
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
- ]);
72299
+ ToolsFilters$inboundSchema = discriminatedUnion2("type", {
72300
+ eq: ComparisonFilter$inboundSchema.and(objectType({ type: literalType("eq") })),
72301
+ ne: ComparisonFilter$inboundSchema.and(objectType({ type: literalType("ne") })),
72302
+ gt: ComparisonFilter$inboundSchema.and(objectType({ type: literalType("gt") })),
72303
+ gte: ComparisonFilter$inboundSchema.and(objectType({ type: literalType("gte") })),
72304
+ lt: ComparisonFilter$inboundSchema.and(objectType({ type: literalType("lt") })),
72305
+ lte: ComparisonFilter$inboundSchema.and(objectType({ type: literalType("lte") })),
72306
+ and: lazyType(() => Filters2$inboundSchema).and(objectType({ type: literalType("and") })),
72307
+ or: lazyType(() => Filters2$inboundSchema).and(objectType({ type: literalType("or") }))
72308
+ });
72189
72309
  ToolsFilters$outboundSchema = unionType([
72190
72310
  ComparisonFilter$outboundSchema.and(objectType({ type: literalType("eq") })),
72191
72311
  ComparisonFilter$outboundSchema.and(objectType({ type: literalType("ne") })),
@@ -72199,16 +72319,16 @@ var init_responseobject = __esm(() => {
72199
72319
  ToolsFileSearchToolDefinition$inboundSchema = objectType({
72200
72320
  type: literalType("file_search"),
72201
72321
  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(),
72322
+ filters: discriminatedUnion2("type", {
72323
+ eq: ComparisonFilter$inboundSchema.and(objectType({ type: literalType("eq") })),
72324
+ ne: ComparisonFilter$inboundSchema.and(objectType({ type: literalType("ne") })),
72325
+ gt: ComparisonFilter$inboundSchema.and(objectType({ type: literalType("gt") })),
72326
+ gte: ComparisonFilter$inboundSchema.and(objectType({ type: literalType("gte") })),
72327
+ lt: ComparisonFilter$inboundSchema.and(objectType({ type: literalType("lt") })),
72328
+ lte: ComparisonFilter$inboundSchema.and(objectType({ type: literalType("lte") })),
72329
+ and: lazyType(() => Filters2$inboundSchema).and(objectType({ type: literalType("and") })),
72330
+ or: lazyType(() => Filters2$inboundSchema).and(objectType({ type: literalType("or") }))
72331
+ }).optional(),
72212
72332
  max_num_results: numberType().int().optional(),
72213
72333
  ranking_options: RankingOptions$inboundSchema.optional()
72214
72334
  }).transform((v2) => {
@@ -72675,14 +72795,15 @@ var Part$inboundSchema, Part$outboundSchema, ResponseContentPartAddedEvent$inbou
72675
72795
  var init_responsecontentpartaddedevent = __esm(() => {
72676
72796
  init_esm();
72677
72797
  init_primitives();
72798
+ init_discriminatedUnion();
72678
72799
  init_outputtext();
72679
72800
  init_reasoningtext();
72680
72801
  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
- ]);
72802
+ Part$inboundSchema = discriminatedUnion2("type", {
72803
+ output_text: OutputText$inboundSchema.and(objectType({ type: literalType("output_text") })),
72804
+ refusal: Refusal$inboundSchema.and(objectType({ type: literalType("refusal") })),
72805
+ reasoning_text: ReasoningText$inboundSchema.and(objectType({ type: literalType("reasoning_text") }))
72806
+ });
72686
72807
  Part$outboundSchema = unionType([
72687
72808
  OutputText$outboundSchema.and(objectType({ type: literalType("output_text") })),
72688
72809
  Refusal$outboundSchema.and(objectType({ type: literalType("refusal") })),
@@ -72694,11 +72815,11 @@ var init_responsecontentpartaddedevent = __esm(() => {
72694
72815
  item_id: stringType(),
72695
72816
  output_index: numberType().int(),
72696
72817
  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
- ])
72818
+ part: discriminatedUnion2("type", {
72819
+ output_text: OutputText$inboundSchema.and(objectType({ type: literalType("output_text") })),
72820
+ refusal: Refusal$inboundSchema.and(objectType({ type: literalType("refusal") })),
72821
+ reasoning_text: ReasoningText$inboundSchema.and(objectType({ type: literalType("reasoning_text") }))
72822
+ })
72702
72823
  }).transform((v2) => {
72703
72824
  return remap(v2, {
72704
72825
  sequence_number: "sequenceNumber",
@@ -72733,14 +72854,15 @@ var ResponseContentPartDoneEventPart$inboundSchema, ResponseContentPartDoneEvent
72733
72854
  var init_responsecontentpartdoneevent = __esm(() => {
72734
72855
  init_esm();
72735
72856
  init_primitives();
72857
+ init_discriminatedUnion();
72736
72858
  init_outputtext();
72737
72859
  init_reasoningtext();
72738
72860
  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
- ]);
72861
+ ResponseContentPartDoneEventPart$inboundSchema = discriminatedUnion2("type", {
72862
+ output_text: OutputText$inboundSchema.and(objectType({ type: literalType("output_text") })),
72863
+ refusal: Refusal$inboundSchema.and(objectType({ type: literalType("refusal") })),
72864
+ reasoning_text: ReasoningText$inboundSchema.and(objectType({ type: literalType("reasoning_text") }))
72865
+ });
72744
72866
  ResponseContentPartDoneEventPart$outboundSchema = unionType([
72745
72867
  OutputText$outboundSchema.and(objectType({ type: literalType("output_text") })),
72746
72868
  Refusal$outboundSchema.and(objectType({ type: literalType("refusal") })),
@@ -72752,11 +72874,11 @@ var init_responsecontentpartdoneevent = __esm(() => {
72752
72874
  item_id: stringType(),
72753
72875
  output_index: numberType().int(),
72754
72876
  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
- ])
72877
+ part: discriminatedUnion2("type", {
72878
+ output_text: OutputText$inboundSchema.and(objectType({ type: literalType("output_text") })),
72879
+ refusal: Refusal$inboundSchema.and(objectType({ type: literalType("refusal") })),
72880
+ reasoning_text: ReasoningText$inboundSchema.and(objectType({ type: literalType("reasoning_text") }))
72881
+ })
72760
72882
  }).transform((v2) => {
72761
72883
  return remap(v2, {
72762
72884
  sequence_number: "sequenceNumber",
@@ -75138,6 +75260,7 @@ var init_responsewebsearchcallsearchingevent = __esm(() => {
75138
75260
  var ResponseStreamingEvent$inboundSchema, ResponseStreamingEvent$outboundSchema;
75139
75261
  var init_responsestreamingevent = __esm(() => {
75140
75262
  init_esm();
75263
+ init_discriminatedUnion();
75141
75264
  init_errorevent();
75142
75265
  init_responsecancelledevent();
75143
75266
  init_responsecodeinterpretercallcodedeltaevent();
@@ -75203,73 +75326,73 @@ var init_responsestreamingevent = __esm(() => {
75203
75326
  init_responsewebsearchcallcompletedevent();
75204
75327
  init_responsewebsearchcallinprogressevent();
75205
75328
  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
- ]);
75329
+ ResponseStreamingEvent$inboundSchema = discriminatedUnion2("type", {
75330
+ ["response.created"]: ResponseCreatedEvent$inboundSchema,
75331
+ ["response.in_progress"]: ResponseInProgressEvent$inboundSchema,
75332
+ ["response.completed"]: ResponseCompletedEvent$inboundSchema,
75333
+ ["response.failed"]: ResponseFailedEvent$inboundSchema,
75334
+ ["response.incomplete"]: ResponseIncompleteEvent$inboundSchema,
75335
+ ["response.queued"]: ResponseQueuedEvent$inboundSchema,
75336
+ ["response.cancelled"]: ResponseCancelledEvent$inboundSchema,
75337
+ ["response.output_item.added"]: ResponseOutputItemAddedEvent$inboundSchema,
75338
+ ["response.output_item.done"]: ResponseOutputItemDoneEvent$inboundSchema,
75339
+ ["response.content_part.added"]: ResponseContentPartAddedEvent$inboundSchema,
75340
+ ["response.content_part.done"]: ResponseContentPartDoneEvent$inboundSchema,
75341
+ ["response.output_text.delta"]: ResponseOutputTextDeltaEvent$inboundSchema,
75342
+ ["response.output_text.done"]: ResponseOutputTextDoneEvent$inboundSchema,
75343
+ ["response.refusal.delta"]: ResponseRefusalDeltaEvent$inboundSchema,
75344
+ ["response.refusal.done"]: ResponseRefusalDoneEvent$inboundSchema,
75345
+ ["response.function_call_arguments.delta"]: ResponseFunctionCallArgumentsDeltaEvent$inboundSchema,
75346
+ ["response.function_call_arguments.done"]: ResponseFunctionCallArgumentsDoneEvent$inboundSchema,
75347
+ ["response.file_search_call.in_progress"]: ResponseFileSearchCallInProgressEvent$inboundSchema,
75348
+ ["response.file_search_call.searching"]: ResponseFileSearchCallSearchingEvent$inboundSchema,
75349
+ ["response.file_search_call.completed"]: ResponseFileSearchCallCompletedEvent$inboundSchema,
75350
+ ["response.web_search_call.in_progress"]: ResponseWebSearchCallInProgressEvent$inboundSchema,
75351
+ ["response.web_search_call.searching"]: ResponseWebSearchCallSearchingEvent$inboundSchema,
75352
+ ["response.web_search_call.completed"]: ResponseWebSearchCallCompletedEvent$inboundSchema,
75353
+ ["response.history_call.in_progress"]: ResponseHistoryCallInProgressEvent$inboundSchema,
75354
+ ["response.history_call.searching"]: ResponseHistoryCallSearchingEvent$inboundSchema,
75355
+ ["response.history_call.completed"]: ResponseHistoryCallCompletedEvent$inboundSchema,
75356
+ ["response.sleep_call.in_progress"]: ResponseSleepCallInProgressEvent$inboundSchema,
75357
+ ["response.sleep_call.sleeping"]: ResponseSleepCallSleepingEvent$inboundSchema,
75358
+ ["response.sleep_call.completed"]: ResponseSleepCallCompletedEvent$inboundSchema,
75359
+ ["response.tool_search_call.in_progress"]: ResponseToolSearchCallInProgressEvent$inboundSchema,
75360
+ ["response.tool_search_call.searching"]: ResponseToolSearchCallSearchingEvent$inboundSchema,
75361
+ ["response.tool_search_call.completed"]: ResponseToolSearchCallCompletedEvent$inboundSchema,
75362
+ ["response.reasoning_summary_part.added"]: ResponseReasoningSummaryPartAddedEvent$inboundSchema,
75363
+ ["response.reasoning_summary_part.done"]: ResponseReasoningSummaryPartDoneEvent$inboundSchema,
75364
+ ["response.reasoning_summary_text.delta"]: ResponseReasoningSummaryTextDeltaEvent$inboundSchema,
75365
+ ["response.reasoning_summary_text.done"]: ResponseReasoningSummaryTextDoneEvent$inboundSchema,
75366
+ ["response.reasoning_text.delta"]: ResponseReasoningTextDeltaEvent$inboundSchema,
75367
+ ["response.reasoning_text.done"]: ResponseReasoningTextDoneEvent$inboundSchema,
75368
+ ["response.image_generation_call.in_progress"]: ResponseImageGenerationCallInProgressEvent$inboundSchema,
75369
+ ["response.image_generation_call.generating"]: ResponseImageGenerationCallGeneratingEvent$inboundSchema,
75370
+ ["response.image_generation_call.completed"]: ResponseImageGenerationCallCompletedEvent$inboundSchema,
75371
+ ["response.image_generation_call.partial_image"]: ResponseImageGenerationCallPartialImageEvent$inboundSchema,
75372
+ ["response.mcp_call_arguments.delta"]: ResponseMCPCallArgumentsDeltaEvent$inboundSchema,
75373
+ ["response.mcp_call_arguments.done"]: ResponseMCPCallArgumentsDoneEvent$inboundSchema,
75374
+ ["response.mcp_call.in_progress"]: ResponseMCPCallInProgressEvent$inboundSchema,
75375
+ ["response.mcp_call.completed"]: ResponseMCPCallCompletedEvent$inboundSchema,
75376
+ ["response.mcp_call.failed"]: ResponseMCPCallFailedEvent$inboundSchema,
75377
+ ["response.mcp_list_tools.in_progress"]: ResponseMCPListToolsInProgressEvent$inboundSchema,
75378
+ ["response.mcp_list_tools.completed"]: ResponseMCPListToolsCompletedEvent$inboundSchema,
75379
+ ["response.mcp_list_tools.failed"]: ResponseMCPListToolsFailedEvent$inboundSchema,
75380
+ ["response.read_file_call.in_progress"]: ResponseReadFileCallInProgressEvent$inboundSchema,
75381
+ ["response.read_file_call.reading"]: ResponseReadFileCallReadingEvent$inboundSchema,
75382
+ ["response.read_file_call.completed"]: ResponseReadFileCallCompletedEvent$inboundSchema,
75383
+ ["response.code_interpreter_call.in_progress"]: ResponseCodeInterpreterCallInProgressEvent$inboundSchema,
75384
+ ["response.code_interpreter_call.interpreting"]: ResponseCodeInterpreterCallInterpretingEvent$inboundSchema,
75385
+ ["response.code_interpreter_call.completed"]: ResponseCodeInterpreterCallCompletedEvent$inboundSchema,
75386
+ ["response.code_interpreter_call_code.delta"]: ResponseCodeInterpreterCallCodeDeltaEvent$inboundSchema,
75387
+ ["response.code_interpreter_call_code.done"]: ResponseCodeInterpreterCallCodeDoneEvent$inboundSchema,
75388
+ ["response.shell_call.in_progress"]: ResponseShellCallInProgressEvent$inboundSchema,
75389
+ ["response.shell_call.executing"]: ResponseShellCallExecutingEvent$inboundSchema,
75390
+ ["response.shell_call.completed"]: ResponseShellCallCompletedEvent$inboundSchema,
75391
+ ["response.custom_tool_call_input.delta"]: ResponseCustomToolCallInputDeltaEvent$inboundSchema,
75392
+ ["response.custom_tool_call_input.done"]: ResponseCustomToolCallInputDoneEvent$inboundSchema,
75393
+ ["response.output_text.annotation.added"]: ResponseOutputTextAnnotationAddedEvent$inboundSchema,
75394
+ error: ErrorEvent$inboundSchema
75395
+ });
75273
75396
  ResponseStreamingEvent$outboundSchema = unionType([
75274
75397
  ResponseCreatedEvent$outboundSchema,
75275
75398
  ResponseInProgressEvent$outboundSchema,
@@ -87477,6 +87600,7 @@ var CreateChatCompletionStreamRequest$inboundSchema, CreateChatCompletionStreamR
87477
87600
  var init_createchatcompletionstream = __esm(() => {
87478
87601
  init_esm();
87479
87602
  init_primitives();
87603
+ init_discriminatedUnion();
87480
87604
  init_components();
87481
87605
  CreateChatCompletionStreamRequest$inboundSchema = objectType({
87482
87606
  "X-On-Behalf-Of": stringType().optional(),
@@ -87541,11 +87665,11 @@ var init_createchatcompletionstream = __esm(() => {
87541
87665
  id: stringType().optional(),
87542
87666
  retry: numberType().int().optional()
87543
87667
  });
87544
- CreateChatCompletionStreamResponseBody$inboundSchema = unionType([
87545
- lazyType(() => One$inboundSchema2),
87546
- lazyType(() => Two$inboundSchema2),
87547
- lazyType(() => Three$inboundSchema2)
87548
- ]);
87668
+ CreateChatCompletionStreamResponseBody$inboundSchema = discriminatedUnion2("event", {
87669
+ message: lazyType(() => One$inboundSchema2),
87670
+ done: lazyType(() => Two$inboundSchema2),
87671
+ error: lazyType(() => Three$inboundSchema2)
87672
+ });
87549
87673
  CreateChatCompletionStreamResponseBody$outboundSchema = unionType([
87550
87674
  lazyType(() => One$outboundSchema2),
87551
87675
  lazyType(() => Two$outboundSchema2),
@@ -148255,7 +148379,7 @@ Aggregate sandbox usage (session lifecycle, execution, and workspace operations)
148255
148379
  function createMCPServer(deps) {
148256
148380
  const server = new McpServer({
148257
148381
  name: "SDK",
148258
- version: "0.54.7"
148382
+ version: "0.54.8"
148259
148383
  });
148260
148384
  const client = new SDKCore({
148261
148385
  bearerAuth: deps.bearerAuth,
@@ -150183,7 +150307,7 @@ var routes = rn({
150183
150307
  var app = Ve(routes, {
150184
150308
  name: "mcp",
150185
150309
  versionInfo: {
150186
- currentVersion: "0.54.7"
150310
+ currentVersion: "0.54.8"
150187
150311
  }
150188
150312
  });
150189
150313
  _t(app, process3.argv.slice(2), buildContext(process3));
@@ -150191,5 +150315,5 @@ export {
150191
150315
  app
150192
150316
  };
150193
150317
 
150194
- //# debugId=FCEFB3A9C7E7836564756E2164756E21
150318
+ //# debugId=4792214F165EEE0D64756E2164756E21
150195
150319
  //# sourceMappingURL=mcp-server.js.map