@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
@@ -4,6 +4,8 @@
4
4
 
5
5
  import * as z from "zod/v3";
6
6
  import { safeParse } from "../../lib/schemas.js";
7
+ import * as discriminatedUnionTypes from "../../types/discriminatedUnion.js";
8
+ import { discriminatedUnion } from "../../types/discriminatedUnion.js";
7
9
  import { Result as SafeParseResult } from "../../types/fp.js";
8
10
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
9
11
  import {
@@ -462,80 +464,128 @@ export type ResponseStreamingEvent =
462
464
  | ResponseCustomToolCallInputDeltaEvent
463
465
  | ResponseCustomToolCallInputDoneEvent
464
466
  | ResponseOutputTextAnnotationAddedEvent
465
- | ErrorEvent;
467
+ | ErrorEvent
468
+ | discriminatedUnionTypes.Unknown<"type">;
466
469
 
467
470
  /** @internal */
468
471
  export const ResponseStreamingEvent$inboundSchema: z.ZodType<
469
472
  ResponseStreamingEvent,
470
473
  z.ZodTypeDef,
471
474
  unknown
472
- > = z.union([
473
- ResponseCreatedEvent$inboundSchema,
474
- ResponseInProgressEvent$inboundSchema,
475
- ResponseCompletedEvent$inboundSchema,
476
- ResponseFailedEvent$inboundSchema,
477
- ResponseIncompleteEvent$inboundSchema,
478
- ResponseQueuedEvent$inboundSchema,
479
- ResponseCancelledEvent$inboundSchema,
480
- ResponseOutputItemAddedEvent$inboundSchema,
481
- ResponseOutputItemDoneEvent$inboundSchema,
482
- ResponseContentPartAddedEvent$inboundSchema,
483
- ResponseContentPartDoneEvent$inboundSchema,
484
- ResponseOutputTextDeltaEvent$inboundSchema,
485
- ResponseOutputTextDoneEvent$inboundSchema,
486
- ResponseRefusalDeltaEvent$inboundSchema,
487
- ResponseRefusalDoneEvent$inboundSchema,
488
- ResponseFunctionCallArgumentsDeltaEvent$inboundSchema,
489
- ResponseFunctionCallArgumentsDoneEvent$inboundSchema,
490
- ResponseFileSearchCallInProgressEvent$inboundSchema,
491
- ResponseFileSearchCallSearchingEvent$inboundSchema,
492
- ResponseFileSearchCallCompletedEvent$inboundSchema,
493
- ResponseWebSearchCallInProgressEvent$inboundSchema,
494
- ResponseWebSearchCallSearchingEvent$inboundSchema,
495
- ResponseWebSearchCallCompletedEvent$inboundSchema,
496
- ResponseHistoryCallInProgressEvent$inboundSchema,
497
- ResponseHistoryCallSearchingEvent$inboundSchema,
498
- ResponseHistoryCallCompletedEvent$inboundSchema,
499
- ResponseSleepCallInProgressEvent$inboundSchema,
500
- ResponseSleepCallSleepingEvent$inboundSchema,
501
- ResponseSleepCallCompletedEvent$inboundSchema,
502
- ResponseToolSearchCallInProgressEvent$inboundSchema,
503
- ResponseToolSearchCallSearchingEvent$inboundSchema,
504
- ResponseToolSearchCallCompletedEvent$inboundSchema,
505
- ResponseReasoningSummaryPartAddedEvent$inboundSchema,
506
- ResponseReasoningSummaryPartDoneEvent$inboundSchema,
507
- ResponseReasoningSummaryTextDeltaEvent$inboundSchema,
508
- ResponseReasoningSummaryTextDoneEvent$inboundSchema,
509
- ResponseReasoningTextDeltaEvent$inboundSchema,
510
- ResponseReasoningTextDoneEvent$inboundSchema,
511
- ResponseImageGenerationCallInProgressEvent$inboundSchema,
512
- ResponseImageGenerationCallGeneratingEvent$inboundSchema,
513
- ResponseImageGenerationCallCompletedEvent$inboundSchema,
514
- ResponseImageGenerationCallPartialImageEvent$inboundSchema,
515
- ResponseMCPCallArgumentsDeltaEvent$inboundSchema,
516
- ResponseMCPCallArgumentsDoneEvent$inboundSchema,
517
- ResponseMCPCallInProgressEvent$inboundSchema,
518
- ResponseMCPCallCompletedEvent$inboundSchema,
519
- ResponseMCPCallFailedEvent$inboundSchema,
520
- ResponseMCPListToolsInProgressEvent$inboundSchema,
521
- ResponseMCPListToolsCompletedEvent$inboundSchema,
522
- ResponseMCPListToolsFailedEvent$inboundSchema,
523
- ResponseReadFileCallInProgressEvent$inboundSchema,
524
- ResponseReadFileCallReadingEvent$inboundSchema,
525
- ResponseReadFileCallCompletedEvent$inboundSchema,
526
- ResponseCodeInterpreterCallInProgressEvent$inboundSchema,
527
- ResponseCodeInterpreterCallInterpretingEvent$inboundSchema,
528
- ResponseCodeInterpreterCallCompletedEvent$inboundSchema,
529
- ResponseCodeInterpreterCallCodeDeltaEvent$inboundSchema,
530
- ResponseCodeInterpreterCallCodeDoneEvent$inboundSchema,
531
- ResponseShellCallInProgressEvent$inboundSchema,
532
- ResponseShellCallExecutingEvent$inboundSchema,
533
- ResponseShellCallCompletedEvent$inboundSchema,
534
- ResponseCustomToolCallInputDeltaEvent$inboundSchema,
535
- ResponseCustomToolCallInputDoneEvent$inboundSchema,
536
- ResponseOutputTextAnnotationAddedEvent$inboundSchema,
537
- ErrorEvent$inboundSchema,
538
- ]);
475
+ > = discriminatedUnion("type", {
476
+ ["response.created"]: ResponseCreatedEvent$inboundSchema,
477
+ ["response.in_progress"]: ResponseInProgressEvent$inboundSchema,
478
+ ["response.completed"]: ResponseCompletedEvent$inboundSchema,
479
+ ["response.failed"]: ResponseFailedEvent$inboundSchema,
480
+ ["response.incomplete"]: ResponseIncompleteEvent$inboundSchema,
481
+ ["response.queued"]: ResponseQueuedEvent$inboundSchema,
482
+ ["response.cancelled"]: ResponseCancelledEvent$inboundSchema,
483
+ ["response.output_item.added"]: ResponseOutputItemAddedEvent$inboundSchema,
484
+ ["response.output_item.done"]: ResponseOutputItemDoneEvent$inboundSchema,
485
+ ["response.content_part.added"]: ResponseContentPartAddedEvent$inboundSchema,
486
+ ["response.content_part.done"]: ResponseContentPartDoneEvent$inboundSchema,
487
+ ["response.output_text.delta"]: ResponseOutputTextDeltaEvent$inboundSchema,
488
+ ["response.output_text.done"]: ResponseOutputTextDoneEvent$inboundSchema,
489
+ ["response.refusal.delta"]: ResponseRefusalDeltaEvent$inboundSchema,
490
+ ["response.refusal.done"]: ResponseRefusalDoneEvent$inboundSchema,
491
+ ["response.function_call_arguments.delta"]:
492
+ ResponseFunctionCallArgumentsDeltaEvent$inboundSchema,
493
+ ["response.function_call_arguments.done"]:
494
+ ResponseFunctionCallArgumentsDoneEvent$inboundSchema,
495
+ ["response.file_search_call.in_progress"]:
496
+ ResponseFileSearchCallInProgressEvent$inboundSchema,
497
+ ["response.file_search_call.searching"]:
498
+ ResponseFileSearchCallSearchingEvent$inboundSchema,
499
+ ["response.file_search_call.completed"]:
500
+ ResponseFileSearchCallCompletedEvent$inboundSchema,
501
+ ["response.web_search_call.in_progress"]:
502
+ ResponseWebSearchCallInProgressEvent$inboundSchema,
503
+ ["response.web_search_call.searching"]:
504
+ ResponseWebSearchCallSearchingEvent$inboundSchema,
505
+ ["response.web_search_call.completed"]:
506
+ ResponseWebSearchCallCompletedEvent$inboundSchema,
507
+ ["response.history_call.in_progress"]:
508
+ ResponseHistoryCallInProgressEvent$inboundSchema,
509
+ ["response.history_call.searching"]:
510
+ ResponseHistoryCallSearchingEvent$inboundSchema,
511
+ ["response.history_call.completed"]:
512
+ ResponseHistoryCallCompletedEvent$inboundSchema,
513
+ ["response.sleep_call.in_progress"]:
514
+ ResponseSleepCallInProgressEvent$inboundSchema,
515
+ ["response.sleep_call.sleeping"]:
516
+ ResponseSleepCallSleepingEvent$inboundSchema,
517
+ ["response.sleep_call.completed"]:
518
+ ResponseSleepCallCompletedEvent$inboundSchema,
519
+ ["response.tool_search_call.in_progress"]:
520
+ ResponseToolSearchCallInProgressEvent$inboundSchema,
521
+ ["response.tool_search_call.searching"]:
522
+ ResponseToolSearchCallSearchingEvent$inboundSchema,
523
+ ["response.tool_search_call.completed"]:
524
+ ResponseToolSearchCallCompletedEvent$inboundSchema,
525
+ ["response.reasoning_summary_part.added"]:
526
+ ResponseReasoningSummaryPartAddedEvent$inboundSchema,
527
+ ["response.reasoning_summary_part.done"]:
528
+ ResponseReasoningSummaryPartDoneEvent$inboundSchema,
529
+ ["response.reasoning_summary_text.delta"]:
530
+ ResponseReasoningSummaryTextDeltaEvent$inboundSchema,
531
+ ["response.reasoning_summary_text.done"]:
532
+ ResponseReasoningSummaryTextDoneEvent$inboundSchema,
533
+ ["response.reasoning_text.delta"]:
534
+ ResponseReasoningTextDeltaEvent$inboundSchema,
535
+ ["response.reasoning_text.done"]:
536
+ ResponseReasoningTextDoneEvent$inboundSchema,
537
+ ["response.image_generation_call.in_progress"]:
538
+ ResponseImageGenerationCallInProgressEvent$inboundSchema,
539
+ ["response.image_generation_call.generating"]:
540
+ ResponseImageGenerationCallGeneratingEvent$inboundSchema,
541
+ ["response.image_generation_call.completed"]:
542
+ ResponseImageGenerationCallCompletedEvent$inboundSchema,
543
+ ["response.image_generation_call.partial_image"]:
544
+ ResponseImageGenerationCallPartialImageEvent$inboundSchema,
545
+ ["response.mcp_call_arguments.delta"]:
546
+ ResponseMCPCallArgumentsDeltaEvent$inboundSchema,
547
+ ["response.mcp_call_arguments.done"]:
548
+ ResponseMCPCallArgumentsDoneEvent$inboundSchema,
549
+ ["response.mcp_call.in_progress"]:
550
+ ResponseMCPCallInProgressEvent$inboundSchema,
551
+ ["response.mcp_call.completed"]: ResponseMCPCallCompletedEvent$inboundSchema,
552
+ ["response.mcp_call.failed"]: ResponseMCPCallFailedEvent$inboundSchema,
553
+ ["response.mcp_list_tools.in_progress"]:
554
+ ResponseMCPListToolsInProgressEvent$inboundSchema,
555
+ ["response.mcp_list_tools.completed"]:
556
+ ResponseMCPListToolsCompletedEvent$inboundSchema,
557
+ ["response.mcp_list_tools.failed"]:
558
+ ResponseMCPListToolsFailedEvent$inboundSchema,
559
+ ["response.read_file_call.in_progress"]:
560
+ ResponseReadFileCallInProgressEvent$inboundSchema,
561
+ ["response.read_file_call.reading"]:
562
+ ResponseReadFileCallReadingEvent$inboundSchema,
563
+ ["response.read_file_call.completed"]:
564
+ ResponseReadFileCallCompletedEvent$inboundSchema,
565
+ ["response.code_interpreter_call.in_progress"]:
566
+ ResponseCodeInterpreterCallInProgressEvent$inboundSchema,
567
+ ["response.code_interpreter_call.interpreting"]:
568
+ ResponseCodeInterpreterCallInterpretingEvent$inboundSchema,
569
+ ["response.code_interpreter_call.completed"]:
570
+ ResponseCodeInterpreterCallCompletedEvent$inboundSchema,
571
+ ["response.code_interpreter_call_code.delta"]:
572
+ ResponseCodeInterpreterCallCodeDeltaEvent$inboundSchema,
573
+ ["response.code_interpreter_call_code.done"]:
574
+ ResponseCodeInterpreterCallCodeDoneEvent$inboundSchema,
575
+ ["response.shell_call.in_progress"]:
576
+ ResponseShellCallInProgressEvent$inboundSchema,
577
+ ["response.shell_call.executing"]:
578
+ ResponseShellCallExecutingEvent$inboundSchema,
579
+ ["response.shell_call.completed"]:
580
+ ResponseShellCallCompletedEvent$inboundSchema,
581
+ ["response.custom_tool_call_input.delta"]:
582
+ ResponseCustomToolCallInputDeltaEvent$inboundSchema,
583
+ ["response.custom_tool_call_input.done"]:
584
+ ResponseCustomToolCallInputDoneEvent$inboundSchema,
585
+ ["response.output_text.annotation.added"]:
586
+ ResponseOutputTextAnnotationAddedEvent$inboundSchema,
587
+ error: ErrorEvent$inboundSchema,
588
+ });
539
589
  /** @internal */
540
590
  export type ResponseStreamingEvent$Outbound =
541
591
  | ResponseCreatedEvent$Outbound
@@ -56,6 +56,7 @@ export type SessionRecord = {
56
56
  resourceClass?: SandboxResourceClass | null | undefined;
57
57
  assignmentGeneration?: number | undefined;
58
58
  managedServices?: Array<ManagedServiceRecord> | undefined;
59
+ githubRepositoryManifestVersion?: number | null | undefined;
59
60
  ttlSeconds?: number | undefined;
60
61
  workspaceExpiresAt?: Date | null | undefined;
61
62
  sandboxFeatures?: Array<SandboxFeature> | undefined;
@@ -84,6 +85,7 @@ export const SessionRecord$inboundSchema: z.ZodType<
84
85
  resource_class: z.nullable(SandboxResourceClass$inboundSchema).optional(),
85
86
  assignment_generation: z.number().int().default(1),
86
87
  managed_services: z.array(ManagedServiceRecord$inboundSchema).optional(),
88
+ github_repository_manifest_version: z.nullable(z.number().int()).optional(),
87
89
  ttl_seconds: z.number().int().default(600),
88
90
  workspace_expires_at: z.nullable(
89
91
  z.string().datetime({ offset: true }).transform(v => new Date(v)),
@@ -109,6 +111,7 @@ export const SessionRecord$inboundSchema: z.ZodType<
109
111
  "resource_class": "resourceClass",
110
112
  "assignment_generation": "assignmentGeneration",
111
113
  "managed_services": "managedServices",
114
+ "github_repository_manifest_version": "githubRepositoryManifestVersion",
112
115
  "ttl_seconds": "ttlSeconds",
113
116
  "workspace_expires_at": "workspaceExpiresAt",
114
117
  "sandbox_features": "sandboxFeatures",
@@ -132,6 +135,7 @@ export type SessionRecord$Outbound = {
132
135
  resource_class?: string | null | undefined;
133
136
  assignment_generation: number;
134
137
  managed_services?: Array<ManagedServiceRecord$Outbound> | undefined;
138
+ github_repository_manifest_version?: number | null | undefined;
135
139
  ttl_seconds: number;
136
140
  workspace_expires_at?: string | null | undefined;
137
141
  sandbox_features?: Array<string> | undefined;
@@ -160,6 +164,7 @@ export const SessionRecord$outboundSchema: z.ZodType<
160
164
  resourceClass: z.nullable(SandboxResourceClass$outboundSchema).optional(),
161
165
  assignmentGeneration: z.number().int().default(1),
162
166
  managedServices: z.array(ManagedServiceRecord$outboundSchema).optional(),
167
+ githubRepositoryManifestVersion: z.nullable(z.number().int()).optional(),
163
168
  ttlSeconds: z.number().int().default(600),
164
169
  workspaceExpiresAt: z.nullable(z.date().transform(v => v.toISOString()))
165
170
  .optional(),
@@ -182,6 +187,7 @@ export const SessionRecord$outboundSchema: z.ZodType<
182
187
  resourceClass: "resource_class",
183
188
  assignmentGeneration: "assignment_generation",
184
189
  managedServices: "managed_services",
190
+ githubRepositoryManifestVersion: "github_repository_manifest_version",
185
191
  ttlSeconds: "ttl_seconds",
186
192
  workspaceExpiresAt: "workspace_expires_at",
187
193
  sandboxFeatures: "sandbox_features",
@@ -4,6 +4,8 @@
4
4
 
5
5
  import * as z from "zod/v3";
6
6
  import { safeParse } from "../../lib/schemas.js";
7
+ import * as discriminatedUnionTypes from "../../types/discriminatedUnion.js";
8
+ import { discriminatedUnion } from "../../types/discriminatedUnion.js";
7
9
  import { Result as SafeParseResult } from "../../types/fp.js";
8
10
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
9
11
  import {
@@ -21,17 +23,18 @@ import {
21
23
 
22
24
  export type ShellEnvironment =
23
25
  | ShellEnvironmentContainerAuto
24
- | ShellEnvironmentContainerReference;
26
+ | ShellEnvironmentContainerReference
27
+ | discriminatedUnionTypes.Unknown<"type">;
25
28
 
26
29
  /** @internal */
27
30
  export const ShellEnvironment$inboundSchema: z.ZodType<
28
31
  ShellEnvironment,
29
32
  z.ZodTypeDef,
30
33
  unknown
31
- > = z.union([
32
- ShellEnvironmentContainerAuto$inboundSchema,
33
- ShellEnvironmentContainerReference$inboundSchema,
34
- ]);
34
+ > = discriminatedUnion("type", {
35
+ container_auto: ShellEnvironmentContainerAuto$inboundSchema,
36
+ container_reference: ShellEnvironmentContainerReference$inboundSchema,
37
+ });
35
38
  /** @internal */
36
39
  export type ShellEnvironment$Outbound =
37
40
  | ShellEnvironmentContainerAuto$Outbound
@@ -4,6 +4,8 @@
4
4
 
5
5
  import * as z from "zod/v3";
6
6
  import { safeParse } from "../../lib/schemas.js";
7
+ import * as discriminatedUnionTypes from "../../types/discriminatedUnion.js";
8
+ import { discriminatedUnion } from "../../types/discriminatedUnion.js";
7
9
  import { Result as SafeParseResult } from "../../types/fp.js";
8
10
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
9
11
  import {
@@ -19,17 +21,20 @@ import {
19
21
  SkillReference$outboundSchema,
20
22
  } from "./skillreference.js";
21
23
 
22
- export type SkillEntry = SkillReference | PreconfiguredSkillReference;
24
+ export type SkillEntry =
25
+ | SkillReference
26
+ | PreconfiguredSkillReference
27
+ | discriminatedUnionTypes.Unknown<"type">;
23
28
 
24
29
  /** @internal */
25
30
  export const SkillEntry$inboundSchema: z.ZodType<
26
31
  SkillEntry,
27
32
  z.ZodTypeDef,
28
33
  unknown
29
- > = z.union([
30
- SkillReference$inboundSchema,
31
- PreconfiguredSkillReference$inboundSchema,
32
- ]);
34
+ > = discriminatedUnion("type", {
35
+ skill_reference: SkillReference$inboundSchema,
36
+ preconfigured: PreconfiguredSkillReference$inboundSchema,
37
+ });
33
38
  /** @internal */
34
39
  export type SkillEntry$Outbound =
35
40
  | SkillReference$Outbound
@@ -5,6 +5,8 @@
5
5
  import * as z from "zod/v3";
6
6
  import { remap as remap$ } from "../../lib/primitives.js";
7
7
  import { safeParse } from "../../lib/schemas.js";
8
+ import * as discriminatedUnionTypes from "../../types/discriminatedUnion.js";
9
+ import { discriminatedUnion } from "../../types/discriminatedUnion.js";
8
10
  import { ClosedEnum } from "../../types/enums.js";
9
11
  import { Result as SafeParseResult } from "../../types/fp.js";
10
12
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
@@ -83,11 +85,18 @@ export type Environment1 = {
83
85
  memoryStores?: Array<MemoryStores> | undefined;
84
86
  };
85
87
 
86
- export type Environment = Environment1 | Environment2;
88
+ export type Environment =
89
+ | Environment1
90
+ | Environment2
91
+ | discriminatedUnionTypes.Unknown<"type">;
87
92
 
88
93
  export type Seven = {
89
94
  type: ToolDefinition7Type;
90
- environment?: Environment1 | Environment2 | undefined;
95
+ environment?:
96
+ | Environment1
97
+ | Environment2
98
+ | discriminatedUnionTypes.Unknown<"type">
99
+ | undefined;
91
100
  };
92
101
 
93
102
  export const ToolDefinition6Type = {
@@ -124,7 +133,8 @@ export type ToolDefinition4Filters =
124
133
  | (FileSearchComparisonFilter & { type: "lt" })
125
134
  | (FileSearchComparisonFilter & { type: "lte" })
126
135
  | (FileSearchCompoundFilter & { type: "and" })
127
- | (FileSearchCompoundFilter & { type: "or" });
136
+ | (FileSearchCompoundFilter & { type: "or" })
137
+ | discriminatedUnionTypes.Unknown<"type">;
128
138
 
129
139
  export type ToolDefinitionRankingOptions = {
130
140
  ranker?: string | undefined;
@@ -143,6 +153,7 @@ export type ToolDefinition4 = {
143
153
  | (FileSearchComparisonFilter & { type: "lte" })
144
154
  | (FileSearchCompoundFilter & { type: "and" })
145
155
  | (FileSearchCompoundFilter & { type: "or" })
156
+ | discriminatedUnionTypes.Unknown<"type">
146
157
  | undefined;
147
158
  maxNumResults?: number | undefined;
148
159
  rankingOptions?: ToolDefinitionRankingOptions | undefined;
@@ -549,10 +560,10 @@ export const Environment$inboundSchema: z.ZodType<
549
560
  Environment,
550
561
  z.ZodTypeDef,
551
562
  unknown
552
- > = z.union([
553
- z.lazy(() => Environment1$inboundSchema),
554
- z.lazy(() => Environment2$inboundSchema),
555
- ]);
563
+ > = discriminatedUnion("type", {
564
+ container_auto: z.lazy(() => Environment1$inboundSchema),
565
+ container_reference: z.lazy(() => Environment2$inboundSchema),
566
+ });
556
567
  /** @internal */
557
568
  export type Environment$Outbound =
558
569
  | Environment1$Outbound
@@ -585,10 +596,10 @@ export function environmentFromJSON(
585
596
  export const Seven$inboundSchema: z.ZodType<Seven, z.ZodTypeDef, unknown> = z
586
597
  .object({
587
598
  type: ToolDefinition7Type$inboundSchema,
588
- environment: z.union([
589
- z.lazy(() => Environment1$inboundSchema),
590
- z.lazy(() => Environment2$inboundSchema),
591
- ]).optional(),
599
+ environment: discriminatedUnion("type", {
600
+ container_auto: z.lazy(() => Environment1$inboundSchema),
601
+ container_reference: z.lazy(() => Environment2$inboundSchema),
602
+ }).optional(),
592
603
  });
593
604
  /** @internal */
594
605
  export type Seven$Outbound = {
@@ -728,32 +739,32 @@ export const ToolDefinition4Filters$inboundSchema: z.ZodType<
728
739
  ToolDefinition4Filters,
729
740
  z.ZodTypeDef,
730
741
  unknown
731
- > = z.union([
732
- FileSearchComparisonFilter$inboundSchema.and(
742
+ > = discriminatedUnion("type", {
743
+ eq: FileSearchComparisonFilter$inboundSchema.and(
733
744
  z.object({ type: z.literal("eq") }),
734
745
  ),
735
- FileSearchComparisonFilter$inboundSchema.and(
746
+ ne: FileSearchComparisonFilter$inboundSchema.and(
736
747
  z.object({ type: z.literal("ne") }),
737
748
  ),
738
- FileSearchComparisonFilter$inboundSchema.and(
749
+ gt: FileSearchComparisonFilter$inboundSchema.and(
739
750
  z.object({ type: z.literal("gt") }),
740
751
  ),
741
- FileSearchComparisonFilter$inboundSchema.and(
752
+ gte: FileSearchComparisonFilter$inboundSchema.and(
742
753
  z.object({ type: z.literal("gte") }),
743
754
  ),
744
- FileSearchComparisonFilter$inboundSchema.and(
755
+ lt: FileSearchComparisonFilter$inboundSchema.and(
745
756
  z.object({ type: z.literal("lt") }),
746
757
  ),
747
- FileSearchComparisonFilter$inboundSchema.and(
758
+ lte: FileSearchComparisonFilter$inboundSchema.and(
748
759
  z.object({ type: z.literal("lte") }),
749
760
  ),
750
- FileSearchCompoundFilter$inboundSchema.and(
761
+ and: FileSearchCompoundFilter$inboundSchema.and(
751
762
  z.object({ type: z.literal("and") }),
752
763
  ),
753
- FileSearchCompoundFilter$inboundSchema.and(
764
+ or: FileSearchCompoundFilter$inboundSchema.and(
754
765
  z.object({ type: z.literal("or") }),
755
766
  ),
756
- ]);
767
+ });
757
768
  /** @internal */
758
769
  export type ToolDefinition4Filters$Outbound =
759
770
  | (FileSearchComparisonFilter$Outbound & { type: "eq" })
@@ -874,32 +885,32 @@ export const ToolDefinition4$inboundSchema: z.ZodType<
874
885
  > = z.object({
875
886
  type: ToolDefinition4Type$inboundSchema,
876
887
  vector_store_ids: z.array(z.string()),
877
- filters: z.union([
878
- FileSearchComparisonFilter$inboundSchema.and(
888
+ filters: discriminatedUnion("type", {
889
+ eq: FileSearchComparisonFilter$inboundSchema.and(
879
890
  z.object({ type: z.literal("eq") }),
880
891
  ),
881
- FileSearchComparisonFilter$inboundSchema.and(
892
+ ne: FileSearchComparisonFilter$inboundSchema.and(
882
893
  z.object({ type: z.literal("ne") }),
883
894
  ),
884
- FileSearchComparisonFilter$inboundSchema.and(
895
+ gt: FileSearchComparisonFilter$inboundSchema.and(
885
896
  z.object({ type: z.literal("gt") }),
886
897
  ),
887
- FileSearchComparisonFilter$inboundSchema.and(
898
+ gte: FileSearchComparisonFilter$inboundSchema.and(
888
899
  z.object({ type: z.literal("gte") }),
889
900
  ),
890
- FileSearchComparisonFilter$inboundSchema.and(
901
+ lt: FileSearchComparisonFilter$inboundSchema.and(
891
902
  z.object({ type: z.literal("lt") }),
892
903
  ),
893
- FileSearchComparisonFilter$inboundSchema.and(
904
+ lte: FileSearchComparisonFilter$inboundSchema.and(
894
905
  z.object({ type: z.literal("lte") }),
895
906
  ),
896
- FileSearchCompoundFilter$inboundSchema.and(
907
+ and: FileSearchCompoundFilter$inboundSchema.and(
897
908
  z.object({ type: z.literal("and") }),
898
909
  ),
899
- FileSearchCompoundFilter$inboundSchema.and(
910
+ or: FileSearchCompoundFilter$inboundSchema.and(
900
911
  z.object({ type: z.literal("or") }),
901
912
  ),
902
- ]).optional(),
913
+ }).optional(),
903
914
  max_num_results: z.number().int().optional(),
904
915
  ranking_options: z.lazy(() => ToolDefinitionRankingOptions$inboundSchema)
905
916
  .optional(),
@@ -4,6 +4,8 @@
4
4
 
5
5
  import * as z from "zod/v3";
6
6
  import { safeParse } from "../../lib/schemas.js";
7
+ import * as discriminatedUnionTypes from "../../types/discriminatedUnion.js";
8
+ import { discriminatedUnion } from "../../types/discriminatedUnion.js";
7
9
  import { Result as SafeParseResult } from "../../types/fp.js";
8
10
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
9
11
  import {
@@ -25,18 +27,22 @@ import {
25
27
  SearchAction$outboundSchema,
26
28
  } from "./searchaction.js";
27
29
 
28
- export type WebSearchAction = SearchAction | OpenPageAction | FindAction;
30
+ export type WebSearchAction =
31
+ | SearchAction
32
+ | OpenPageAction
33
+ | FindAction
34
+ | discriminatedUnionTypes.Unknown<"type">;
29
35
 
30
36
  /** @internal */
31
37
  export const WebSearchAction$inboundSchema: z.ZodType<
32
38
  WebSearchAction,
33
39
  z.ZodTypeDef,
34
40
  unknown
35
- > = z.union([
36
- SearchAction$inboundSchema,
37
- OpenPageAction$inboundSchema,
38
- FindAction$inboundSchema,
39
- ]);
41
+ > = discriminatedUnion("type", {
42
+ search: SearchAction$inboundSchema,
43
+ open_page: OpenPageAction$inboundSchema,
44
+ find: FindAction$inboundSchema,
45
+ });
40
46
  /** @internal */
41
47
  export type WebSearchAction$Outbound =
42
48
  | SearchAction$Outbound
@@ -5,6 +5,8 @@
5
5
  import * as z from "zod/v3";
6
6
  import { remap as remap$ } from "../../lib/primitives.js";
7
7
  import { safeParse } from "../../lib/schemas.js";
8
+ import * as discriminatedUnionTypes from "../../types/discriminatedUnion.js";
9
+ import { discriminatedUnion } from "../../types/discriminatedUnion.js";
8
10
  import { Result as SafeParseResult } from "../../types/fp.js";
9
11
  import * as components from "../components/index.js";
10
12
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
@@ -45,7 +47,11 @@ export type One = {
45
47
  /**
46
48
  * OK
47
49
  */
48
- export type CreateChatCompletionStreamResponseBody = One | Two | Three;
50
+ export type CreateChatCompletionStreamResponseBody =
51
+ | One
52
+ | Two
53
+ | Three
54
+ | discriminatedUnionTypes.Unknown<"event">;
49
55
 
50
56
  /** @internal */
51
57
  export const CreateChatCompletionStreamRequest$inboundSchema: z.ZodType<
@@ -234,11 +240,11 @@ export const CreateChatCompletionStreamResponseBody$inboundSchema: z.ZodType<
234
240
  CreateChatCompletionStreamResponseBody,
235
241
  z.ZodTypeDef,
236
242
  unknown
237
- > = z.union([
238
- z.lazy(() => One$inboundSchema),
239
- z.lazy(() => Two$inboundSchema),
240
- z.lazy(() => Three$inboundSchema),
241
- ]);
243
+ > = discriminatedUnion("event", {
244
+ message: z.lazy(() => One$inboundSchema),
245
+ done: z.lazy(() => Two$inboundSchema),
246
+ error: z.lazy(() => Three$inboundSchema),
247
+ });
242
248
  /** @internal */
243
249
  export type CreateChatCompletionStreamResponseBody$Outbound =
244
250
  | One$Outbound
@@ -33,7 +33,7 @@ export type Purpose = ClosedEnum<typeof Purpose>;
33
33
 
34
34
  export type UploadFileRequestBody = {
35
35
  /**
36
- * The file to upload
36
+ * The file to upload. Multipart file parts must include a nonblank filename; the lowercase WHATWG placeholder filename "blob" is treated as missing.
37
37
  */
38
38
  file: FileT | Blob;
39
39
  /**