@orq-ai/node 4.1.0-rc.3 → 4.1.0-rc.5

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 (281) hide show
  1. package/bin/mcp-server.js +34865 -37649
  2. package/bin/mcp-server.js.map +77 -55
  3. package/examples/package-lock.json +1 -1
  4. package/jsr.json +1 -1
  5. package/lib/config.d.ts +3 -3
  6. package/lib/config.js +3 -3
  7. package/mcp-server/mcp-server.js +1 -1
  8. package/mcp-server/server.js +1 -1
  9. package/models/components/actionreviewedstreamingevent.d.ts +76 -0
  10. package/models/components/actionreviewedstreamingevent.d.ts.map +1 -0
  11. package/models/components/actionreviewedstreamingevent.js +127 -0
  12. package/models/components/actionreviewedstreamingevent.js.map +1 -0
  13. package/models/components/actionreviewrequestedstreamingevent.d.ts +135 -0
  14. package/models/components/actionreviewrequestedstreamingevent.d.ts.map +1 -0
  15. package/models/components/actionreviewrequestedstreamingevent.js +180 -0
  16. package/models/components/actionreviewrequestedstreamingevent.js.map +1 -0
  17. package/models/components/agenterroredstreamingevent.d.ts +58 -0
  18. package/models/components/agenterroredstreamingevent.d.ts.map +1 -0
  19. package/models/components/agenterroredstreamingevent.js +91 -0
  20. package/models/components/agenterroredstreamingevent.js.map +1 -0
  21. package/models/components/agentexecutionstartedstreamingevent.d.ts +62 -0
  22. package/models/components/agentexecutionstartedstreamingevent.d.ts.map +1 -0
  23. package/models/components/agentexecutionstartedstreamingevent.js +103 -0
  24. package/models/components/agentexecutionstartedstreamingevent.js.map +1 -0
  25. package/models/components/agenthandedoffstreamingevent.d.ts +51 -0
  26. package/models/components/agenthandedoffstreamingevent.d.ts.map +1 -0
  27. package/models/components/agenthandedoffstreamingevent.js +96 -0
  28. package/models/components/agenthandedoffstreamingevent.js.map +1 -0
  29. package/models/components/agentinactivestreamingevent.d.ts +309 -0
  30. package/models/components/agentinactivestreamingevent.d.ts.map +1 -0
  31. package/models/components/agentinactivestreamingevent.js +385 -0
  32. package/models/components/agentinactivestreamingevent.js.map +1 -0
  33. package/models/components/agentmessagecreatedstreamingevent.d.ts +141 -0
  34. package/models/components/agentmessagecreatedstreamingevent.d.ts.map +1 -0
  35. package/models/components/agentmessagecreatedstreamingevent.js +190 -0
  36. package/models/components/agentmessagecreatedstreamingevent.js.map +1 -0
  37. package/models/components/agentstartedstreamingevent.d.ts +382 -0
  38. package/models/components/agentstartedstreamingevent.d.ts.map +1 -0
  39. package/models/components/agentstartedstreamingevent.js +441 -0
  40. package/models/components/agentstartedstreamingevent.js.map +1 -0
  41. package/models/components/agentthoughtstreamingevent.d.ts +542 -0
  42. package/models/components/agentthoughtstreamingevent.d.ts.map +1 -0
  43. package/models/components/agentthoughtstreamingevent.js +626 -0
  44. package/models/components/agentthoughtstreamingevent.js.map +1 -0
  45. package/models/components/datapart.d.ts +41 -0
  46. package/models/components/datapart.d.ts.map +1 -0
  47. package/models/components/datapart.js +69 -0
  48. package/models/components/datapart.js.map +1 -0
  49. package/models/components/errorstreamingevent.d.ts +51 -0
  50. package/models/components/errorstreamingevent.d.ts.map +1 -0
  51. package/models/components/errorstreamingevent.js +87 -0
  52. package/models/components/errorstreamingevent.js.map +1 -0
  53. package/models/components/executionnamedstreamingevent.d.ts +51 -0
  54. package/models/components/executionnamedstreamingevent.d.ts.map +1 -0
  55. package/models/components/executionnamedstreamingevent.js +96 -0
  56. package/models/components/executionnamedstreamingevent.js.map +1 -0
  57. package/models/components/executionreviewedstreamingevent.d.ts +45 -0
  58. package/models/components/executionreviewedstreamingevent.d.ts.map +1 -0
  59. package/models/components/executionreviewedstreamingevent.js +81 -0
  60. package/models/components/executionreviewedstreamingevent.js.map +1 -0
  61. package/models/components/executionreviewrequiredstreamingevent.d.ts +45 -0
  62. package/models/components/executionreviewrequiredstreamingevent.d.ts.map +1 -0
  63. package/models/components/executionreviewrequiredstreamingevent.js +82 -0
  64. package/models/components/executionreviewrequiredstreamingevent.js.map +1 -0
  65. package/models/components/filepart.d.ts +104 -0
  66. package/models/components/filepart.d.ts.map +1 -0
  67. package/models/components/filepart.js +134 -0
  68. package/models/components/filepart.js.map +1 -0
  69. package/models/components/index.d.ts +22 -0
  70. package/models/components/index.d.ts.map +1 -1
  71. package/models/components/index.js +22 -0
  72. package/models/components/index.js.map +1 -1
  73. package/models/components/invokedeploymentrequest.d.ts +21 -21
  74. package/models/components/invokedeploymentrequest.d.ts.map +1 -1
  75. package/models/components/invokedeploymentrequest.js +27 -28
  76. package/models/components/invokedeploymentrequest.js.map +1 -1
  77. package/models/components/textpart.d.ts +31 -0
  78. package/models/components/textpart.d.ts.map +1 -0
  79. package/models/components/textpart.js +67 -0
  80. package/models/components/textpart.js.map +1 -0
  81. package/models/components/timeoutstreamingevent.d.ts +49 -0
  82. package/models/components/timeoutstreamingevent.d.ts.map +1 -0
  83. package/models/components/timeoutstreamingevent.js +85 -0
  84. package/models/components/timeoutstreamingevent.js.map +1 -0
  85. package/models/components/toolcallpart.d.ts +45 -0
  86. package/models/components/toolcallpart.d.ts.map +1 -0
  87. package/models/components/toolcallpart.js +84 -0
  88. package/models/components/toolcallpart.js.map +1 -0
  89. package/models/components/toolexecutionfailedstreamingevent.d.ts +144 -0
  90. package/models/components/toolexecutionfailedstreamingevent.d.ts.map +1 -0
  91. package/models/components/toolexecutionfailedstreamingevent.js +223 -0
  92. package/models/components/toolexecutionfailedstreamingevent.js.map +1 -0
  93. package/models/components/toolexecutionfinishedstreamingevent.d.ts +129 -0
  94. package/models/components/toolexecutionfinishedstreamingevent.d.ts.map +1 -0
  95. package/models/components/toolexecutionfinishedstreamingevent.js +205 -0
  96. package/models/components/toolexecutionfinishedstreamingevent.js.map +1 -0
  97. package/models/components/toolexecutionstartedstreamingevent.d.ts +139 -0
  98. package/models/components/toolexecutionstartedstreamingevent.d.ts.map +1 -0
  99. package/models/components/toolexecutionstartedstreamingevent.js +217 -0
  100. package/models/components/toolexecutionstartedstreamingevent.js.map +1 -0
  101. package/models/components/toolresultpart.d.ts +39 -0
  102. package/models/components/toolresultpart.d.ts.map +1 -0
  103. package/models/components/toolresultpart.js +80 -0
  104. package/models/components/toolresultpart.js.map +1 -0
  105. package/models/operations/createagentresponserequest.d.ts +56 -165
  106. package/models/operations/createagentresponserequest.d.ts.map +1 -1
  107. package/models/operations/createagentresponserequest.js +87 -170
  108. package/models/operations/createagentresponserequest.js.map +1 -1
  109. package/models/operations/createbudget.js +2 -2
  110. package/models/operations/createcontact.js +2 -2
  111. package/models/operations/createdataset.js +2 -2
  112. package/models/operations/createdatasetitem.js +8 -8
  113. package/models/operations/createdatasource.js +2 -2
  114. package/models/operations/createeval.d.ts +80 -145
  115. package/models/operations/createeval.d.ts.map +1 -1
  116. package/models/operations/createeval.js +190 -266
  117. package/models/operations/createeval.js.map +1 -1
  118. package/models/operations/createprompt.d.ts +9 -11
  119. package/models/operations/createprompt.d.ts.map +1 -1
  120. package/models/operations/createprompt.js +9 -11
  121. package/models/operations/createprompt.js.map +1 -1
  122. package/models/operations/createtool.js +12 -12
  123. package/models/operations/deploymentinvoke.d.ts +9 -11
  124. package/models/operations/deploymentinvoke.d.ts.map +1 -1
  125. package/models/operations/deploymentinvoke.js +9 -11
  126. package/models/operations/deploymentinvoke.js.map +1 -1
  127. package/models/operations/deployments.d.ts +9 -11
  128. package/models/operations/deployments.d.ts.map +1 -1
  129. package/models/operations/deployments.js +9 -11
  130. package/models/operations/deployments.js.map +1 -1
  131. package/models/operations/deploymentstream.d.ts +9 -11
  132. package/models/operations/deploymentstream.d.ts.map +1 -1
  133. package/models/operations/deploymentstream.js +9 -11
  134. package/models/operations/deploymentstream.js.map +1 -1
  135. package/models/operations/fileget.js +2 -2
  136. package/models/operations/filelist.js +2 -2
  137. package/models/operations/fileupload.js +2 -2
  138. package/models/operations/getallprompts.d.ts +9 -11
  139. package/models/operations/getallprompts.d.ts.map +1 -1
  140. package/models/operations/getallprompts.js +9 -11
  141. package/models/operations/getallprompts.js.map +1 -1
  142. package/models/operations/getalltools.js +12 -12
  143. package/models/operations/getbudget.js +2 -2
  144. package/models/operations/getevals.d.ts +14 -79
  145. package/models/operations/getevals.d.ts.map +1 -1
  146. package/models/operations/getevals.js +49 -132
  147. package/models/operations/getevals.js.map +1 -1
  148. package/models/operations/getoneprompt.d.ts +9 -11
  149. package/models/operations/getoneprompt.d.ts.map +1 -1
  150. package/models/operations/getoneprompt.js +9 -11
  151. package/models/operations/getoneprompt.js.map +1 -1
  152. package/models/operations/getpromptversion.d.ts +9 -11
  153. package/models/operations/getpromptversion.d.ts.map +1 -1
  154. package/models/operations/getpromptversion.js +9 -11
  155. package/models/operations/getpromptversion.js.map +1 -1
  156. package/models/operations/invokeagent.d.ts +63 -416
  157. package/models/operations/invokeagent.d.ts.map +1 -1
  158. package/models/operations/invokeagent.js +80 -429
  159. package/models/operations/invokeagent.js.map +1 -1
  160. package/models/operations/listbudgets.js +2 -2
  161. package/models/operations/listcontacts.js +2 -2
  162. package/models/operations/listdatasetdatapoints.js +8 -8
  163. package/models/operations/listdatasets.js +2 -2
  164. package/models/operations/listdatasources.js +2 -2
  165. package/models/operations/listknowledgebases.d.ts +16 -16
  166. package/models/operations/listknowledgebases.d.ts.map +1 -1
  167. package/models/operations/listknowledgebases.js +27 -25
  168. package/models/operations/listknowledgebases.js.map +1 -1
  169. package/models/operations/listpromptversions.d.ts +9 -11
  170. package/models/operations/listpromptversions.d.ts.map +1 -1
  171. package/models/operations/listpromptversions.js +9 -11
  172. package/models/operations/listpromptversions.js.map +1 -1
  173. package/models/operations/retrievecontact.js +2 -2
  174. package/models/operations/retrievedatapoint.js +8 -8
  175. package/models/operations/retrievedataset.js +2 -2
  176. package/models/operations/retrievedatasource.js +2 -2
  177. package/models/operations/retrievetool.js +12 -12
  178. package/models/operations/runagent.d.ts +49 -402
  179. package/models/operations/runagent.d.ts.map +1 -1
  180. package/models/operations/runagent.js +70 -418
  181. package/models/operations/runagent.js.map +1 -1
  182. package/models/operations/streamagent.d.ts +238 -3279
  183. package/models/operations/streamagent.d.ts.map +1 -1
  184. package/models/operations/streamagent.js +158 -3602
  185. package/models/operations/streamagent.js.map +1 -1
  186. package/models/operations/streamrunagent.d.ts +888 -3929
  187. package/models/operations/streamrunagent.d.ts.map +1 -1
  188. package/models/operations/streamrunagent.js +165 -3605
  189. package/models/operations/streamrunagent.js.map +1 -1
  190. package/models/operations/updatebudget.js +2 -2
  191. package/models/operations/updatecontact.js +2 -2
  192. package/models/operations/updatedatapoint.js +8 -8
  193. package/models/operations/updatedataset.js +2 -2
  194. package/models/operations/updatedatasource.js +2 -2
  195. package/models/operations/updateeval.d.ts +14 -79
  196. package/models/operations/updateeval.d.ts.map +1 -1
  197. package/models/operations/updateeval.js +51 -134
  198. package/models/operations/updateeval.js.map +1 -1
  199. package/models/operations/updatememorystore.d.ts +9 -20
  200. package/models/operations/updatememorystore.d.ts.map +1 -1
  201. package/models/operations/updatememorystore.js +9 -14
  202. package/models/operations/updatememorystore.js.map +1 -1
  203. package/models/operations/updateprompt.d.ts +18 -22
  204. package/models/operations/updateprompt.d.ts.map +1 -1
  205. package/models/operations/updateprompt.js +18 -22
  206. package/models/operations/updateprompt.js.map +1 -1
  207. package/models/operations/updatetool.js +14 -14
  208. package/package.json +1 -1
  209. package/src/lib/config.ts +3 -3
  210. package/src/mcp-server/mcp-server.ts +1 -1
  211. package/src/mcp-server/server.ts +1 -1
  212. package/src/models/components/actionreviewedstreamingevent.ts +189 -0
  213. package/src/models/components/actionreviewrequestedstreamingevent.ts +326 -0
  214. package/src/models/components/agenterroredstreamingevent.ts +142 -0
  215. package/src/models/components/agentexecutionstartedstreamingevent.ts +145 -0
  216. package/src/models/components/agenthandedoffstreamingevent.ts +142 -0
  217. package/src/models/components/agentinactivestreamingevent.ts +857 -0
  218. package/src/models/components/agentmessagecreatedstreamingevent.ts +396 -0
  219. package/src/models/components/agentstartedstreamingevent.ts +909 -0
  220. package/src/models/components/agentthoughtstreamingevent.ts +1419 -0
  221. package/src/models/components/datapart.ts +71 -0
  222. package/src/models/components/errorstreamingevent.ts +129 -0
  223. package/src/models/components/executionnamedstreamingevent.ts +142 -0
  224. package/src/models/components/executionreviewedstreamingevent.ts +122 -0
  225. package/src/models/components/executionreviewrequiredstreamingevent.ts +130 -0
  226. package/src/models/components/filepart.ts +231 -0
  227. package/src/models/components/index.ts +22 -0
  228. package/src/models/components/invokedeploymentrequest.ts +66 -52
  229. package/src/models/components/textpart.ts +68 -0
  230. package/src/models/components/timeoutstreamingevent.ts +125 -0
  231. package/src/models/components/toolcallpart.ts +92 -0
  232. package/src/models/components/toolexecutionfailedstreamingevent.ts +406 -0
  233. package/src/models/components/toolexecutionfinishedstreamingevent.ts +373 -0
  234. package/src/models/components/toolexecutionstartedstreamingevent.ts +350 -0
  235. package/src/models/components/toolresultpart.ts +86 -0
  236. package/src/models/operations/createagentresponserequest.ts +184 -392
  237. package/src/models/operations/createbudget.ts +2 -2
  238. package/src/models/operations/createcontact.ts +2 -2
  239. package/src/models/operations/createdataset.ts +2 -2
  240. package/src/models/operations/createdatasetitem.ts +8 -8
  241. package/src/models/operations/createdatasource.ts +2 -2
  242. package/src/models/operations/createeval.ts +318 -615
  243. package/src/models/operations/createprompt.ts +9 -11
  244. package/src/models/operations/createtool.ts +12 -12
  245. package/src/models/operations/deploymentinvoke.ts +9 -11
  246. package/src/models/operations/deployments.ts +9 -11
  247. package/src/models/operations/deploymentstream.ts +9 -11
  248. package/src/models/operations/fileget.ts +2 -2
  249. package/src/models/operations/filelist.ts +2 -2
  250. package/src/models/operations/fileupload.ts +2 -2
  251. package/src/models/operations/getallprompts.ts +9 -11
  252. package/src/models/operations/getalltools.ts +12 -12
  253. package/src/models/operations/getbudget.ts +2 -2
  254. package/src/models/operations/getevals.ts +52 -287
  255. package/src/models/operations/getoneprompt.ts +9 -11
  256. package/src/models/operations/getpromptversion.ts +9 -11
  257. package/src/models/operations/invokeagent.ts +180 -1041
  258. package/src/models/operations/listbudgets.ts +2 -2
  259. package/src/models/operations/listcontacts.ts +2 -2
  260. package/src/models/operations/listdatasetdatapoints.ts +8 -8
  261. package/src/models/operations/listdatasets.ts +2 -2
  262. package/src/models/operations/listdatasources.ts +2 -2
  263. package/src/models/operations/listknowledgebases.ts +82 -102
  264. package/src/models/operations/listpromptversions.ts +9 -11
  265. package/src/models/operations/retrievecontact.ts +2 -2
  266. package/src/models/operations/retrievedatapoint.ts +8 -8
  267. package/src/models/operations/retrievedataset.ts +2 -2
  268. package/src/models/operations/retrievedatasource.ts +2 -2
  269. package/src/models/operations/retrievetool.ts +12 -12
  270. package/src/models/operations/runagent.ts +238 -1140
  271. package/src/models/operations/streamagent.ts +777 -9305
  272. package/src/models/operations/streamrunagent.ts +3839 -12309
  273. package/src/models/operations/updatebudget.ts +2 -2
  274. package/src/models/operations/updatecontact.ts +2 -2
  275. package/src/models/operations/updatedatapoint.ts +8 -8
  276. package/src/models/operations/updatedataset.ts +2 -2
  277. package/src/models/operations/updatedatasource.ts +2 -2
  278. package/src/models/operations/updateeval.ts +52 -287
  279. package/src/models/operations/updatememorystore.ts +9 -20
  280. package/src/models/operations/updateprompt.ts +18 -22
  281. package/src/models/operations/updatetool.ts +14 -14
