@orq-ai/node 4.11.0-rc.28 → 4.11.0-rc.29

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 (206) hide show
  1. package/funcs/agentsInvoke.d.ts +1 -1
  2. package/funcs/agentsInvoke.d.ts.map +1 -1
  3. package/funcs/agentsInvoke.js.map +1 -1
  4. package/funcs/agentsResponsesCreate.d.ts +2 -1
  5. package/funcs/agentsResponsesCreate.d.ts.map +1 -1
  6. package/funcs/agentsResponsesCreate.js +7 -5
  7. package/funcs/agentsResponsesCreate.js.map +1 -1
  8. package/funcs/agentsStream.d.ts +1 -1
  9. package/funcs/agentsStream.d.ts.map +1 -1
  10. package/funcs/agentsStream.js.map +1 -1
  11. package/funcs/annotationsCreate.d.ts +1 -1
  12. package/funcs/annotationsCreate.js +1 -1
  13. package/funcs/annotationsDelete.d.ts +1 -1
  14. package/funcs/annotationsDelete.js +1 -1
  15. package/funcs/deploymentsInvoke.d.ts +2 -1
  16. package/funcs/deploymentsInvoke.d.ts.map +1 -1
  17. package/funcs/deploymentsInvoke.js +2 -1
  18. package/funcs/deploymentsInvoke.js.map +1 -1
  19. package/funcs/promptsCreate.d.ts +1 -1
  20. package/funcs/promptsCreate.d.ts.map +1 -1
  21. package/funcs/promptsCreate.js +2 -1
  22. package/funcs/promptsCreate.js.map +1 -1
  23. package/jsr.json +1 -1
  24. package/lib/config.d.ts +2 -2
  25. package/lib/config.js +2 -2
  26. package/models/components/agentresponserequest.d.ts +336 -0
  27. package/models/components/agentresponserequest.d.ts.map +1 -0
  28. package/models/components/agentresponserequest.js +210 -0
  29. package/models/components/agentresponserequest.js.map +1 -0
  30. package/models/components/agentthoughtstreamingevent.d.ts +12 -12
  31. package/models/components/agentthoughtstreamingevent.d.ts.map +1 -1
  32. package/models/components/agentthoughtstreamingevent.js +17 -17
  33. package/models/components/agentthoughtstreamingevent.js.map +1 -1
  34. package/models/components/index.d.ts +2 -0
  35. package/models/components/index.d.ts.map +1 -1
  36. package/models/components/index.js +2 -0
  37. package/models/components/index.js.map +1 -1
  38. package/models/components/invokedeploymentrequest.d.ts +1573 -0
  39. package/models/components/invokedeploymentrequest.d.ts.map +1 -0
  40. package/models/components/invokedeploymentrequest.js +1137 -0
  41. package/models/components/invokedeploymentrequest.js.map +1 -0
  42. package/models/components/reasoningpart.js +1 -1
  43. package/models/components/toolexecutionstartedstreamingevent.d.ts +4 -4
  44. package/models/components/toolexecutionstartedstreamingevent.d.ts.map +1 -1
  45. package/models/components/toolexecutionstartedstreamingevent.js +7 -7
  46. package/models/components/toolexecutionstartedstreamingevent.js.map +1 -1
  47. package/models/operations/createagentresponserequest.d.ts +2 -329
  48. package/models/operations/createagentresponserequest.d.ts.map +1 -1
  49. package/models/operations/createagentresponserequest.js +3 -166
  50. package/models/operations/createagentresponserequest.js.map +1 -1
  51. package/models/operations/createannotation.d.ts +48 -10
  52. package/models/operations/createannotation.d.ts.map +1 -1
  53. package/models/operations/createannotation.js +37 -5
  54. package/models/operations/createannotation.js.map +1 -1
  55. package/models/operations/createdataset.js +1 -1
  56. package/models/operations/createdatasetitem.d.ts +210 -12
  57. package/models/operations/createdatasetitem.d.ts.map +1 -1
  58. package/models/operations/createdatasetitem.js +136 -9
  59. package/models/operations/createdatasetitem.js.map +1 -1
  60. package/models/operations/createdatasource.d.ts +3 -0
  61. package/models/operations/createdatasource.d.ts.map +1 -1
  62. package/models/operations/createdatasource.js +1 -1
  63. package/models/operations/createdatasource.js.map +1 -1
  64. package/models/operations/createeval.js +16 -16
  65. package/models/operations/createprompt.d.ts +7 -4
  66. package/models/operations/createprompt.d.ts.map +1 -1
  67. package/models/operations/createprompt.js +5 -5
  68. package/models/operations/createprompt.js.map +1 -1
  69. package/models/operations/createtool.js +6 -6
  70. package/models/operations/deleteannotation.d.ts +19 -2
  71. package/models/operations/deleteannotation.d.ts.map +1 -1
  72. package/models/operations/deleteannotation.js +20 -2
  73. package/models/operations/deleteannotation.js.map +1 -1
  74. package/models/operations/deploymentgetconfig.d.ts +440 -440
  75. package/models/operations/deploymentgetconfig.d.ts.map +1 -1
  76. package/models/operations/deploymentgetconfig.js +484 -479
  77. package/models/operations/deploymentgetconfig.js.map +1 -1
  78. package/models/operations/deploymentinvoke.d.ts +0 -1560
  79. package/models/operations/deploymentinvoke.d.ts.map +1 -1
  80. package/models/operations/deploymentinvoke.js +1 -1126
  81. package/models/operations/deploymentinvoke.js.map +1 -1
  82. package/models/operations/deploymentstream.d.ts +56 -56
  83. package/models/operations/deploymentstream.d.ts.map +1 -1
  84. package/models/operations/deploymentstream.js +73 -72
  85. package/models/operations/deploymentstream.js.map +1 -1
  86. package/models/operations/getalltools.js +6 -6
  87. package/models/operations/getevals.js +16 -16
  88. package/models/operations/getv2humanevalsets.js +2 -2
  89. package/models/operations/getv2humanevalsetsid.js +2 -2
  90. package/models/operations/invokeagent.d.ts +51 -48
  91. package/models/operations/invokeagent.d.ts.map +1 -1
  92. package/models/operations/invokeagent.js +43 -46
  93. package/models/operations/invokeagent.js.map +1 -1
  94. package/models/operations/listdatasetdatapoints.d.ts +210 -12
  95. package/models/operations/listdatasetdatapoints.d.ts.map +1 -1
  96. package/models/operations/listdatasetdatapoints.js +138 -9
  97. package/models/operations/listdatasetdatapoints.js.map +1 -1
  98. package/models/operations/listdatasets.js +1 -1
  99. package/models/operations/listdatasources.js +1 -1
  100. package/models/operations/patchv2humanevalsetsid.js +2 -2
  101. package/models/operations/postv2feedbackevaluation.d.ts +33 -12
  102. package/models/operations/postv2feedbackevaluation.d.ts.map +1 -1
  103. package/models/operations/postv2feedbackevaluation.js +9 -6
  104. package/models/operations/postv2feedbackevaluation.js.map +1 -1
  105. package/models/operations/postv2humanevalsets.js +2 -2
  106. package/models/operations/retrievedatapoint.d.ts +210 -12
  107. package/models/operations/retrievedatapoint.d.ts.map +1 -1
  108. package/models/operations/retrievedatapoint.js +140 -8
  109. package/models/operations/retrievedatapoint.js.map +1 -1
  110. package/models/operations/retrievedataset.js +1 -1
  111. package/models/operations/retrievedatasource.js +1 -1
  112. package/models/operations/retrievetool.js +6 -6
  113. package/models/operations/runagent.js +1 -1
  114. package/models/operations/streamagent.d.ts +9 -6
  115. package/models/operations/streamagent.d.ts.map +1 -1
  116. package/models/operations/streamagent.js +6 -6
  117. package/models/operations/streamagent.js.map +1 -1
  118. package/models/operations/streamrunagent.js +1 -1
  119. package/models/operations/updatedatapoint.d.ts +210 -12
  120. package/models/operations/updatedatapoint.d.ts.map +1 -1
  121. package/models/operations/updatedatapoint.js +138 -9
  122. package/models/operations/updatedatapoint.js.map +1 -1
  123. package/models/operations/updatedataset.js +1 -1
  124. package/models/operations/updatedatasource.js +1 -1
  125. package/models/operations/updateeval.js +16 -16
  126. package/models/operations/updateprompt.d.ts +9 -6
  127. package/models/operations/updateprompt.d.ts.map +1 -1
  128. package/models/operations/updateprompt.js +7 -6
  129. package/models/operations/updateprompt.js.map +1 -1
  130. package/models/operations/updatetool.js +7 -7
  131. package/package.json +3 -3
  132. package/sdk/agents.d.ts +2 -2
  133. package/sdk/agents.d.ts.map +1 -1
  134. package/sdk/agents.js.map +1 -1
  135. package/sdk/annotations.d.ts +2 -2
  136. package/sdk/annotations.js +2 -2
  137. package/sdk/deployments.d.ts +2 -1
  138. package/sdk/deployments.d.ts.map +1 -1
  139. package/sdk/deployments.js.map +1 -1
  140. package/sdk/feedback.d.ts +1 -4
  141. package/sdk/feedback.d.ts.map +1 -1
  142. package/sdk/feedback.js +1 -4
  143. package/sdk/feedback.js.map +1 -1
  144. package/sdk/orqresponses.d.ts +1 -1
  145. package/sdk/orqresponses.d.ts.map +1 -1
  146. package/sdk/orqresponses.js +2 -2
  147. package/sdk/orqresponses.js.map +1 -1
  148. package/sdk/prompts.d.ts +1 -1
  149. package/sdk/prompts.d.ts.map +1 -1
  150. package/sdk/prompts.js.map +1 -1
  151. package/src/funcs/agentsInvoke.ts +2 -2
  152. package/src/funcs/agentsResponsesCreate.ts +8 -5
  153. package/src/funcs/agentsStream.ts +2 -2
  154. package/src/funcs/annotationsCreate.ts +1 -1
  155. package/src/funcs/annotationsDelete.ts +1 -1
  156. package/src/funcs/deploymentsInvoke.ts +4 -4
  157. package/src/funcs/promptsCreate.ts +4 -3
  158. package/src/lib/config.ts +2 -2
  159. package/src/models/components/agentresponserequest.ts +565 -0
  160. package/src/models/components/agentthoughtstreamingevent.ts +55 -43
  161. package/src/models/components/index.ts +2 -0
  162. package/src/models/components/invokedeploymentrequest.ts +3457 -0
  163. package/src/models/components/reasoningpart.ts +1 -1
  164. package/src/models/components/toolexecutionstartedstreamingevent.ts +24 -14
  165. package/src/models/operations/createagentresponserequest.ts +4 -550
  166. package/src/models/operations/createannotation.ts +110 -16
  167. package/src/models/operations/createdataset.ts +1 -1
  168. package/src/models/operations/createdatasetitem.ts +335 -19
  169. package/src/models/operations/createdatasource.ts +4 -1
  170. package/src/models/operations/createeval.ts +16 -16
  171. package/src/models/operations/createprompt.ts +13 -8
  172. package/src/models/operations/createtool.ts +6 -6
  173. package/src/models/operations/deleteannotation.ts +46 -3
  174. package/src/models/operations/deploymentgetconfig.ts +1156 -1606
  175. package/src/models/operations/deploymentinvoke.ts +222 -3675
  176. package/src/models/operations/deploymentstream.ts +244 -285
  177. package/src/models/operations/getalltools.ts +6 -6
  178. package/src/models/operations/getevals.ts +16 -16
  179. package/src/models/operations/getv2humanevalsets.ts +2 -2
  180. package/src/models/operations/getv2humanevalsetsid.ts +2 -2
  181. package/src/models/operations/invokeagent.ts +90 -116
  182. package/src/models/operations/listdatasetdatapoints.ts +378 -19
  183. package/src/models/operations/listdatasets.ts +1 -1
  184. package/src/models/operations/listdatasources.ts +1 -1
  185. package/src/models/operations/patchv2humanevalsetsid.ts +2 -2
  186. package/src/models/operations/postv2feedbackevaluation.ts +42 -18
  187. package/src/models/operations/postv2humanevalsets.ts +2 -2
  188. package/src/models/operations/retrievedatapoint.ts +363 -19
  189. package/src/models/operations/retrievedataset.ts +1 -1
  190. package/src/models/operations/retrievedatasource.ts +1 -1
  191. package/src/models/operations/retrievetool.ts +6 -6
  192. package/src/models/operations/runagent.ts +1 -1
  193. package/src/models/operations/streamagent.ts +16 -11
  194. package/src/models/operations/streamrunagent.ts +1 -1
  195. package/src/models/operations/updatedatapoint.ts +366 -19
  196. package/src/models/operations/updatedataset.ts +1 -1
  197. package/src/models/operations/updatedatasource.ts +1 -1
  198. package/src/models/operations/updateeval.ts +16 -16
  199. package/src/models/operations/updateprompt.ts +17 -11
  200. package/src/models/operations/updatetool.ts +7 -7
  201. package/src/sdk/agents.ts +2 -2
  202. package/src/sdk/annotations.ts +2 -2
  203. package/src/sdk/deployments.ts +2 -1
  204. package/src/sdk/feedback.ts +1 -4
  205. package/src/sdk/orqresponses.ts +2 -2
  206. package/src/sdk/prompts.ts +1 -1
