@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
@@ -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 { ClosedEnum } from "../../types/enums.js";
8
10
  import { Result as SafeParseResult } from "../../types/fp.js";
9
11
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
@@ -22,7 +24,8 @@ import {
22
24
 
23
25
  export type OutputMessageContent =
24
26
  | (OutputText & { type: "output_text" })
25
- | (Refusal & { type: "refusal" });
27
+ | (Refusal & { type: "refusal" })
28
+ | discriminatedUnionTypes.Unknown<"type">;
26
29
 
27
30
  /**
28
31
  * The processing status of this message (in_progress, completed, or incomplete).
@@ -69,7 +72,9 @@ export type OutputMessage = {
69
72
  * Array of content items in the assistant's response. Can contain text outputs or refusal messages.
70
73
  */
71
74
  content: Array<
72
- (OutputText & { type: "output_text" }) | (Refusal & { type: "refusal" })
75
+ | (OutputText & { type: "output_text" })
76
+ | (Refusal & { type: "refusal" })
77
+ | discriminatedUnionTypes.Unknown<"type">
73
78
  >;
74
79
  /**
75
80
  * The processing status of this message (in_progress, completed, or incomplete).
@@ -86,10 +91,12 @@ export const OutputMessageContent$inboundSchema: z.ZodType<
86
91
  OutputMessageContent,
87
92
  z.ZodTypeDef,
88
93
  unknown
89
- > = z.union([
90
- OutputText$inboundSchema.and(z.object({ type: z.literal("output_text") })),
91
- Refusal$inboundSchema.and(z.object({ type: z.literal("refusal") })),
92
- ]);
94
+ > = discriminatedUnion("type", {
95
+ output_text: OutputText$inboundSchema.and(
96
+ z.object({ type: z.literal("output_text") }),
97
+ ),
98
+ refusal: Refusal$inboundSchema.and(z.object({ type: z.literal("refusal") })),
99
+ });
93
100
  /** @internal */
94
101
  export type OutputMessageContent$Outbound =
95
102
  | (OutputText$Outbound & { type: "output_text" })
@@ -149,12 +156,14 @@ export const OutputMessage$inboundSchema: z.ZodType<
149
156
  id: z.string(),
150
157
  role: z.literal("assistant"),
151
158
  content: z.array(
152
- z.union([
153
- OutputText$inboundSchema.and(
159
+ discriminatedUnion("type", {
160
+ output_text: OutputText$inboundSchema.and(
154
161
  z.object({ type: z.literal("output_text") }),
155
162
  ),
156
- Refusal$inboundSchema.and(z.object({ type: z.literal("refusal") })),
157
- ]),
163
+ refusal: Refusal$inboundSchema.and(
164
+ z.object({ type: z.literal("refusal") }),
165
+ ),
166
+ }),
158
167
  ),
159
168
  status: OutputMessageStatus$inboundSchema,
160
169
  phase: Phase$inboundSchema.optional(),
@@ -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";
@@ -23,7 +25,8 @@ import {
23
25
 
24
26
  export type OutputMessageWithIdContent =
25
27
  | (OutputText & { type: "output_text" })
26
- | (Refusal & { type: "refusal" });
28
+ | (Refusal & { type: "refusal" })
29
+ | discriminatedUnionTypes.Unknown<"type">;
27
30
 
28
31
  /**
29
32
  * The processing status of this message (in_progress, completed, or incomplete).
@@ -74,7 +77,9 @@ export type OutputMessageWithId = {
74
77
  * Array of content items in the assistant's response. Can contain text outputs or refusal messages.
75
78
  */
76
79
  content: Array<
77
- (OutputText & { type: "output_text" }) | (Refusal & { type: "refusal" })
80
+ | (OutputText & { type: "output_text" })
81
+ | (Refusal & { type: "refusal" })
82
+ | discriminatedUnionTypes.Unknown<"type">
78
83
  >;
79
84
  /**
80
85
  * The processing status of this message (in_progress, completed, or incomplete).
@@ -99,10 +104,12 @@ export const OutputMessageWithIdContent$inboundSchema: z.ZodType<
99
104
  OutputMessageWithIdContent,
100
105
  z.ZodTypeDef,
101
106
  unknown
102
- > = z.union([
103
- OutputText$inboundSchema.and(z.object({ type: z.literal("output_text") })),
104
- Refusal$inboundSchema.and(z.object({ type: z.literal("refusal") })),
105
- ]);
107
+ > = discriminatedUnion("type", {
108
+ output_text: OutputText$inboundSchema.and(
109
+ z.object({ type: z.literal("output_text") }),
110
+ ),
111
+ refusal: Refusal$inboundSchema.and(z.object({ type: z.literal("refusal") })),
112
+ });
106
113
  /** @internal */
107
114
  export type OutputMessageWithIdContent$Outbound =
108
115
  | (OutputText$Outbound & { type: "output_text" })
@@ -163,12 +170,14 @@ export const OutputMessageWithId$inboundSchema: z.ZodType<
163
170
  id: z.string(),
164
171
  role: z.literal("assistant"),
165
172
  content: z.array(
166
- z.union([
167
- OutputText$inboundSchema.and(
173
+ discriminatedUnion("type", {
174
+ output_text: OutputText$inboundSchema.and(
168
175
  z.object({ type: z.literal("output_text") }),
169
176
  ),
170
- Refusal$inboundSchema.and(z.object({ type: z.literal("refusal") })),
171
- ]),
177
+ refusal: Refusal$inboundSchema.and(
178
+ z.object({ type: z.literal("refusal") }),
179
+ ),
180
+ }),
172
181
  ),
173
182
  status: OutputMessageWithIdStatus$inboundSchema,
174
183
  phase: OutputMessageWithIdPhase$inboundSchema.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 {
@@ -41,7 +43,8 @@ export type Annotations =
41
43
  | FileCitation
42
44
  | URLCitation
43
45
  | ContainerFileCitation
44
- | FilePath;
46
+ | FilePath
47
+ | discriminatedUnionTypes.Unknown<"type">;
45
48
 
46
49
  /**
47
50
  * Text content output from the model with optional annotations for citations and file references.
@@ -59,7 +62,13 @@ export type OutputText = {
59
62
  * Array of annotations providing citations and references for the text. Used to attribute sources and reference files mentioned in the output.
60
63
  */
61
64
  annotations?:
62
- | Array<FileCitation | URLCitation | ContainerFileCitation | FilePath>
65
+ | Array<
66
+ | FileCitation
67
+ | URLCitation
68
+ | ContainerFileCitation
69
+ | FilePath
70
+ | discriminatedUnionTypes.Unknown<"type">
71
+ >
63
72
  | undefined;
64
73
  logprobs?: Array<LogProb> | undefined;
65
74
  };
@@ -69,12 +78,12 @@ export const Annotations$inboundSchema: z.ZodType<
69
78
  Annotations,
70
79
  z.ZodTypeDef,
71
80
  unknown
72
- > = z.union([
73
- FileCitation$inboundSchema,
74
- URLCitation$inboundSchema,
75
- ContainerFileCitation$inboundSchema,
76
- FilePath$inboundSchema,
77
- ]);
81
+ > = discriminatedUnion("type", {
82
+ file_citation: FileCitation$inboundSchema,
83
+ url_citation: URLCitation$inboundSchema,
84
+ container_file_citation: ContainerFileCitation$inboundSchema,
85
+ file_path: FilePath$inboundSchema,
86
+ });
78
87
  /** @internal */
79
88
  export type Annotations$Outbound =
80
89
  | FileCitation$Outbound
@@ -115,14 +124,12 @@ export const OutputText$inboundSchema: z.ZodType<
115
124
  > = z.object({
116
125
  type: z.literal("output_text"),
117
126
  text: z.string(),
118
- annotations: z.array(
119
- z.union([
120
- FileCitation$inboundSchema,
121
- URLCitation$inboundSchema,
122
- ContainerFileCitation$inboundSchema,
123
- FilePath$inboundSchema,
124
- ]),
125
- ).optional(),
127
+ annotations: z.array(discriminatedUnion("type", {
128
+ file_citation: FileCitation$inboundSchema,
129
+ url_citation: URLCitation$inboundSchema,
130
+ container_file_citation: ContainerFileCitation$inboundSchema,
131
+ file_path: FilePath$inboundSchema,
132
+ })).optional(),
126
133
  logprobs: z.array(LogProb$inboundSchema).optional(),
127
134
  });
128
135
  /** @internal */
@@ -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 { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
12
  import {
@@ -29,7 +31,8 @@ import {
29
31
  export type Part =
30
32
  | (OutputText & { type: "output_text" })
31
33
  | (Refusal & { type: "refusal" })
32
- | (ReasoningText & { type: "reasoning_text" });
34
+ | (ReasoningText & { type: "reasoning_text" })
35
+ | discriminatedUnionTypes.Unknown<"type">;
33
36
 
34
37
  export type ResponseContentPartAddedEvent = {
35
38
  type: "response.content_part.added";
@@ -40,18 +43,23 @@ export type ResponseContentPartAddedEvent = {
40
43
  part:
41
44
  | (OutputText & { type: "output_text" })
42
45
  | (Refusal & { type: "refusal" })
43
- | (ReasoningText & { type: "reasoning_text" });
46
+ | (ReasoningText & { type: "reasoning_text" })
47
+ | discriminatedUnionTypes.Unknown<"type">;
44
48
  };
45
49
 
46
50
  /** @internal */
47
- export const Part$inboundSchema: z.ZodType<Part, z.ZodTypeDef, unknown> = z
48
- .union([
49
- OutputText$inboundSchema.and(z.object({ type: z.literal("output_text") })),
50
- Refusal$inboundSchema.and(z.object({ type: z.literal("refusal") })),
51
- ReasoningText$inboundSchema.and(
51
+ export const Part$inboundSchema: z.ZodType<Part, z.ZodTypeDef, unknown> =
52
+ discriminatedUnion("type", {
53
+ output_text: OutputText$inboundSchema.and(
54
+ z.object({ type: z.literal("output_text") }),
55
+ ),
56
+ refusal: Refusal$inboundSchema.and(
57
+ z.object({ type: z.literal("refusal") }),
58
+ ),
59
+ reasoning_text: ReasoningText$inboundSchema.and(
52
60
  z.object({ type: z.literal("reasoning_text") }),
53
61
  ),
54
- ]);
62
+ });
55
63
  /** @internal */
56
64
  export type Part$Outbound =
57
65
  | (OutputText$Outbound & { type: "output_text" })
@@ -92,13 +100,17 @@ export const ResponseContentPartAddedEvent$inboundSchema: z.ZodType<
92
100
  item_id: z.string(),
93
101
  output_index: z.number().int(),
94
102
  content_index: z.number().int(),
95
- part: z.union([
96
- OutputText$inboundSchema.and(z.object({ type: z.literal("output_text") })),
97
- Refusal$inboundSchema.and(z.object({ type: z.literal("refusal") })),
98
- ReasoningText$inboundSchema.and(
103
+ part: discriminatedUnion("type", {
104
+ output_text: OutputText$inboundSchema.and(
105
+ z.object({ type: z.literal("output_text") }),
106
+ ),
107
+ refusal: Refusal$inboundSchema.and(
108
+ z.object({ type: z.literal("refusal") }),
109
+ ),
110
+ reasoning_text: ReasoningText$inboundSchema.and(
99
111
  z.object({ type: z.literal("reasoning_text") }),
100
112
  ),
101
- ]),
113
+ }),
102
114
  }).transform((v) => {
103
115
  return remap$(v, {
104
116
  "sequence_number": "sequenceNumber",
@@ -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 { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
12
  import {
@@ -29,7 +31,8 @@ import {
29
31
  export type ResponseContentPartDoneEventPart =
30
32
  | (OutputText & { type: "output_text" })
31
33
  | (Refusal & { type: "refusal" })
32
- | (ReasoningText & { type: "reasoning_text" });
34
+ | (ReasoningText & { type: "reasoning_text" })
35
+ | discriminatedUnionTypes.Unknown<"type">;
33
36
 
34
37
  export type ResponseContentPartDoneEvent = {
35
38
  type: "response.content_part.done";
@@ -40,7 +43,8 @@ export type ResponseContentPartDoneEvent = {
40
43
  part:
41
44
  | (OutputText & { type: "output_text" })
42
45
  | (Refusal & { type: "refusal" })
43
- | (ReasoningText & { type: "reasoning_text" });
46
+ | (ReasoningText & { type: "reasoning_text" })
47
+ | discriminatedUnionTypes.Unknown<"type">;
44
48
  };
45
49
 
46
50
  /** @internal */
@@ -48,13 +52,15 @@ export const ResponseContentPartDoneEventPart$inboundSchema: z.ZodType<
48
52
  ResponseContentPartDoneEventPart,
49
53
  z.ZodTypeDef,
50
54
  unknown
51
- > = z.union([
52
- OutputText$inboundSchema.and(z.object({ type: z.literal("output_text") })),
53
- Refusal$inboundSchema.and(z.object({ type: z.literal("refusal") })),
54
- ReasoningText$inboundSchema.and(
55
+ > = discriminatedUnion("type", {
56
+ output_text: OutputText$inboundSchema.and(
57
+ z.object({ type: z.literal("output_text") }),
58
+ ),
59
+ refusal: Refusal$inboundSchema.and(z.object({ type: z.literal("refusal") })),
60
+ reasoning_text: ReasoningText$inboundSchema.and(
55
61
  z.object({ type: z.literal("reasoning_text") }),
56
62
  ),
57
- ]);
63
+ });
58
64
  /** @internal */
59
65
  export type ResponseContentPartDoneEventPart$Outbound =
60
66
  | (OutputText$Outbound & { type: "output_text" })
@@ -104,13 +110,17 @@ export const ResponseContentPartDoneEvent$inboundSchema: z.ZodType<
104
110
  item_id: z.string(),
105
111
  output_index: z.number().int(),
106
112
  content_index: z.number().int(),
107
- part: z.union([
108
- OutputText$inboundSchema.and(z.object({ type: z.literal("output_text") })),
109
- Refusal$inboundSchema.and(z.object({ type: z.literal("refusal") })),
110
- ReasoningText$inboundSchema.and(
113
+ part: discriminatedUnion("type", {
114
+ output_text: OutputText$inboundSchema.and(
115
+ z.object({ type: z.literal("output_text") }),
116
+ ),
117
+ refusal: Refusal$inboundSchema.and(
118
+ z.object({ type: z.literal("refusal") }),
119
+ ),
120
+ reasoning_text: ReasoningText$inboundSchema.and(
111
121
  z.object({ type: z.literal("reasoning_text") }),
112
122
  ),
113
- ]),
123
+ }),
114
124
  }).transform((v) => {
115
125
  return remap$(v, {
116
126
  "sequence_number": "sequenceNumber",
@@ -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 {
@@ -28,18 +30,19 @@ import {
28
30
  export type ResponseFormat =
29
31
  | TextResponseFormat
30
32
  | JSONSchemaResponseFormat
31
- | JSONObjectResponseFormat;
33
+ | JSONObjectResponseFormat
34
+ | discriminatedUnionTypes.Unknown<"type">;
32
35
 
33
36
  /** @internal */
34
37
  export const ResponseFormat$inboundSchema: z.ZodType<
35
38
  ResponseFormat,
36
39
  z.ZodTypeDef,
37
40
  unknown
38
- > = z.union([
39
- TextResponseFormat$inboundSchema,
40
- JSONSchemaResponseFormat$inboundSchema,
41
- JSONObjectResponseFormat$inboundSchema,
42
- ]);
41
+ > = discriminatedUnion("type", {
42
+ text: TextResponseFormat$inboundSchema,
43
+ json_schema: JSONSchemaResponseFormat$inboundSchema,
44
+ json_object: JSONObjectResponseFormat$inboundSchema,
45
+ });
43
46
  /** @internal */
44
47
  export type ResponseFormat$Outbound =
45
48
  | TextResponseFormat$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";
@@ -197,7 +199,8 @@ export type FiltersFilters =
197
199
  | (ComparisonFilter & { type: "lt" })
198
200
  | (ComparisonFilter & { type: "lte" })
199
201
  | (ResponseObjectFilters2 & { type: "and" })
200
- | (ResponseObjectFilters2 & { type: "or" });
202
+ | (ResponseObjectFilters2 & { type: "or" })
203
+ | discriminatedUnionTypes.Unknown<"type">;
201
204
 
202
205
  export type Filters2 = {
203
206
  type: FiltersType;
@@ -210,6 +213,7 @@ export type Filters2 = {
210
213
  | (ComparisonFilter & { type: "lte" })
211
214
  | (ResponseObjectFilters2 & { type: "and" })
212
215
  | (ResponseObjectFilters2 & { type: "or" })
216
+ | discriminatedUnionTypes.Unknown<"type">
213
217
  >;
214
218
  };
215
219
 
@@ -221,7 +225,8 @@ export type ToolsFilters =
221
225
  | (ComparisonFilter & { type: "lt" })
222
226
  | (ComparisonFilter & { type: "lte" })
223
227
  | (Filters2 & { type: "and" })
224
- | (Filters2 & { type: "or" });
228
+ | (Filters2 & { type: "or" })
229
+ | discriminatedUnionTypes.Unknown<"type">;
225
230
 
226
231
  /**
227
232
  * File search tool definition: Configures semantic search over one or more vector stores, with optional filters, ranking options, and result limits.
@@ -238,6 +243,7 @@ export type ToolsFileSearchToolDefinition = {
238
243
  | (ComparisonFilter & { type: "lte" })
239
244
  | (Filters2 & { type: "and" })
240
245
  | (Filters2 & { type: "or" })
246
+ | discriminatedUnionTypes.Unknown<"type">
241
247
  | undefined;
242
248
  maxNumResults?: number | undefined;
243
249
  rankingOptions?: RankingOptions | undefined;
@@ -426,20 +432,20 @@ export const FiltersFilters$inboundSchema: z.ZodType<
426
432
  FiltersFilters,
427
433
  z.ZodTypeDef,
428
434
  unknown
429
- > = z.union([
430
- ComparisonFilter$inboundSchema.and(z.object({ type: z.literal("eq") })),
431
- ComparisonFilter$inboundSchema.and(z.object({ type: z.literal("ne") })),
432
- ComparisonFilter$inboundSchema.and(z.object({ type: z.literal("gt") })),
433
- ComparisonFilter$inboundSchema.and(z.object({ type: z.literal("gte") })),
434
- ComparisonFilter$inboundSchema.and(z.object({ type: z.literal("lt") })),
435
- ComparisonFilter$inboundSchema.and(z.object({ type: z.literal("lte") })),
436
- z.lazy(() => ResponseObjectFilters2$inboundSchema).and(
435
+ > = discriminatedUnion("type", {
436
+ eq: ComparisonFilter$inboundSchema.and(z.object({ type: z.literal("eq") })),
437
+ ne: ComparisonFilter$inboundSchema.and(z.object({ type: z.literal("ne") })),
438
+ gt: ComparisonFilter$inboundSchema.and(z.object({ type: z.literal("gt") })),
439
+ gte: ComparisonFilter$inboundSchema.and(z.object({ type: z.literal("gte") })),
440
+ lt: ComparisonFilter$inboundSchema.and(z.object({ type: z.literal("lt") })),
441
+ lte: ComparisonFilter$inboundSchema.and(z.object({ type: z.literal("lte") })),
442
+ and: z.lazy(() => ResponseObjectFilters2$inboundSchema).and(
437
443
  z.object({ type: z.literal("and") }),
438
444
  ),
439
- z.lazy(() => ResponseObjectFilters2$inboundSchema).and(
445
+ or: z.lazy(() => ResponseObjectFilters2$inboundSchema).and(
440
446
  z.object({ type: z.literal("or") }),
441
447
  ),
442
- ]);
448
+ });
443
449
  /** @internal */
444
450
  export type FiltersFilters$Outbound =
445
451
  | (ComparisonFilter$Outbound & { type: "eq" })
@@ -491,22 +497,24 @@ export const Filters2$inboundSchema: z.ZodType<
491
497
  unknown
492
498
  > = z.object({
493
499
  type: FiltersType$inboundSchema,
494
- filters: z.array(
495
- z.union([
496
- ComparisonFilter$inboundSchema.and(z.object({ type: z.literal("eq") })),
497
- ComparisonFilter$inboundSchema.and(z.object({ type: z.literal("ne") })),
498
- ComparisonFilter$inboundSchema.and(z.object({ type: z.literal("gt") })),
499
- ComparisonFilter$inboundSchema.and(z.object({ type: z.literal("gte") })),
500
- ComparisonFilter$inboundSchema.and(z.object({ type: z.literal("lt") })),
501
- ComparisonFilter$inboundSchema.and(z.object({ type: z.literal("lte") })),
502
- z.lazy(() => ResponseObjectFilters2$inboundSchema).and(
503
- z.object({ type: z.literal("and") }),
504
- ),
505
- z.lazy(() => ResponseObjectFilters2$inboundSchema).and(
506
- z.object({ type: z.literal("or") }),
507
- ),
508
- ]),
509
- ),
500
+ filters: z.array(discriminatedUnion("type", {
501
+ eq: ComparisonFilter$inboundSchema.and(z.object({ type: z.literal("eq") })),
502
+ ne: ComparisonFilter$inboundSchema.and(z.object({ type: z.literal("ne") })),
503
+ gt: ComparisonFilter$inboundSchema.and(z.object({ type: z.literal("gt") })),
504
+ gte: ComparisonFilter$inboundSchema.and(
505
+ z.object({ type: z.literal("gte") }),
506
+ ),
507
+ lt: ComparisonFilter$inboundSchema.and(z.object({ type: z.literal("lt") })),
508
+ lte: ComparisonFilter$inboundSchema.and(
509
+ z.object({ type: z.literal("lte") }),
510
+ ),
511
+ and: z.lazy(() => ResponseObjectFilters2$inboundSchema).and(
512
+ z.object({ type: z.literal("and") }),
513
+ ),
514
+ or: z.lazy(() => ResponseObjectFilters2$inboundSchema).and(
515
+ z.object({ type: z.literal("or") }),
516
+ ),
517
+ })),
510
518
  });
511
519
  /** @internal */
512
520
  export type Filters2$Outbound = {
@@ -566,18 +574,20 @@ export const ToolsFilters$inboundSchema: z.ZodType<
566
574
  ToolsFilters,
567
575
  z.ZodTypeDef,
568
576
  unknown
569
- > = z.union([
570
- ComparisonFilter$inboundSchema.and(z.object({ type: z.literal("eq") })),
571
- ComparisonFilter$inboundSchema.and(z.object({ type: z.literal("ne") })),
572
- ComparisonFilter$inboundSchema.and(z.object({ type: z.literal("gt") })),
573
- ComparisonFilter$inboundSchema.and(z.object({ type: z.literal("gte") })),
574
- ComparisonFilter$inboundSchema.and(z.object({ type: z.literal("lt") })),
575
- ComparisonFilter$inboundSchema.and(z.object({ type: z.literal("lte") })),
576
- z.lazy(() => Filters2$inboundSchema).and(
577
+ > = discriminatedUnion("type", {
578
+ eq: ComparisonFilter$inboundSchema.and(z.object({ type: z.literal("eq") })),
579
+ ne: ComparisonFilter$inboundSchema.and(z.object({ type: z.literal("ne") })),
580
+ gt: ComparisonFilter$inboundSchema.and(z.object({ type: z.literal("gt") })),
581
+ gte: ComparisonFilter$inboundSchema.and(z.object({ type: z.literal("gte") })),
582
+ lt: ComparisonFilter$inboundSchema.and(z.object({ type: z.literal("lt") })),
583
+ lte: ComparisonFilter$inboundSchema.and(z.object({ type: z.literal("lte") })),
584
+ and: z.lazy(() => Filters2$inboundSchema).and(
577
585
  z.object({ type: z.literal("and") }),
578
586
  ),
579
- z.lazy(() => Filters2$inboundSchema).and(z.object({ type: z.literal("or") })),
580
- ]);
587
+ or: z.lazy(() => Filters2$inboundSchema).and(
588
+ z.object({ type: z.literal("or") }),
589
+ ),
590
+ });
581
591
  /** @internal */
582
592
  export type ToolsFilters$Outbound =
583
593
  | (ComparisonFilter$Outbound & { type: "eq" })
@@ -630,20 +640,24 @@ export const ToolsFileSearchToolDefinition$inboundSchema: z.ZodType<
630
640
  > = z.object({
631
641
  type: z.literal("file_search"),
632
642
  vector_store_ids: z.array(z.string()),
633
- filters: z.union([
634
- ComparisonFilter$inboundSchema.and(z.object({ type: z.literal("eq") })),
635
- ComparisonFilter$inboundSchema.and(z.object({ type: z.literal("ne") })),
636
- ComparisonFilter$inboundSchema.and(z.object({ type: z.literal("gt") })),
637
- ComparisonFilter$inboundSchema.and(z.object({ type: z.literal("gte") })),
638
- ComparisonFilter$inboundSchema.and(z.object({ type: z.literal("lt") })),
639
- ComparisonFilter$inboundSchema.and(z.object({ type: z.literal("lte") })),
640
- z.lazy(() => Filters2$inboundSchema).and(
643
+ filters: discriminatedUnion("type", {
644
+ eq: ComparisonFilter$inboundSchema.and(z.object({ type: z.literal("eq") })),
645
+ ne: ComparisonFilter$inboundSchema.and(z.object({ type: z.literal("ne") })),
646
+ gt: ComparisonFilter$inboundSchema.and(z.object({ type: z.literal("gt") })),
647
+ gte: ComparisonFilter$inboundSchema.and(
648
+ z.object({ type: z.literal("gte") }),
649
+ ),
650
+ lt: ComparisonFilter$inboundSchema.and(z.object({ type: z.literal("lt") })),
651
+ lte: ComparisonFilter$inboundSchema.and(
652
+ z.object({ type: z.literal("lte") }),
653
+ ),
654
+ and: z.lazy(() => Filters2$inboundSchema).and(
641
655
  z.object({ type: z.literal("and") }),
642
656
  ),
643
- z.lazy(() => Filters2$inboundSchema).and(
657
+ or: z.lazy(() => Filters2$inboundSchema).and(
644
658
  z.object({ type: z.literal("or") }),
645
659
  ),
646
- ]).optional(),
660
+ }).optional(),
647
661
  max_num_results: z.number().int().optional(),
648
662
  ranking_options: RankingOptions$inboundSchema.optional(),
649
663
  }).transform((v) => {