@@ -7,6 +7,7 @@ import { remap as remap$ } from "../../lib/primitives.js";
7
7
  import { safeParse } from "../../lib/schemas.js";
8
8
  import { ClosedEnum } from "../../types/enums.js";
9
9
  import { Result as SafeParseResult } from "../../types/fp.js";
10
+ import * as components from "../components/index.js";
10
11
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
11
12
 
12
13
  /**
@@ -36,92 +37,13 @@ export type RoleUserMessage = ClosedEnum<typeof RoleUserMessage>;
36
37
  */
37
38
  export type CreateAgentResponseRequestRole = RoleUserMessage | RoleToolMessage;
38
39
 
39
- export const CreateAgentResponseRequestPublicMessagePartKind = {
40
- ToolResult: "tool_result",
41
- } as const;
42
- export type CreateAgentResponseRequestPublicMessagePartKind = ClosedEnum<
43
- typeof CreateAgentResponseRequestPublicMessagePartKind
44
- >;
45
-
46
- /**
47
- * Tool execution result part. Use this ONLY when providing results for a pending tool call from the agent. The tool_call_id must match the ID from the agent's tool call request.
48
- */
49
- export type ToolResultPart = {
50
- kind: CreateAgentResponseRequestPublicMessagePartKind;
51
- toolCallId: string;
52
- result?: any | undefined;
53
- metadata?: { [k: string]: any } | undefined;
54
- };
55
-
56
- export const PublicMessagePartKind = {
57
- File: "file",
58
- } as const;
59
- export type PublicMessagePartKind = ClosedEnum<typeof PublicMessagePartKind>;
60
-
61
- /**
62
- * File in URI format. Check in the model's documentation for the supported mime types for the URI format
63
- */
64
- export type FileInURIFormat = {
65
- /**
66
- * URL for the File content
67
- */
68
- uri: string;
69
- /**
70
- * Optional mimeType for the file
71
- */
72
- mimeType?: string | undefined;
73
- /**
74
- * Optional name for the file
75
- */
76
- name?: string | undefined;
77
- };
78
-
79
- /**
80
- * Binary in base64 format. Check in the model's documentation for the supported mime types for the binary format.
81
- */
82
- export type BinaryFormat = {
83
- /**
84
- * base64 encoded content of the file
85
- */
86
- bytes: string;
87
- /**
88
- * Optional mimeType for the file
89
- */
90
- mimeType?: string | undefined;
91
- /**
92
- * Optional name for the file
93
- */
94
- name?: string | undefined;
95
- };
96
-
97
- export type PublicMessagePartFile = BinaryFormat | FileInURIFormat;
98
-
99
- /**
100
- * File attachment part. Use this to send files (images, documents, etc.) to the agent for processing.
101
- */
102
- export type FilePart = {
103
- kind: PublicMessagePartKind;
104
- file: BinaryFormat | FileInURIFormat;
105
- metadata?: { [k: string]: any } | undefined;
106
- };
107
-
108
- export const Kind = {
109
- Text: "text",
110
- } as const;
111
- export type Kind = ClosedEnum<typeof Kind>;
112
-
113
- /**
114
- * Text content part. Use this to send text messages to the agent.
115
- */
116
- export type TextPart = {
117
- kind: Kind;
118
- text: string;
119
- };
120
-
121
40
  /**
122
41
  * Message part that can be provided by users. Use "text" for regular messages, "file" for attachments, or "tool_result" when responding to tool call requests.
123
42
  */