@@ -0,0 +1,565 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import { remap as remap$ } from "../../lib/primitives.js";
7
+ import { ClosedEnum } from "../../types/enums.js";
8
+ import {
9
+ ErrorPart,
10
+ ErrorPart$Outbound,
11
+ ErrorPart$outboundSchema,
12
+ } from "./errorpart.js";
13
+ import {
14
+ FilePart,
15
+ FilePart$Outbound,
16
+ FilePart$outboundSchema,
17
+ } from "./filepart.js";
18
+ import {
19
+ TextPart,
20
+ TextPart$Outbound,
21
+ TextPart$outboundSchema,
22
+ } from "./textpart.js";
23
+ import {
24
+ ToolResultPart,
25
+ ToolResultPart$Outbound,
26
+ ToolResultPart$outboundSchema,
27
+ } from "./toolresultpart.js";
28
+
29
+ /**
30
+ * Message containing tool execution results
31
+ */
32
+ export const RoleToolMessage = {
33
+ Tool: "tool",
34
+ } as const;
35
+ /**
36
+ * Message containing tool execution results
37
+ */
38
+ export type RoleToolMessage = ClosedEnum<typeof RoleToolMessage>;
39
+
40
+ /**
41
+ * Message from the end user
42
+ */
43
+ export const RoleUserMessage = {
44
+ User: "user",
45
+ } as const;
46
+ /**
47
+ * Message from the end user
48
+ */
49
+ export type RoleUserMessage = ClosedEnum<typeof RoleUserMessage>;
50
+
51
+ /**
52
+ * Message role (user or tool for continuing executions)
53
+ */
54
+ export type AgentResponseRequestRole = RoleUserMessage | RoleToolMessage;
55
+
56
+ /**
57
+ * 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.
58
+ */
59
+ export type PublicMessagePart =
60
+ | TextPart
61
+ | FilePart
62
+ | ToolResultPart
63
+ | ErrorPart;
64
+
65
+ /**
66
+ * The A2A message to send to the agent (user input or tool results)
67
+ */
68
+ export type A2AMessage = {
69
+ /**
70
+ * Optional A2A message ID in ULID format
71
+ */
72
+ messageId?: string | undefined;
73
+ /**
74
+ * Message role (user or tool for continuing executions)
75
+ */
76
+ role: RoleUserMessage | RoleToolMessage;
77
+ /**
78
+ * A2A message parts (text, file, or tool_result only). Note: Tool role messages must only contain tool_result parts.
79
+ */
80
+ parts: Array<TextPart | FilePart | ToolResultPart | ErrorPart>;
81
+ };
82
+
83
+ /**
84
+ * Information about the identity making the request. If the identity does not exist, it will be created automatically.
85
+ */
86
+ export type AgentResponseRequestIdentity = {
87
+ /**
88
+ * Unique identifier for the contact
89
+ */
90
+ id: string;
91
+ /**
92
+ * Display name of the contact
93
+ */
94
+ displayName?: string | undefined;
95
+ /**
96
+ * Email address of the contact
97
+ */
98
+ email?: string | undefined;
99
+ /**
100
+ * A hash of key/value pairs containing any other data about the contact
101
+ */
102
+ metadata?: Array<{ [k: string]: any }> | undefined;
103
+ /**
104
+ * URL to the contact's avatar or logo
105
+ */
106
+ logoUrl?: string | undefined;
107
+ /**
108
+ * A list of tags associated with the contact
109
+ */
110
+ tags?: Array<string> | undefined;
111
+ };
112
+
113
+ /**
114
+ * @deprecated Use identity instead. Information about the contact making the request.
115
+ *
116
+ * @deprecated class: This will be removed in a future release, please migrate away from it as soon as possible.
117
+ */
118
+ export type Contact = {
119
+ /**
120
+ * Unique identifier for the contact
121
+ */
122
+ id: string;
123
+ /**
124
+ * Display name of the contact
125
+ */
126
+ displayName?: string | undefined;
127
+ /**
128
+ * Email address of the contact
129
+ */
130
+ email?: string | undefined;
131
+ /**
132
+ * A hash of key/value pairs containing any other data about the contact
133
+ */
134
+ metadata?: Array<{ [k: string]: any }> | undefined;
135
+ /**
136
+ * URL to the contact's avatar or logo
137
+ */
138
+ logoUrl?: string | undefined;
139
+ /**
140
+ * A list of tags associated with the contact
141
+ */
142
+ tags?: Array<string> | undefined;
143
+ };
144
+
145
+ /**
146
+ * Thread information to group related requests
147
+ */
148
+ export type AgentResponseRequestThread = {
149
+ /**
150
+ * Unique thread identifier to group related invocations.
151
+ */
152
+ id: string;
153
+ /**
154
+ * Optional tags to differentiate or categorize threads
155
+ */
156
+ tags?: Array<string> | undefined;
157
+ };
158
+
159
+ /**
160
+ * Memory configuration for the agent execution. Used to associate memory stores with specific entities like users or sessions.
161
+ */
162
+ export type Memory = {
163
+ /**
164
+ * An entity ID used to link memory stores to a specific user, session, or conversation. This ID is used to isolate and retrieve memories specific to the entity across agent executions.
165
+ */
166
+ entityId: string;
167
+ };
168
+
169
+ /**
170
+ * Override template engine for this invocation. If not provided, uses the agent default.
171
+ */
172
+ export const Engine = {
173
+ Text: "text",
174
+ Jinja: "jinja",
175
+ Mustache: "mustache",
176
+ } as const;
177
+ /**
178
+ * Override template engine for this invocation. If not provided, uses the agent default.
179
+ */
180
+ export type Engine = ClosedEnum<typeof Engine>;
181
+
182
+ /**
183
+ * Configuration options for the agent invocation
184
+ */
185
+ export type Configuration = {
186
+ /**
187
+ * Whether to block until the agent task completes. When true, the response will include the full task with messages. When false (default), returns immediately with task ID and status.
188
+ */
189
+ blocking?: boolean | undefined;
190
+ };
191
+
192
+ /**
193
+ * Conversation context for chat studio integration
194
+ */
195
+ export type Conversation = {
196
+ /**
197
+ * Unique ULID identifier for the conversation, prefixed with "conv_". Used to link agent executions to a specific conversation thread.
198
+ */
199
+ id: string;
200
+ };
201
+
202
+ /**
203
+ * Request body for creating an agent response. Extends A2AInvokeRequest with response options. Matches POST /v2/agents/{key}/responses
204
+ */
205
+ export type AgentResponseRequest = {
206
+ /**
207
+ * Optional task ID to continue an existing agent execution. When provided, the agent will continue the conversation from the existing task state. The task must be in an inactive state to continue.
208
+ */
209
+ taskId?: string | undefined;
210
+ /**
211
+ * The A2A message to send to the agent (user input or tool results)
212
+ */
213
+ message: A2AMessage;
214
+ /**
215
+ * Optional variables for template replacement in system prompt, instructions, and messages
216
+ */
217
+ variables?: { [k: string]: any } | undefined;
218
+ /**
219
+ * Information about the identity making the request. If the identity does not exist, it will be created automatically.
220
+ */
221
+ identity?: AgentResponseRequestIdentity | undefined;
222
+ /**
223
+ * @deprecated Use identity instead. Information about the contact making the request.
224
+ *
225
+ * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
226
+ */
227
+ contact?: Contact | undefined;
228
+ /**
229
+ * Thread information to group related requests
230
+ */
231
+ thread?: AgentResponseRequestThread | undefined;
232
+ /**
233
+ * Memory configuration for the agent execution. Used to associate memory stores with specific entities like users or sessions.
234
+ */
235
+ memory?: Memory | undefined;
236
+ /**
237
+ * Optional metadata for the agent invocation as key-value pairs that will be included in traces
238
+ */
239
+ metadata?: { [k: string]: any } | undefined;
240
+ /**
241
+ * Override template engine for this invocation. If not provided, uses the agent default.
242
+ */
243
+ engine?: Engine | undefined;
244
+ /**
245
+ * Configuration options for the agent invocation
246
+ */
247
+ configuration?: Configuration | undefined;
248
+ /**
249
+ * If true, returns immediately without waiting for completion. If false (default), waits until the agent becomes inactive or errors.
250
+ */
251
+ background?: boolean | undefined;
252
+ /**
253
+ * If true, returns Server-Sent Events (SSE) streaming response with real-time events. If false (default), returns standard JSON response.
254
+ */
255
+ stream?: boolean | undefined;
256
+ /**
257
+ * Conversation context for chat studio integration
258
+ */
259
+ conversation?: Conversation | undefined;
260
+ };
261
+
262
+ /** @internal */
263
+ export const RoleToolMessage$outboundSchema: z.ZodNativeEnum<
264
+ typeof RoleToolMessage
265
+ > = z.nativeEnum(RoleToolMessage);
266
+
267
+ /** @internal */
268
+ export const RoleUserMessage$outboundSchema: z.ZodNativeEnum<
269
+ typeof RoleUserMessage
270
+ > = z.nativeEnum(RoleUserMessage);
271
+
272
+ /** @internal */
273
+ export type AgentResponseRequestRole$Outbound = string | string;
274
+
275
+ /** @internal */
276
+ export const AgentResponseRequestRole$outboundSchema: z.ZodType<
277
+ AgentResponseRequestRole$Outbound,
278
+ z.ZodTypeDef,
279
+ AgentResponseRequestRole
280
+ > = z.union([RoleUserMessage$outboundSchema, RoleToolMessage$outboundSchema]);
281
+
282
+ export function agentResponseRequestRoleToJSON(
283
+ agentResponseRequestRole: AgentResponseRequestRole,
284
+ ): string {
285
+ return JSON.stringify(
286
+ AgentResponseRequestRole$outboundSchema.parse(agentResponseRequestRole),
287
+ );
288
+ }
289
+
290
+ /** @internal */
291
+ export type PublicMessagePart$Outbound =
292
+ | TextPart$Outbound
293
+ | FilePart$Outbound
294
+ | ToolResultPart$Outbound
295
+ | ErrorPart$Outbound;
296
+
297
+ /** @internal */
298
+ export const PublicMessagePart$outboundSchema: z.ZodType<
299
+ PublicMessagePart$Outbound,
300
+ z.ZodTypeDef,
301
+ PublicMessagePart
302
+ > = z.union([
303
+ TextPart$outboundSchema,
304
+ FilePart$outboundSchema,
305
+ ToolResultPart$outboundSchema,
306
+ ErrorPart$outboundSchema,
307
+ ]);
308
+
309
+ export function publicMessagePartToJSON(
310
+ publicMessagePart: PublicMessagePart,
311
+ ): string {
312
+ return JSON.stringify(
313
+ PublicMessagePart$outboundSchema.parse(publicMessagePart),
314
+ );
315
+ }
316
+
317
+ /** @internal */
318
+ export type A2AMessage$Outbound = {
319
+ messageId?: string | undefined;
320
+ role: string | string;
321
+ parts: Array<
322
+ | TextPart$Outbound
323
+ | FilePart$Outbound
324
+ | ToolResultPart$Outbound
325
+ | ErrorPart$Outbound
326
+ >;
327
+ };
328
+
329
+ /** @internal */
330
+ export const A2AMessage$outboundSchema: z.ZodType<
331
+ A2AMessage$Outbound,
332
+ z.ZodTypeDef,
333
+ A2AMessage
334
+ > = z.object({
335
+ messageId: z.string().optional(),
336
+ role: z.union([
337
+ RoleUserMessage$outboundSchema,
338
+ RoleToolMessage$outboundSchema,
339
+ ]),
340
+ parts: z.array(
341
+ z.union([
342
+ TextPart$outboundSchema,
343
+ FilePart$outboundSchema,
344
+ ToolResultPart$outboundSchema,
345
+ ErrorPart$outboundSchema,
346
+ ]),
347
+ ),
348
+ });
349
+
350
+ export function a2AMessageToJSON(a2AMessage: A2AMessage): string {
351
+ return JSON.stringify(A2AMessage$outboundSchema.parse(a2AMessage));
352
+ }
353
+
354
+ /** @internal */
355
+ export type AgentResponseRequestIdentity$Outbound = {
356
+ id: string;
357
+ display_name?: string | undefined;
358
+ email?: string | undefined;
359
+ metadata?: Array<{ [k: string]: any }> | undefined;
360
+ logo_url?: string | undefined;
361
+ tags?: Array<string> | undefined;
362
+ };
363
+
364
+ /** @internal */
365
+ export const AgentResponseRequestIdentity$outboundSchema: z.ZodType<
366
+ AgentResponseRequestIdentity$Outbound,
367
+ z.ZodTypeDef,
368
+ AgentResponseRequestIdentity
369
+ > = z.object({
370
+ id: z.string(),
371
+ displayName: z.string().optional(),
372
+ email: z.string().optional(),
373
+ metadata: z.array(z.record(z.any())).optional(),
374
+ logoUrl: z.string().optional(),
375
+ tags: z.array(z.string()).optional(),
376
+ }).transform((v) => {
377
+ return remap$(v, {
378
+ displayName: "display_name",
379
+ logoUrl: "logo_url",
380
+ });
381
+ });
382
+
383
+ export function agentResponseRequestIdentityToJSON(
384
+ agentResponseRequestIdentity: AgentResponseRequestIdentity,
385
+ ): string {
386
+ return JSON.stringify(
387
+ AgentResponseRequestIdentity$outboundSchema.parse(
388
+ agentResponseRequestIdentity,
389
+ ),
390
+ );
391
+ }
392
+
393
+ /** @internal */
394
+ export type Contact$Outbound = {
395
+ id: string;
396
+ display_name?: string | undefined;
397
+ email?: string | undefined;
398
+ metadata?: Array<{ [k: string]: any }> | undefined;
399
+ logo_url?: string | undefined;
400
+ tags?: Array<string> | undefined;
401
+ };
402
+
403
+ /** @internal */
404
+ export const Contact$outboundSchema: z.ZodType<
405
+ Contact$Outbound,
406
+ z.ZodTypeDef,
407
+ Contact
408
+ > = z.object({
409
+ id: z.string(),
410
+ displayName: z.string().optional(),
411
+ email: z.string().optional(),
412
+ metadata: z.array(z.record(z.any())).optional(),
413
+ logoUrl: z.string().optional(),
414
+ tags: z.array(z.string()).optional(),
415
+ }).transform((v) => {
416
+ return remap$(v, {
417
+ displayName: "display_name",
418
+ logoUrl: "logo_url",
419
+ });
420
+ });
421
+
422
+ export function contactToJSON(contact: Contact): string {
423
+ return JSON.stringify(Contact$outboundSchema.parse(contact));
424
+ }
425
+
426
+ /** @internal */
427
+ export type AgentResponseRequestThread$Outbound = {
428
+ id: string;
429
+ tags?: Array<string> | undefined;
430
+ };
431
+
432
+ /** @internal */
433
+ export const AgentResponseRequestThread$outboundSchema: z.ZodType<
434
+ AgentResponseRequestThread$Outbound,
435
+ z.ZodTypeDef,
436
+ AgentResponseRequestThread
437
+ > = z.object({
438
+ id: z.string(),
439
+ tags: z.array(z.string()).optional(),
440
+ });
441
+
442
+ export function agentResponseRequestThreadToJSON(
443
+ agentResponseRequestThread: AgentResponseRequestThread,
444
+ ): string {
445
+ return JSON.stringify(
446
+ AgentResponseRequestThread$outboundSchema.parse(agentResponseRequestThread),
447
+ );
448
+ }
449
+
450
+ /** @internal */
451
+ export type Memory$Outbound = {
452
+ entity_id: string;
453
+ };
454
+
455
+ /** @internal */
456
+ export const Memory$outboundSchema: z.ZodType<
457
+ Memory$Outbound,
458
+ z.ZodTypeDef,
459
+ Memory
460
+ > = z.object({
461
+ entityId: z.string(),
462
+ }).transform((v) => {
463
+ return remap$(v, {
464
+ entityId: "entity_id",
465
+ });
466
+ });
467
+
468
+ export function memoryToJSON(memory: Memory): string {
469
+ return JSON.stringify(Memory$outboundSchema.parse(memory));
470
+ }
471
+
472
+ /** @internal */
473
+ export const Engine$outboundSchema: z.ZodNativeEnum<typeof Engine> = z
474
+ .nativeEnum(Engine);
475
+
476
+ /** @internal */
477
+ export type Configuration$Outbound = {
478
+ blocking: boolean;
479
+ };
480
+
481
+ /** @internal */
482
+ export const Configuration$outboundSchema: z.ZodType<
483
+ Configuration$Outbound,
484
+ z.ZodTypeDef,
485
+ Configuration
486
+ > = z.object({
487
+ blocking: z.boolean().default(false),
488
+ });
489
+
490
+ export function configurationToJSON(configuration: Configuration): string {
491
+ return JSON.stringify(Configuration$outboundSchema.parse(configuration));
492
+ }
493
+
494
+ /** @internal */
495
+ export type Conversation$Outbound = {
496
+ _id: string;
497
+ };
498
+
499
+ /** @internal */
500
+ export const Conversation$outboundSchema: z.ZodType<
501
+ Conversation$Outbound,
502
+ z.ZodTypeDef,
503
+ Conversation
504
+ > = z.object({
505
+ id: z.string(),
506
+ }).transform((v) => {
507
+ return remap$(v, {
508
+ id: "_id",
509
+ });
510
+ });
511
+
512
+ export function conversationToJSON(conversation: Conversation): string {
513
+ return JSON.stringify(Conversation$outboundSchema.parse(conversation));
514
+ }
515
+
516
+ /** @internal */
517
+ export type AgentResponseRequest$Outbound = {
518
+ task_id?: string | undefined;
519
+ message: A2AMessage$Outbound;
520
+ variables?: { [k: string]: any } | undefined;
521
+ identity?: AgentResponseRequestIdentity$Outbound | undefined;
522
+ contact?: Contact$Outbound | undefined;
523
+ thread?: AgentResponseRequestThread$Outbound | undefined;
524
+ memory?: Memory$Outbound | undefined;
525
+ metadata?: { [k: string]: any } | undefined;
526
+ engine?: string | undefined;
527
+ configuration?: Configuration$Outbound | undefined;
528
+ background: boolean;
529
+ stream: boolean;
530
+ conversation?: Conversation$Outbound | undefined;
531
+ };
532
+
533
+ /** @internal */
534
+ export const AgentResponseRequest$outboundSchema: z.ZodType<
535
+ AgentResponseRequest$Outbound,
536
+ z.ZodTypeDef,
537
+ AgentResponseRequest
538
+ > = z.object({
539
+ taskId: z.string().optional(),
540
+ message: z.lazy(() => A2AMessage$outboundSchema),
541
+ variables: z.record(z.any()).optional(),
542
+ identity: z.lazy(() => AgentResponseRequestIdentity$outboundSchema)
543
+ .optional(),
544
+ contact: z.lazy(() => Contact$outboundSchema).optional(),
545
+ thread: z.lazy(() => AgentResponseRequestThread$outboundSchema).optional(),
546
+ memory: z.lazy(() => Memory$outboundSchema).optional(),
547
+ metadata: z.record(z.any()).optional(),
548
+ engine: Engine$outboundSchema.optional(),
549
+ configuration: z.lazy(() => Configuration$outboundSchema).optional(),
550
+ background: z.boolean().default(false),
551
+ stream: z.boolean().default(false),
552
+ conversation: z.lazy(() => Conversation$outboundSchema).optional(),
553
+ }).transform((v) => {
554
+ return remap$(v, {
555
+ taskId: "task_id",
556
+ });
557
+ });
558
+
559
+ export function agentResponseRequestToJSON(
560
+ agentResponseRequest: AgentResponseRequest,
561
+ ): string {
562
+ return JSON.stringify(
563
+ AgentResponseRequest$outboundSchema.parse(agentResponseRequest),
564
+ );
565
+ }