124
- export type PublicMessagePart = TextPart | FilePart | ToolResultPart;
43
+ export type PublicMessagePart =
44
+ | components.TextPart
45
+ | components.FilePart
46
+ | components.ToolResultPart;
125
47
 
126
48
  /**
127
49
  * The A2A message to send to the agent (user input or tool results)
@@ -138,7 +60,9 @@ export type A2AMessage = {
138
60
  /**
139
61
  * A2A message parts (text, file, or tool_result only)
140
62
  */
141
- parts: Array<TextPart | FilePart | ToolResultPart>;
63
+ parts: Array<
64
+ components.TextPart | components.FilePart | components.ToolResultPart
65
+ >;
142
66
  };
143
67
 
144
68
  /**
@@ -248,10 +172,23 @@ export type CreateAgentResponseRequestAgentsResponsesRole = ClosedEnum<
248
172
  typeof CreateAgentResponseRequestAgentsResponsesRole
249
173
  >;
250
174
 
175
+ export type Parts =
176
+ | (components.ToolCallPart & { kind: "tool_call" })
177
+ | (components.TextPart & { kind: "text" })
178
+ | (components.DataPart & { kind: "data" })
179
+ | (components.FilePart & { kind: "file" })
180
+ | (components.ToolResultPart & { kind: "tool_result" });
181
+
251
182
  export type Output = {
252
183
  messageId: string;
253
184
  role: CreateAgentResponseRequestAgentsResponsesRole;
254
- parts: Array<any>;
185
+ parts: Array<
186
+ | (components.ToolCallPart & { kind: "tool_call" })
187
+ | (components.TextPart & { kind: "text" })
188
+ | (components.DataPart & { kind: "data" })
189
+ | (components.FilePart & { kind: "file" })
190
+ | (components.ToolResultPart & { kind: "tool_result" })
191
+ >;
255
192
  metadata?: { [k: string]: any } | undefined;
256
193
  };
257
194
 
@@ -376,309 +313,21 @@ export function createAgentResponseRequestRoleFromJSON(
376
313
  );
377
314
  }
378
315
 
379
- /** @internal */
380
- export const CreateAgentResponseRequestPublicMessagePartKind$inboundSchema:
381
- z.ZodNativeEnum<typeof CreateAgentResponseRequestPublicMessagePartKind> = z
382
- .nativeEnum(CreateAgentResponseRequestPublicMessagePartKind);
383
- /** @internal */
384
- export const CreateAgentResponseRequestPublicMessagePartKind$outboundSchema:
385
- z.ZodNativeEnum<typeof CreateAgentResponseRequestPublicMessagePartKind> =
386
- CreateAgentResponseRequestPublicMessagePartKind$inboundSchema;
387
-
388
- /** @internal */
389
- export const ToolResultPart$inboundSchema: z.ZodType<
390
- ToolResultPart,
391
- z.ZodTypeDef,
392
- unknown
393
- > = z.object({
394
- kind: CreateAgentResponseRequestPublicMessagePartKind$inboundSchema,
395
- tool_call_id: z.string(),
396
- result: z.any().optional(),
397
- metadata: z.record(z.any()).optional(),
398
- }).transform((v) => {
399
- return remap$(v, {
400
- "tool_call_id": "toolCallId",
401
- });
402
- });
403
- /** @internal */
404
- export type ToolResultPart$Outbound = {
405
- kind: string;
406
- tool_call_id: string;
407
- result?: any | undefined;
408
- metadata?: { [k: string]: any } | undefined;
409
- };
410
-
411
- /** @internal */
412
- export const ToolResultPart$outboundSchema: z.ZodType<
413
- ToolResultPart$Outbound,
414
- z.ZodTypeDef,
415
- ToolResultPart
416
- > = z.object({
417
- kind: CreateAgentResponseRequestPublicMessagePartKind$outboundSchema,
418
- toolCallId: z.string(),
419
- result: z.any().optional(),
420
- metadata: z.record(z.any()).optional(),
421
- }).transform((v) => {
422
- return remap$(v, {
423
- toolCallId: "tool_call_id",
424
- });
425
- });
426
-
427
- export function toolResultPartToJSON(toolResultPart: ToolResultPart): string {
428
- return JSON.stringify(ToolResultPart$outboundSchema.parse(toolResultPart));
429
- }
430
- export function toolResultPartFromJSON(
431
- jsonString: string,
432
- ): SafeParseResult<ToolResultPart, SDKValidationError> {
433
- return safeParse(
434
- jsonString,
435
- (x) => ToolResultPart$inboundSchema.parse(JSON.parse(x)),
436
- `Failed to parse 'ToolResultPart' from JSON`,
437
- );
438
- }
439
-
440
- /** @internal */
441
- export const PublicMessagePartKind$inboundSchema: z.ZodNativeEnum<
442
- typeof PublicMessagePartKind
443
- > = z.nativeEnum(PublicMessagePartKind);
444
- /** @internal */
445
- export const PublicMessagePartKind$outboundSchema: z.ZodNativeEnum<
446
- typeof PublicMessagePartKind
447
- > = PublicMessagePartKind$inboundSchema;
448
-
449
- /** @internal */
450
- export const FileInURIFormat$inboundSchema: z.ZodType<
451
- FileInURIFormat,
452
- z.ZodTypeDef,
453
- unknown
454
- > = z.object({
455
- uri: z.string(),
456
- mimeType: z.string().optional(),
457
- name: z.string().optional(),
458
- });
459
- /** @internal */
460
- export type FileInURIFormat$Outbound = {
461
- uri: string;
462
- mimeType?: string | undefined;
463
- name?: string | undefined;
464
- };
465
-
466
- /** @internal */
467
- export const FileInURIFormat$outboundSchema: z.ZodType<
468
- FileInURIFormat$Outbound,
469
- z.ZodTypeDef,
470
- FileInURIFormat
471
- > = z.object({
472
- uri: z.string(),
473
- mimeType: z.string().optional(),
474
- name: z.string().optional(),
475
- });
476
-
477
- export function fileInURIFormatToJSON(
478
- fileInURIFormat: FileInURIFormat,
479
- ): string {
480
- return JSON.stringify(FileInURIFormat$outboundSchema.parse(fileInURIFormat));
481
- }
482
- export function fileInURIFormatFromJSON(
483
- jsonString: string,
484
- ): SafeParseResult<FileInURIFormat, SDKValidationError> {
485
- return safeParse(
486
- jsonString,
487
- (x) => FileInURIFormat$inboundSchema.parse(JSON.parse(x)),
488
- `Failed to parse 'FileInURIFormat' from JSON`,
489
- );
490
- }
491
-
492
- /** @internal */
493
- export const BinaryFormat$inboundSchema: z.ZodType<
494
- BinaryFormat,
495
- z.ZodTypeDef,
496
- unknown
497
- > = z.object({
498
- bytes: z.string(),
499
- mimeType: z.string().optional(),
500
- name: z.string().optional(),
501
- });
502
- /** @internal */
503
- export type BinaryFormat$Outbound = {
504
- bytes: string;
505
- mimeType?: string | undefined;
506
- name?: string | undefined;
507
- };
508
-
509
- /** @internal */
510
- export const BinaryFormat$outboundSchema: z.ZodType<
511
- BinaryFormat$Outbound,
512
- z.ZodTypeDef,
513
- BinaryFormat
514
- > = z.object({
515
- bytes: z.string(),
516
- mimeType: z.string().optional(),
517
- name: z.string().optional(),
518
- });
519
-
520
- export function binaryFormatToJSON(binaryFormat: BinaryFormat): string {
521
- return JSON.stringify(BinaryFormat$outboundSchema.parse(binaryFormat));
522
- }
523
- export function binaryFormatFromJSON(
524
- jsonString: string,
525
- ): SafeParseResult<BinaryFormat, SDKValidationError> {
526
- return safeParse(
527
- jsonString,
528
- (x) => BinaryFormat$inboundSchema.parse(JSON.parse(x)),
529
- `Failed to parse 'BinaryFormat' from JSON`,
530
- );
531
- }
532
-
533
- /** @internal */
534
- export const PublicMessagePartFile$inboundSchema: z.ZodType<
535
- PublicMessagePartFile,
536
- z.ZodTypeDef,
537
- unknown
538
- > = z.union([
539
- z.lazy(() => BinaryFormat$inboundSchema),
540
- z.lazy(() => FileInURIFormat$inboundSchema),
541
- ]);
542
- /** @internal */
543
- export type PublicMessagePartFile$Outbound =
544
- | BinaryFormat$Outbound
545
- | FileInURIFormat$Outbound;
546
-
547
- /** @internal */
548
- export const PublicMessagePartFile$outboundSchema: z.ZodType<
549
- PublicMessagePartFile$Outbound,
550
- z.ZodTypeDef,
551
- PublicMessagePartFile
552
- > = z.union([
553
- z.lazy(() => BinaryFormat$outboundSchema),
554
- z.lazy(() => FileInURIFormat$outboundSchema),
555
- ]);
556
-
557
- export function publicMessagePartFileToJSON(
558
- publicMessagePartFile: PublicMessagePartFile,
559
- ): string {
560
- return JSON.stringify(
561
- PublicMessagePartFile$outboundSchema.parse(publicMessagePartFile),
562
- );
563
- }
564
- export function publicMessagePartFileFromJSON(
565
- jsonString: string,
566
- ): SafeParseResult<PublicMessagePartFile, SDKValidationError> {
567
- return safeParse(
568
- jsonString,
569
- (x) => PublicMessagePartFile$inboundSchema.parse(JSON.parse(x)),
570
- `Failed to parse 'PublicMessagePartFile' from JSON`,
571
- );
572
- }
573
-
574
- /** @internal */
575
- export const FilePart$inboundSchema: z.ZodType<
576
- FilePart,
577
- z.ZodTypeDef,
578
- unknown
579
- > = z.object({
580
- kind: PublicMessagePartKind$inboundSchema,
581
- file: z.union([
582
- z.lazy(() => BinaryFormat$inboundSchema),
583
- z.lazy(() => FileInURIFormat$inboundSchema),
584
- ]),
585
- metadata: z.record(z.any()).optional(),
586
- });
587
- /** @internal */
588
- export type FilePart$Outbound = {
589
- kind: string;
590
- file: BinaryFormat$Outbound | FileInURIFormat$Outbound;
591
- metadata?: { [k: string]: any } | undefined;
592
- };
593
-
594
- /** @internal */
595
- export const FilePart$outboundSchema: z.ZodType<
596
- FilePart$Outbound,
597
- z.ZodTypeDef,
598
- FilePart
599
- > = z.object({
600
- kind: PublicMessagePartKind$outboundSchema,
601
- file: z.union([
602
- z.lazy(() => BinaryFormat$outboundSchema),
603
- z.lazy(() => FileInURIFormat$outboundSchema),
604
- ]),
605
- metadata: z.record(z.any()).optional(),
606
- });
607
-
608
- export function filePartToJSON(filePart: FilePart): string {
609
- return JSON.stringify(FilePart$outboundSchema.parse(filePart));
610
- }
611
- export function filePartFromJSON(
612
- jsonString: string,
613
- ): SafeParseResult<FilePart, SDKValidationError> {
614
- return safeParse(
615
- jsonString,
616
- (x) => FilePart$inboundSchema.parse(JSON.parse(x)),
617
- `Failed to parse 'FilePart' from JSON`,
618
- );
619
- }
620
-
621
- /** @internal */
622
- export const Kind$inboundSchema: z.ZodNativeEnum<typeof Kind> = z.nativeEnum(
623
- Kind,
624
- );
625
- /** @internal */
626
- export const Kind$outboundSchema: z.ZodNativeEnum<typeof Kind> =
627
- Kind$inboundSchema;
628
-
629
- /** @internal */
630
- export const TextPart$inboundSchema: z.ZodType<
631
- TextPart,
632
- z.ZodTypeDef,
633
- unknown
634
- > = z.object({
635
- kind: Kind$inboundSchema,
636
- text: z.string(),
637
- });
638
- /** @internal */
639
- export type TextPart$Outbound = {
640
- kind: string;
641
- text: string;
642
- };
643
-
644
- /** @internal */
645
- export const TextPart$outboundSchema: z.ZodType<
646
- TextPart$Outbound,
647
- z.ZodTypeDef,
648
- TextPart
649
- > = z.object({
650
- kind: Kind$outboundSchema,
651
- text: z.string(),
652
- });
653
-
654
- export function textPartToJSON(textPart: TextPart): string {
655
- return JSON.stringify(TextPart$outboundSchema.parse(textPart));
656
- }
657
- export function textPartFromJSON(
658
- jsonString: string,
659
- ): SafeParseResult<TextPart, SDKValidationError> {
660
- return safeParse(
661
- jsonString,
662
- (x) => TextPart$inboundSchema.parse(JSON.parse(x)),
663
- `Failed to parse 'TextPart' from JSON`,
664
- );
665
- }
666
-
667
316
  /** @internal */
668
317
  export const PublicMessagePart$inboundSchema: z.ZodType<
669
318
  PublicMessagePart,
670
319
  z.ZodTypeDef,
671
320
  unknown
672
321
  > = z.union([
673
- z.lazy(() => TextPart$inboundSchema),
674
- z.lazy(() => FilePart$inboundSchema),
675
- z.lazy(() => ToolResultPart$inboundSchema),
322
+ components.TextPart$inboundSchema,
323
+ components.FilePart$inboundSchema,
324
+ components.ToolResultPart$inboundSchema,
676
325
  ]);
677
326
  /** @internal */
678
327
  export type PublicMessagePart$Outbound =
679
- | TextPart$Outbound
680
- | FilePart$Outbound
681
- | ToolResultPart$Outbound;
328
+ | components.TextPart$Outbound
329
+ | components.FilePart$Outbound
330
+ | components.ToolResultPart$Outbound;
682
331
 
683
332
  /** @internal */
684
333
  export const PublicMessagePart$outboundSchema: z.ZodType<
@@ -686,9 +335,9 @@ export const PublicMessagePart$outboundSchema: z.ZodType<
686
335
  z.ZodTypeDef,
687
336
  PublicMessagePart
688
337
  > = z.union([
689
- z.lazy(() => TextPart$outboundSchema),
690
- z.lazy(() => FilePart$outboundSchema),
691
- z.lazy(() => ToolResultPart$outboundSchema),
338
+ components.TextPart$outboundSchema,
339
+ components.FilePart$outboundSchema,
340
+ components.ToolResultPart$outboundSchema,
692
341
  ]);
693
342
 
694
343
  export function publicMessagePartToJSON(
@@ -718,9 +367,9 @@ export const A2AMessage$inboundSchema: z.ZodType<
718
367
  role: z.union([RoleUserMessage$inboundSchema, RoleToolMessage$inboundSchema]),
719
368
  parts: z.array(
720
369
  z.union([
721
- z.lazy(() => TextPart$inboundSchema),
722
- z.lazy(() => FilePart$inboundSchema),
723
- z.lazy(() => ToolResultPart$inboundSchema),
370
+ components.TextPart$inboundSchema,
371
+ components.FilePart$inboundSchema,
372
+ components.ToolResultPart$inboundSchema,
724
373
  ]),
725
374
  ),
726
375
  });
@@ -728,7 +377,11 @@ export const A2AMessage$inboundSchema: z.ZodType<
728
377
  export type A2AMessage$Outbound = {
729
378
  messageId?: string | undefined;
730
379
  role: string | string;
731
- parts: Array<TextPart$Outbound | FilePart$Outbound | ToolResultPart$Outbound>;
380
+ parts: Array<
381
+ | components.TextPart$Outbound
382
+ | components.FilePart$Outbound
383
+ | components.ToolResultPart$Outbound
384
+ >;
732
385
  };
733
386
 
734
387
  /** @internal */
@@ -744,9 +397,9 @@ export const A2AMessage$outboundSchema: z.ZodType<
744
397
  ]),
745
398
  parts: z.array(
746
399
  z.union([
747
- z.lazy(() => TextPart$outboundSchema),
748
- z.lazy(() => FilePart$outboundSchema),
749
- z.lazy(() => ToolResultPart$outboundSchema),
400
+ components.TextPart$outboundSchema,
401
+ components.FilePart$outboundSchema,
402
+ components.ToolResultPart$outboundSchema,
750
403
  ]),
751
404
  ),
752
405
  });
@@ -1045,19 +698,130 @@ export const CreateAgentResponseRequestAgentsResponsesRole$outboundSchema:
1045
698
  z.ZodNativeEnum<typeof CreateAgentResponseRequestAgentsResponsesRole> =
1046
699
  CreateAgentResponseRequestAgentsResponsesRole$inboundSchema;
1047
700
 
701
+ /** @internal */
702
+ export const Parts$inboundSchema: z.ZodType<Parts, z.ZodTypeDef, unknown> = z
703
+ .union([
704
+ components.ToolCallPart$inboundSchema.and(
705
+ z.object({ kind: z.literal("tool_call") }).transform((v) => ({
706
+ kind: v.kind,
707
+ })),
708
+ ),
709
+ components.TextPart$inboundSchema.and(
710
+ z.object({ kind: z.literal("text") }).transform((v) => ({
711
+ kind: v.kind,
712
+ })),
713
+ ),
714
+ components.DataPart$inboundSchema.and(
715
+ z.object({ kind: z.literal("data") }).transform((v) => ({
716
+ kind: v.kind,
717
+ })),
718
+ ),
719
+ components.FilePart$inboundSchema.and(
720
+ z.object({ kind: z.literal("file") }).transform((v) => ({
721
+ kind: v.kind,
722
+ })),
723
+ ),
724
+ components.ToolResultPart$inboundSchema.and(
725
+ z.object({ kind: z.literal("tool_result") }).transform((v) => ({
726
+ kind: v.kind,
727
+ })),
728
+ ),
729
+ ]);
730
+ /** @internal */
731
+ export type Parts$Outbound =
732
+ | (components.ToolCallPart$Outbound & { kind: "tool_call" })
733
+ | (components.TextPart$Outbound & { kind: "text" })
734
+ | (components.DataPart$Outbound & { kind: "data" })
735
+ | (components.FilePart$Outbound & { kind: "file" })
736
+ | (components.ToolResultPart$Outbound & { kind: "tool_result" });
737
+
738
+ /** @internal */
739
+ export const Parts$outboundSchema: z.ZodType<
740
+ Parts$Outbound,
741
+ z.ZodTypeDef,
742
+ Parts
743
+ > = z.union([
744
+ components.ToolCallPart$outboundSchema.and(
745
+ z.object({ kind: z.literal("tool_call") }).transform((v) => ({
746
+ kind: v.kind,
747
+ })),
748
+ ),
749
+ components.TextPart$outboundSchema.and(
750
+ z.object({ kind: z.literal("text") }).transform((v) => ({ kind: v.kind })),
751
+ ),
752
+ components.DataPart$outboundSchema.and(
753
+ z.object({ kind: z.literal("data") }).transform((v) => ({ kind: v.kind })),
754
+ ),
755
+ components.FilePart$outboundSchema.and(
756
+ z.object({ kind: z.literal("file") }).transform((v) => ({ kind: v.kind })),
757
+ ),
758
+ components.ToolResultPart$outboundSchema.and(
759
+ z.object({ kind: z.literal("tool_result") }).transform((v) => ({
760
+ kind: v.kind,
761
+ })),
762
+ ),
763
+ ]);
764
+
765
+ export function partsToJSON(parts: Parts): string {
766
+ return JSON.stringify(Parts$outboundSchema.parse(parts));
767
+ }
768
+ export function partsFromJSON(
769
+ jsonString: string,
770
+ ): SafeParseResult<Parts, SDKValidationError> {
771
+ return safeParse(
772
+ jsonString,
773
+ (x) => Parts$inboundSchema.parse(JSON.parse(x)),
774
+ `Failed to parse 'Parts' from JSON`,
775
+ );
776
+ }
777
+
1048
778
  /** @internal */
1049
779
  export const Output$inboundSchema: z.ZodType<Output, z.ZodTypeDef, unknown> = z
1050
780
  .object({
1051
781
  messageId: z.string(),
1052
782
  role: CreateAgentResponseRequestAgentsResponsesRole$inboundSchema,
1053
- parts: z.array(z.any()),
783
+ parts: z.array(
784
+ z.union([
785
+ components.ToolCallPart$inboundSchema.and(
786
+ z.object({ kind: z.literal("tool_call") }).transform((v) => ({
787
+ kind: v.kind,
788
+ })),
789
+ ),
790
+ components.TextPart$inboundSchema.and(
791
+ z.object({ kind: z.literal("text") }).transform((v) => ({
792
+ kind: v.kind,
793
+ })),
794
+ ),
795
+ components.DataPart$inboundSchema.and(
796
+ z.object({ kind: z.literal("data") }).transform((v) => ({
797
+ kind: v.kind,
798
+ })),
799
+ ),
800
+ components.FilePart$inboundSchema.and(
801
+ z.object({ kind: z.literal("file") }).transform((v) => ({
802
+ kind: v.kind,
803
+ })),
804
+ ),
805
+ components.ToolResultPart$inboundSchema.and(
806
+ z.object({ kind: z.literal("tool_result") }).transform((v) => ({
807
+ kind: v.kind,
808
+ })),
809
+ ),
810
+ ]),
811
+ ),
1054
812
  metadata: z.record(z.any()).optional(),
1055
813
  });
1056
814
  /** @internal */
1057
815
  export type Output$Outbound = {
1058
816
  messageId: string;
1059
817
  role: string;
1060
- parts: Array<any>;
818
+ parts: Array<
819
+ | (components.ToolCallPart$Outbound & { kind: "tool_call" })
820
+ | (components.TextPart$Outbound & { kind: "text" })
821
+ | (components.DataPart$Outbound & { kind: "data" })
822
+ | (components.FilePart$Outbound & { kind: "file" })
823
+ | (components.ToolResultPart$Outbound & { kind: "tool_result" })
824
+ >;
1061
825
  metadata?: { [k: string]: any } | undefined;
1062
826
  };
1063
827
 
@@ -1069,7 +833,35 @@ export const Output$outboundSchema: z.ZodType<
1069
833
  > = z.object({
1070
834
  messageId: z.string(),
1071
835
  role: CreateAgentResponseRequestAgentsResponsesRole$outboundSchema,
1072
- parts: z.array(z.any()),
836
+ parts: z.array(
837
+ z.union([
838
+ components.ToolCallPart$outboundSchema.and(
839
+ z.object({ kind: z.literal("tool_call") }).transform((v) => ({
840
+ kind: v.kind,
841
+ })),
842
+ ),
843
+ components.TextPart$outboundSchema.and(
844
+ z.object({ kind: z.literal("text") }).transform((v) => ({
845
+ kind: v.kind,
846
+ })),
847
+ ),
848
+ components.DataPart$outboundSchema.and(
849
+ z.object({ kind: z.literal("data") }).transform((v) => ({
850
+ kind: v.kind,
851
+ })),
852
+ ),
853
+ components.FilePart$outboundSchema.and(
854
+ z.object({ kind: z.literal("file") }).transform((v) => ({
855
+ kind: v.kind,
856
+ })),
857
+ ),
858
+ components.ToolResultPart$outboundSchema.and(
859
+ z.object({ kind: z.literal("tool_result") }).transform((v) => ({
860
+ kind: v.kind,
861
+ })),
862
+ ),
863
+ ]),
864
+ ),
1073
865
  metadata: z.record(z.any()).optional(),
1074
866
  });
1075
867
 
@@ -516,7 +516,7 @@ export const CreateBudgetResponseBody$inboundSchema: z.ZodType<
516
516
  created: z.string().datetime({ offset: true }).transform(v => new Date(v))
517
517
  .optional(),
518
518
  updated: z.string().datetime({ offset: true }).default(
519
- "2025-11-25T09:21:48.673Z",
519
+ "2025-11-25T16:34:40.403Z",
520
520
  ).transform(v => new Date(v)),
521
521
  }).transform((v) => {
522
522
  return remap$(v, {
@@ -553,7 +553,7 @@ export const CreateBudgetResponseBody$outboundSchema: z.ZodType<
553
553
  isActive: z.boolean(),
554
554
  consumption: z.lazy(() => Consumption$outboundSchema).optional(),
555
555
  created: z.date().transform(v => v.toISOString()).optional(),
556
- updated: z.date().default(() => new Date("2025-11-25T09:21:48.673Z"))
556
+ updated: z.date().default(() => new Date("2025-11-25T16:34:40.403Z"))
557
557
  .transform(v => v.toISOString()),
558
558
  }).transform((v) => {
559
559
  return remap$(v, {
@@ -167,7 +167,7 @@ export const CreateContactResponseBody$inboundSchema: z.ZodType<
167
167
  created: z.string().datetime({ offset: true }).transform(v => new Date(v))
168
168
  .optional(),
169
169
  updated: z.string().datetime({ offset: true }).default(
170
- "2025-11-25T09:21:47.602Z",
170
+ "2025-11-25T16:34:40.058Z",
171
171
  ).transform(v => new Date(v)),
172
172
  }).transform((v) => {
173
173
  return remap$(v, {
@@ -207,7 +207,7 @@ export const CreateContactResponseBody$outboundSchema: z.ZodType<
207
207
  tags: z.array(z.string()).optional(),
208
208
  metadata: z.record(z.any()).optional(),
209
209
  created: z.date().transform(v => v.toISOString()).optional(),
210
- updated: z.date().default(() => new Date("2025-11-25T09:21:47.602Z"))
210
+ updated: z.date().default(() => new Date("2025-11-25T16:34:40.058Z"))
211
211
  .transform(v => v.toISOString()),
212
212
  }).transform((v) => {
213
213
  return remap$(v, {