@orq-ai/node 4.0.0-rc.51 → 4.0.0-rc.52

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 (161) hide show
  1. package/README.md +3 -4
  2. package/bin/mcp-server.js +1125 -606
  3. package/bin/mcp-server.js.map +50 -51
  4. package/docs/sdks/agents/README.md +80 -80
  5. package/examples/package-lock.json +1 -1
  6. package/funcs/agentsInvoke.d.ts +1 -1
  7. package/funcs/agentsInvoke.d.ts.map +1 -1
  8. package/funcs/agentsInvoke.js +1 -1
  9. package/funcs/agentsInvoke.js.map +1 -1
  10. package/funcs/agentsListTasks.d.ts +1 -1
  11. package/funcs/agentsListTasks.d.ts.map +1 -1
  12. package/funcs/agentsListTasks.js +1 -1
  13. package/funcs/agentsListTasks.js.map +1 -1
  14. package/funcs/agentsRetrieveTask.d.ts +1 -1
  15. package/funcs/agentsRetrieveTask.d.ts.map +1 -1
  16. package/funcs/agentsRetrieveTask.js +1 -1
  17. package/funcs/agentsRetrieveTask.js.map +1 -1
  18. package/funcs/agentsRun.d.ts +1 -1
  19. package/funcs/agentsRun.d.ts.map +1 -1
  20. package/funcs/agentsRun.js +1 -1
  21. package/funcs/agentsRun.js.map +1 -1
  22. package/jsr.json +1 -1
  23. package/lib/config.d.ts +2 -2
  24. package/lib/config.js +2 -2
  25. package/mcp-server/mcp-server.js +1 -1
  26. package/mcp-server/server.js +2 -2
  27. package/mcp-server/server.js.map +1 -1
  28. package/models/errors/index.d.ts +0 -1
  29. package/models/errors/index.d.ts.map +1 -1
  30. package/models/errors/index.js +0 -1
  31. package/models/errors/index.js.map +1 -1
  32. package/models/operations/createbudget.js +2 -2
  33. package/models/operations/createcontact.js +2 -2
  34. package/models/operations/createdataset.js +2 -2
  35. package/models/operations/createdatasetitem.js +8 -8
  36. package/models/operations/createdatasource.js +2 -2
  37. package/models/operations/createeval.js +28 -28
  38. package/models/operations/createtool.d.ts +25 -25
  39. package/models/operations/createtool.d.ts.map +1 -1
  40. package/models/operations/createtool.js +41 -41
  41. package/models/operations/createtool.js.map +1 -1
  42. package/models/operations/deploymentinvoke.d.ts +6 -6
  43. package/models/operations/deploymentinvoke.d.ts.map +1 -1
  44. package/models/operations/deploymentinvoke.js +9 -9
  45. package/models/operations/deploymentinvoke.js.map +1 -1
  46. package/models/operations/fileget.js +2 -2
  47. package/models/operations/filelist.js +2 -2
  48. package/models/operations/fileupload.js +2 -2
  49. package/models/operations/getagenttask.d.ts +682 -108
  50. package/models/operations/getagenttask.d.ts.map +1 -1
  51. package/models/operations/getagenttask.js +635 -155
  52. package/models/operations/getagenttask.js.map +1 -1
  53. package/models/operations/getalltools.js +12 -12
  54. package/models/operations/getbudget.js +2 -2
  55. package/models/operations/getevals.js +28 -28
  56. package/models/operations/invokeagent.d.ts +143 -123
  57. package/models/operations/invokeagent.d.ts.map +1 -1
  58. package/models/operations/invokeagent.js +143 -146
  59. package/models/operations/invokeagent.js.map +1 -1
  60. package/models/operations/listagenttasks.d.ts +680 -118
  61. package/models/operations/listagenttasks.d.ts.map +1 -1
  62. package/models/operations/listagenttasks.js +612 -144
  63. package/models/operations/listagenttasks.js.map +1 -1
  64. package/models/operations/listbudgets.js +2 -2
  65. package/models/operations/listchunks.d.ts +6 -6
  66. package/models/operations/listchunks.d.ts.map +1 -1
  67. package/models/operations/listchunks.js +9 -9
  68. package/models/operations/listchunks.js.map +1 -1
  69. package/models/operations/listcontacts.js +2 -2
  70. package/models/operations/listdatasetdatapoints.js +8 -8
  71. package/models/operations/listdatasets.js +2 -2
  72. package/models/operations/listdatasources.d.ts +6 -6
  73. package/models/operations/listdatasources.d.ts.map +1 -1
  74. package/models/operations/listdatasources.js +12 -11
  75. package/models/operations/listdatasources.js.map +1 -1
  76. package/models/operations/retrievecontact.js +2 -2
  77. package/models/operations/retrievedatapoint.js +8 -8
  78. package/models/operations/retrievedataset.js +2 -2
  79. package/models/operations/retrievedatasource.js +2 -2
  80. package/models/operations/retrievetool.js +12 -12
  81. package/models/operations/runagent.d.ts +112 -98
  82. package/models/operations/runagent.d.ts.map +1 -1
  83. package/models/operations/runagent.js +120 -121
  84. package/models/operations/runagent.js.map +1 -1
  85. package/models/operations/streamagent.d.ts +18 -12
  86. package/models/operations/streamagent.d.ts.map +1 -1
  87. package/models/operations/streamagent.js +13 -13
  88. package/models/operations/streamagent.js.map +1 -1
  89. package/models/operations/streamrunagent.d.ts +12 -12
  90. package/models/operations/streamrunagent.d.ts.map +1 -1
  91. package/models/operations/streamrunagent.js +15 -15
  92. package/models/operations/streamrunagent.js.map +1 -1
  93. package/models/operations/updateagent.d.ts +11 -8
  94. package/models/operations/updateagent.d.ts.map +1 -1
  95. package/models/operations/updateagent.js +13 -11
  96. package/models/operations/updateagent.js.map +1 -1
  97. package/models/operations/updatebudget.js +2 -2
  98. package/models/operations/updatecontact.js +2 -2
  99. package/models/operations/updatedatapoint.js +8 -8
  100. package/models/operations/updatedataset.js +2 -2
  101. package/models/operations/updatedatasource.js +2 -2
  102. package/models/operations/updateeval.js +28 -28
  103. package/models/operations/updatetool.js +14 -14
  104. package/package.json +1 -1
  105. package/sdk/agents.d.ts +10 -10
  106. package/sdk/agents.d.ts.map +1 -1
  107. package/sdk/agents.js +9 -9
  108. package/sdk/agents.js.map +1 -1
  109. package/src/funcs/agentsInvoke.ts +4 -4
  110. package/src/funcs/agentsListTasks.ts +4 -4
  111. package/src/funcs/agentsRetrieveTask.ts +8 -8
  112. package/src/funcs/agentsRun.ts +4 -4
  113. package/src/lib/config.ts +2 -2
  114. package/src/mcp-server/mcp-server.ts +1 -1
  115. package/src/mcp-server/server.ts +2 -2
  116. package/src/models/errors/index.ts +0 -1
  117. package/src/models/operations/createbudget.ts +2 -2
  118. package/src/models/operations/createcontact.ts +2 -2
  119. package/src/models/operations/createdataset.ts +2 -2
  120. package/src/models/operations/createdatasetitem.ts +8 -8
  121. package/src/models/operations/createdatasource.ts +2 -2
  122. package/src/models/operations/createeval.ts +28 -28
  123. package/src/models/operations/createtool.ts +76 -76
  124. package/src/models/operations/deploymentinvoke.ts +17 -24
  125. package/src/models/operations/fileget.ts +2 -2
  126. package/src/models/operations/filelist.ts +2 -2
  127. package/src/models/operations/fileupload.ts +2 -2
  128. package/src/models/operations/getagenttask.ts +1873 -428
  129. package/src/models/operations/getalltools.ts +12 -12
  130. package/src/models/operations/getbudget.ts +2 -2
  131. package/src/models/operations/getevals.ts +28 -28
  132. package/src/models/operations/invokeagent.ts +319 -299
  133. package/src/models/operations/listagenttasks.ts +2029 -540
  134. package/src/models/operations/listbudgets.ts +2 -2
  135. package/src/models/operations/listchunks.ts +14 -14
  136. package/src/models/operations/listcontacts.ts +2 -2
  137. package/src/models/operations/listdatasetdatapoints.ts +8 -8
  138. package/src/models/operations/listdatasets.ts +2 -2
  139. package/src/models/operations/listdatasources.ts +15 -22
  140. package/src/models/operations/retrievecontact.ts +2 -2
  141. package/src/models/operations/retrievedatapoint.ts +8 -8
  142. package/src/models/operations/retrievedataset.ts +2 -2
  143. package/src/models/operations/retrievedatasource.ts +2 -2
  144. package/src/models/operations/retrievetool.ts +12 -12
  145. package/src/models/operations/runagent.ts +264 -220
  146. package/src/models/operations/streamagent.ts +28 -22
  147. package/src/models/operations/streamrunagent.ts +24 -24
  148. package/src/models/operations/updateagent.ts +25 -18
  149. package/src/models/operations/updatebudget.ts +2 -2
  150. package/src/models/operations/updatecontact.ts +2 -2
  151. package/src/models/operations/updatedatapoint.ts +8 -8
  152. package/src/models/operations/updatedataset.ts +2 -2
  153. package/src/models/operations/updatedatasource.ts +2 -2
  154. package/src/models/operations/updateeval.ts +28 -28
  155. package/src/models/operations/updatetool.ts +14 -14
  156. package/src/sdk/agents.ts +20 -20
  157. package/models/errors/getagenttask.d.ts +0 -29
  158. package/models/errors/getagenttask.d.ts.map +0 -1
  159. package/models/errors/getagenttask.js +0 -74
  160. package/models/errors/getagenttask.js.map +0 -1
  161. package/src/models/errors/getagenttask.ts +0 -67
@@ -10,24 +10,24 @@ import { Result as SafeParseResult } from "../../types/fp.js";
10
10
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
11
11
 
12
12
  /**
13
- * Tool message
13
+ * Message containing tool execution results
14
14
  */
15
15
  export const RoleToolMessage = {
16
16
  Tool: "tool",
17
17
  } as const;
18
18
  /**
19
- * Tool message
19
+ * Message containing tool execution results
20
20
  */
21
21
  export type RoleToolMessage = ClosedEnum<typeof RoleToolMessage>;
22
22
 
23
23
  /**
24
- * User message
24
+ * Message from the end user
25
25
  */
26
26
  export const RoleUserMessage = {
27
27
  User: "user",
28
28
  } as const;
29
29
  /**
30
- * User message
30
+ * Message from the end user
31
31
  */
32
32
  export type RoleUserMessage = ClosedEnum<typeof RoleUserMessage>;
33
33
 
@@ -123,7 +123,10 @@ export type TextPart = {
123
123
  */
124
124
  export type PublicMessagePart = TextPart | FilePart | ToolResultPart;
125
125
 
126
- export type Message = {
126
+ /**
127
+ * The A2A message to send to the agent (user input or tool results)
128
+ */
129
+ export type A2AMessage = {
127
130
  /**
128
131
  * Optional A2A message ID in ULID format
129
132
  */
@@ -197,7 +200,10 @@ export type InvokeAgentRequestBody = {
197
200
  * 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.
198
201
  */
199
202
  taskId?: string | undefined;
200
- message: Message;
203
+ /**
204
+ * The A2A message to send to the agent (user input or tool results)
205
+ */
206
+ message: A2AMessage;
201
207
  /**
202
208
  * Optional variables for template replacement in system prompt, instructions, and messages
203
209
  */
@@ -229,34 +235,33 @@ export type InvokeAgentRequest = {
229
235
  };
230
236
 
231
237
  /**
232
- * A2A entity type
238
+ * A2A entity type identifier
233
239
  */
234
240
  export const InvokeAgentKind = {
235
241
  Task: "task",
236
242
  } as const;
237
243
  /**
238
- * A2A entity type
244
+ * A2A entity type identifier
239
245
  */
240
246
  export type InvokeAgentKind = ClosedEnum<typeof InvokeAgentKind>;
241
247
 
242
248
  /**
243
- * Current task state
249
+ * Current state of the agent task execution. Values: submitted (queued), working (executing), input-required (awaiting user input), completed (finished successfully), failed (error occurred). Note: auth-required, canceled, and rejected statuses are defined for A2A protocol compatibility but are not currently supported in task execution.
244
250
  */
245
- export const InvokeAgentState = {
251
+ export const TaskState = {
246
252
  Submitted: "submitted",
247
253
  Working: "working",
248
254
  InputRequired: "input-required",
255
+ AuthRequired: "auth-required",
249
256
  Completed: "completed",
250
257
  Failed: "failed",
251
258
  Canceled: "canceled",
252
259
  Rejected: "rejected",
253
- AuthRequired: "auth-required",
254
- Unknown: "unknown",
255
260
  } as const;
256
261
  /**
257
- * Current task state
262
+ * Current state of the agent task execution. Values: submitted (queued), working (executing), input-required (awaiting user input), completed (finished successfully), failed (error occurred). Note: auth-required, canceled, and rejected statuses are defined for A2A protocol compatibility but are not currently supported in task execution.
258
263
  */
259
- export type InvokeAgentState = ClosedEnum<typeof InvokeAgentState>;
264
+ export type TaskState = ClosedEnum<typeof TaskState>;
260
265
 
261
266
  export const InvokeAgentAgentsKind = {
262
267
  Message: "message",
@@ -264,53 +269,61 @@ export const InvokeAgentAgentsKind = {
264
269
  export type InvokeAgentAgentsKind = ClosedEnum<typeof InvokeAgentAgentsKind>;
265
270
 
266
271
  /**
267
- * Extended A2A message role
272
+ * Role of the message sender in the A2A protocol. Values: user (end user), agent (AI agent), tool (tool execution result), system (system instructions/prompts).
268
273
  */
269
- export const InvokeAgentAgentsRole = {
274
+ export const InvokeAgentExtendedMessageRole = {
270
275
  User: "user",
271
276
  Agent: "agent",
272
277
  Tool: "tool",
273
278
  System: "system",
274
279
  } as const;
275
280
  /**
276
- * Extended A2A message role
281
+ * Role of the message sender in the A2A protocol. Values: user (end user), agent (AI agent), tool (tool execution result), system (system instructions/prompts).
277
282
  */
278
- export type InvokeAgentAgentsRole = ClosedEnum<typeof InvokeAgentAgentsRole>;
283
+ export type InvokeAgentExtendedMessageRole = ClosedEnum<
284
+ typeof InvokeAgentExtendedMessageRole
285
+ >;
279
286
 
280
- export const InvokeAgentPartsAgentsResponse200ApplicationJSONKind = {
287
+ export const InvokeAgentPartsAgentsResponse200Kind = {
281
288
  ToolResult: "tool_result",
282
289
  } as const;
283
- export type InvokeAgentPartsAgentsResponse200ApplicationJSONKind = ClosedEnum<
284
- typeof InvokeAgentPartsAgentsResponse200ApplicationJSONKind
290
+ export type InvokeAgentPartsAgentsResponse200Kind = ClosedEnum<
291
+ typeof InvokeAgentPartsAgentsResponse200Kind
285
292
  >;
286
293
 
287
- export type InvokeAgentParts5 = {
288
- kind: InvokeAgentPartsAgentsResponse200ApplicationJSONKind;
294
+ /**
295
+ * The result of a tool execution. Contains the tool call ID for correlation and the result data from the tool invocation.
296
+ */
297
+ export type InvokeAgentPartsToolResultPart = {
298
+ kind: InvokeAgentPartsAgentsResponse200Kind;
289
299
  toolCallId: string;
290
300
  result?: any | undefined;
291
301
  metadata?: { [k: string]: any } | undefined;
292
302
  };
293
303
 
294
- export const InvokeAgentPartsAgentsResponse200Kind = {
304
+ export const InvokeAgentPartsAgentsResponseKind = {
295
305
  ToolCall: "tool_call",
296
306
  } as const;
297
- export type InvokeAgentPartsAgentsResponse200Kind = ClosedEnum<
298
- typeof InvokeAgentPartsAgentsResponse200Kind
307
+ export type InvokeAgentPartsAgentsResponseKind = ClosedEnum<
308
+ typeof InvokeAgentPartsAgentsResponseKind
299
309
  >;
300
310
 
301
- export type InvokeAgentParts4 = {
302
- kind: InvokeAgentPartsAgentsResponse200Kind;
311
+ /**
312
+ * A tool invocation request from an agent. Contains the tool name, unique call ID, and arguments for the tool execution.
313
+ */
314
+ export type InvokeAgentPartsToolCallPart = {
315
+ kind: InvokeAgentPartsAgentsResponseKind;
303
316
  toolName: string;
304
317
  toolCallId: string;
305
318
  arguments: { [k: string]: any };
306
319
  metadata?: { [k: string]: any } | undefined;
307
320
  };
308
321
 
309
- export const InvokeAgentPartsAgentsResponseKind = {
322
+ export const InvokeAgentPartsAgentsKind = {
310
323
  File: "file",
311
324
  } as const;
312
- export type InvokeAgentPartsAgentsResponseKind = ClosedEnum<
313
- typeof InvokeAgentPartsAgentsResponseKind
325
+ export type InvokeAgentPartsAgentsKind = ClosedEnum<
326
+ typeof InvokeAgentPartsAgentsKind
314
327
  >;
315
328
 
316
329
  /**
@@ -353,101 +366,110 @@ export type InvokeAgentPartsFile =
353
366
  | InvokeAgentFileBinaryFormat
354
367
  | InvokeAgentFileFileInURIFormat;
355
368
 
356
- export type InvokeAgentParts3 = {
357
- kind: InvokeAgentPartsAgentsResponseKind;
369
+ /**
370
+ * A file content part that can contain either base64-encoded bytes or a URI reference. Used for images, documents, and other binary content in agent communications.
371
+ */
372
+ export type InvokeAgentPartsFilePart = {
373
+ kind: InvokeAgentPartsAgentsKind;
358
374
  file: InvokeAgentFileBinaryFormat | InvokeAgentFileFileInURIFormat;
359
375
  metadata?: { [k: string]: any } | undefined;
360
376
  };
361
377
 
362
- export const InvokeAgentPartsAgentsKind = {
378
+ export const InvokeAgentPartsKind = {
363
379
  Data: "data",
364
380
  } as const;
365
- export type InvokeAgentPartsAgentsKind = ClosedEnum<
366
- typeof InvokeAgentPartsAgentsKind
367
- >;
381
+ export type InvokeAgentPartsKind = ClosedEnum<typeof InvokeAgentPartsKind>;
368
382
 
369
- export type InvokeAgentParts2 = {
370
- kind: InvokeAgentPartsAgentsKind;
383
+ /**
384
+ * A structured data part containing JSON-serializable key-value pairs. Used for passing structured information between agents and tools.
385
+ */
386
+ export type InvokeAgentPartsDataPart = {
387
+ kind: InvokeAgentPartsKind;
371
388
  data: { [k: string]: any };
372
389
  metadata?: { [k: string]: any } | undefined;
373
390
  };
374
391
 
375
- export const InvokeAgentPartsKind = {
392
+ export const InvokeAgentPartsAgentsResponse200ApplicationJSONKind = {
376
393
  Text: "text",
377
394
  } as const;
378
- export type InvokeAgentPartsKind = ClosedEnum<typeof InvokeAgentPartsKind>;
395
+ export type InvokeAgentPartsAgentsResponse200ApplicationJSONKind = ClosedEnum<
396
+ typeof InvokeAgentPartsAgentsResponse200ApplicationJSONKind
397
+ >;
379
398
 
380
- export type InvokeAgentParts1 = {
381
- kind: InvokeAgentPartsKind;
399
+ /**
400
+ * A text content part containing plain text or markdown. Used for agent messages, user input, and text-based responses.
401
+ */
402
+ export type InvokeAgentPartsTextPart = {
403
+ kind: InvokeAgentPartsAgentsResponse200ApplicationJSONKind;
382
404
  text: string;
383
405
  };
384
406
 
385
407
  export type InvokeAgentParts =
386
- | InvokeAgentParts4
387
- | InvokeAgentParts1
388
- | InvokeAgentParts2
389
- | InvokeAgentParts3
390
- | InvokeAgentParts5;
408
+ | InvokeAgentPartsToolCallPart
409
+ | InvokeAgentPartsTextPart
410
+ | InvokeAgentPartsDataPart
411
+ | InvokeAgentPartsFilePart
412
+ | InvokeAgentPartsToolResultPart;
391
413
 
392
414
  /**
393
- * Optional status message
415
+ * Optional A2A message providing additional context about the current status
394
416
  */
395
- export type InvokeAgentMessage = {
417
+ export type TaskStatusMessage = {
396
418
  kind: InvokeAgentAgentsKind;
397
419
  messageId: string;
398
420
  /**
399
- * Extended A2A message role
421
+ * Role of the message sender in the A2A protocol. Values: user (end user), agent (AI agent), tool (tool execution result), system (system instructions/prompts).
400
422
  */
401
- role: InvokeAgentAgentsRole;
423
+ role: InvokeAgentExtendedMessageRole;
402
424
  parts: Array<
403
- | InvokeAgentParts4
404
- | InvokeAgentParts1
405
- | InvokeAgentParts2
406
- | InvokeAgentParts3
407
- | InvokeAgentParts5
425
+ | InvokeAgentPartsToolCallPart
426
+ | InvokeAgentPartsTextPart
427
+ | InvokeAgentPartsDataPart
428
+ | InvokeAgentPartsFilePart
429
+ | InvokeAgentPartsToolResultPart
408
430
  >;
409
431
  };
410
432
 
411
433
  /**
412
- * Task status information
434
+ * Current task status information
413
435
  */
414
- export type InvokeAgentStatus = {
436
+ export type TaskStatus = {
415
437
  /**
416
- * Current task state
438
+ * Current state of the agent task execution. Values: submitted (queued), working (executing), input-required (awaiting user input), completed (finished successfully), failed (error occurred). Note: auth-required, canceled, and rejected statuses are defined for A2A protocol compatibility but are not currently supported in task execution.
417
439
  */
418
- state: InvokeAgentState;
440
+ state: TaskState;
419
441
  /**
420
- * ISO timestamp of status update
442
+ * ISO 8601 timestamp of when the status was updated
421
443
  */
422
444
  timestamp?: string | undefined;
423
445
  /**
424
- * Optional status message
446
+ * Optional A2A message providing additional context about the current status
425
447
  */
426
- message?: InvokeAgentMessage | undefined;
448
+ message?: TaskStatusMessage | undefined;
427
449
  };
428
450
 
429
451
  /**
430
- * A2A Task response format
452
+ * Response format following the Agent-to-Agent (A2A) protocol. Returned when starting or continuing an agent task execution.
431
453
  */
432
- export type InvokeAgentResponseBody = {
454
+ export type InvokeAgentA2ATaskResponse = {
433
455
  /**
434
- * The ID of the created agent execution task
456
+ * The unique ID of the created agent execution task
435
457
  */
436
458
  id: string;
437
459
  /**
438
- * The correlation ID for this execution
460
+ * The correlation ID for this execution (used for tracking)
439
461
  */
440
462
  contextId: string;
441
463
  /**
442
- * A2A entity type
464
+ * A2A entity type identifier
443
465
  */
444
466
  kind: InvokeAgentKind;
445
467
  /**
446
- * Task status information
468
+ * Current task status information
447
469
  */
448
- status: InvokeAgentStatus;
470
+ status: TaskStatus;
449
471
  /**
450
- * Task metadata containing workspace_id and trace_id for feedback
472
+ * Task metadata containing workspace_id and trace_id for feedback and tracking
451
473
  */
452
474
  metadata?: { [k: string]: any } | undefined;
453
475
  };
@@ -834,33 +856,33 @@ export function publicMessagePartFromJSON(
834
856
  }
835
857
 
836
858
  /** @internal */
837
- export const Message$inboundSchema: z.ZodType<Message, z.ZodTypeDef, unknown> =
838
- z.object({
839
- messageId: z.string().optional(),
840
- role: z.union([
841
- RoleUserMessage$inboundSchema,
842
- RoleToolMessage$inboundSchema,
859
+ export const A2AMessage$inboundSchema: z.ZodType<
860
+ A2AMessage,
861
+ z.ZodTypeDef,
862
+ unknown
863
+ > = z.object({
864
+ messageId: z.string().optional(),
865
+ role: z.union([RoleUserMessage$inboundSchema, RoleToolMessage$inboundSchema]),
866
+ parts: z.array(
867
+ z.union([
868
+ z.lazy(() => TextPart$inboundSchema),
869
+ z.lazy(() => FilePart$inboundSchema),
870
+ z.lazy(() => ToolResultPart$inboundSchema),
843
871
  ]),
844
- parts: z.array(
845
- z.union([
846
- z.lazy(() => TextPart$inboundSchema),
847
- z.lazy(() => FilePart$inboundSchema),
848
- z.lazy(() => ToolResultPart$inboundSchema),
849
- ]),
850
- ),
851
- });
872
+ ),
873
+ });
852
874
  /** @internal */
853
- export type Message$Outbound = {
875
+ export type A2AMessage$Outbound = {
854
876
  messageId?: string | undefined;
855
877
  role: string | string;
856
878
  parts: Array<TextPart$Outbound | FilePart$Outbound | ToolResultPart$Outbound>;
857
879
  };
858
880
 
859
881
  /** @internal */
860
- export const Message$outboundSchema: z.ZodType<
861
- Message$Outbound,
882
+ export const A2AMessage$outboundSchema: z.ZodType<
883
+ A2AMessage$Outbound,
862
884
  z.ZodTypeDef,
863
- Message
885
+ A2AMessage
864
886
  > = z.object({
865
887
  messageId: z.string().optional(),
866
888
  role: z.union([
@@ -876,16 +898,16 @@ export const Message$outboundSchema: z.ZodType<
876
898
  ),
877
899
  });
878
900
 
879
- export function messageToJSON(message: Message): string {
880
- return JSON.stringify(Message$outboundSchema.parse(message));
901
+ export function a2AMessageToJSON(a2AMessage: A2AMessage): string {
902
+ return JSON.stringify(A2AMessage$outboundSchema.parse(a2AMessage));
881
903
  }
882
- export function messageFromJSON(
904
+ export function a2AMessageFromJSON(
883
905
  jsonString: string,
884
- ): SafeParseResult<Message, SDKValidationError> {
906
+ ): SafeParseResult<A2AMessage, SDKValidationError> {
885
907
  return safeParse(
886
908
  jsonString,
887
- (x) => Message$inboundSchema.parse(JSON.parse(x)),
888
- `Failed to parse 'Message' from JSON`,
909
+ (x) => A2AMessage$inboundSchema.parse(JSON.parse(x)),
910
+ `Failed to parse 'A2AMessage' from JSON`,
889
911
  );
890
912
  }
891
913
 
@@ -1035,7 +1057,7 @@ export const InvokeAgentRequestBody$inboundSchema: z.ZodType<
1035
1057
  unknown
1036
1058
  > = z.object({
1037
1059
  task_id: z.string().optional(),
1038
- message: z.lazy(() => Message$inboundSchema),
1060
+ message: z.lazy(() => A2AMessage$inboundSchema),
1039
1061
  variables: z.record(z.any()).optional(),
1040
1062
  contact: z.lazy(() => Contact$inboundSchema).optional(),
1041
1063
  thread: z.lazy(() => InvokeAgentThread$inboundSchema).optional(),
@@ -1049,7 +1071,7 @@ export const InvokeAgentRequestBody$inboundSchema: z.ZodType<
1049
1071
  /** @internal */
1050
1072
  export type InvokeAgentRequestBody$Outbound = {
1051
1073
  task_id?: string | undefined;
1052
- message: Message$Outbound;
1074
+ message: A2AMessage$Outbound;
1053
1075
  variables?: { [k: string]: any } | undefined;
1054
1076
  contact?: Contact$Outbound | undefined;
1055
1077
  thread?: InvokeAgentThread$Outbound | undefined;
@@ -1064,7 +1086,7 @@ export const InvokeAgentRequestBody$outboundSchema: z.ZodType<
1064
1086
  InvokeAgentRequestBody
1065
1087
  > = z.object({
1066
1088
  taskId: z.string().optional(),
1067
- message: z.lazy(() => Message$outboundSchema),
1089
+ message: z.lazy(() => A2AMessage$outboundSchema),
1068
1090
  variables: z.record(z.any()).optional(),
1069
1091
  contact: z.lazy(() => Contact$outboundSchema).optional(),
1070
1092
  thread: z.lazy(() => InvokeAgentThread$outboundSchema).optional(),
@@ -1153,13 +1175,11 @@ export const InvokeAgentKind$outboundSchema: z.ZodNativeEnum<
1153
1175
  > = InvokeAgentKind$inboundSchema;
1154
1176
 
1155
1177
  /** @internal */
1156
- export const InvokeAgentState$inboundSchema: z.ZodNativeEnum<
1157
- typeof InvokeAgentState
1158
- > = z.nativeEnum(InvokeAgentState);
1178
+ export const TaskState$inboundSchema: z.ZodNativeEnum<typeof TaskState> = z
1179
+ .nativeEnum(TaskState);
1159
1180
  /** @internal */
1160
- export const InvokeAgentState$outboundSchema: z.ZodNativeEnum<
1161
- typeof InvokeAgentState
1162
- > = InvokeAgentState$inboundSchema;
1181
+ export const TaskState$outboundSchema: z.ZodNativeEnum<typeof TaskState> =
1182
+ TaskState$inboundSchema;
1163
1183
 
1164
1184
  /** @internal */
1165
1185
  export const InvokeAgentAgentsKind$inboundSchema: z.ZodNativeEnum<
@@ -1171,30 +1191,31 @@ export const InvokeAgentAgentsKind$outboundSchema: z.ZodNativeEnum<
1171
1191
  > = InvokeAgentAgentsKind$inboundSchema;
1172
1192
 
1173
1193
  /** @internal */
1174
- export const InvokeAgentAgentsRole$inboundSchema: z.ZodNativeEnum<
1175
- typeof InvokeAgentAgentsRole
1176
- > = z.nativeEnum(InvokeAgentAgentsRole);
1194
+ export const InvokeAgentExtendedMessageRole$inboundSchema: z.ZodNativeEnum<
1195
+ typeof InvokeAgentExtendedMessageRole
1196
+ > = z.nativeEnum(InvokeAgentExtendedMessageRole);
1177
1197
  /** @internal */
1178
- export const InvokeAgentAgentsRole$outboundSchema: z.ZodNativeEnum<
1179
- typeof InvokeAgentAgentsRole
1180
- > = InvokeAgentAgentsRole$inboundSchema;
1198
+ export const InvokeAgentExtendedMessageRole$outboundSchema: z.ZodNativeEnum<
1199
+ typeof InvokeAgentExtendedMessageRole
1200
+ > = InvokeAgentExtendedMessageRole$inboundSchema;
1181
1201
 
1182
1202
  /** @internal */
1183
- export const InvokeAgentPartsAgentsResponse200ApplicationJSONKind$inboundSchema:
1184
- z.ZodNativeEnum<typeof InvokeAgentPartsAgentsResponse200ApplicationJSONKind> =
1185
- z.nativeEnum(InvokeAgentPartsAgentsResponse200ApplicationJSONKind);
1203
+ export const InvokeAgentPartsAgentsResponse200Kind$inboundSchema:
1204
+ z.ZodNativeEnum<typeof InvokeAgentPartsAgentsResponse200Kind> = z.nativeEnum(
1205
+ InvokeAgentPartsAgentsResponse200Kind,
1206
+ );
1186
1207
  /** @internal */
1187
- export const InvokeAgentPartsAgentsResponse200ApplicationJSONKind$outboundSchema:
1188
- z.ZodNativeEnum<typeof InvokeAgentPartsAgentsResponse200ApplicationJSONKind> =
1189
- InvokeAgentPartsAgentsResponse200ApplicationJSONKind$inboundSchema;
1208
+ export const InvokeAgentPartsAgentsResponse200Kind$outboundSchema:
1209
+ z.ZodNativeEnum<typeof InvokeAgentPartsAgentsResponse200Kind> =
1210
+ InvokeAgentPartsAgentsResponse200Kind$inboundSchema;
1190
1211
 
1191
1212
  /** @internal */
1192
- export const InvokeAgentParts5$inboundSchema: z.ZodType<
1193
- InvokeAgentParts5,
1213
+ export const InvokeAgentPartsToolResultPart$inboundSchema: z.ZodType<
1214
+ InvokeAgentPartsToolResultPart,
1194
1215
  z.ZodTypeDef,
1195
1216
  unknown
1196
1217
  > = z.object({
1197
- kind: InvokeAgentPartsAgentsResponse200ApplicationJSONKind$inboundSchema,
1218
+ kind: InvokeAgentPartsAgentsResponse200Kind$inboundSchema,
1198
1219
  tool_call_id: z.string(),
1199
1220
  result: z.any().optional(),
1200
1221
  metadata: z.record(z.any()).optional(),
@@ -1204,7 +1225,7 @@ export const InvokeAgentParts5$inboundSchema: z.ZodType<
1204
1225
  });
1205
1226
  });
1206
1227
  /** @internal */
1207
- export type InvokeAgentParts5$Outbound = {
1228
+ export type InvokeAgentPartsToolResultPart$Outbound = {
1208
1229
  kind: string;
1209
1230
  tool_call_id: string;
1210
1231
  result?: any | undefined;
@@ -1212,12 +1233,12 @@ export type InvokeAgentParts5$Outbound = {
1212
1233
  };
1213
1234
 
1214
1235
  /** @internal */
1215
- export const InvokeAgentParts5$outboundSchema: z.ZodType<
1216
- InvokeAgentParts5$Outbound,
1236
+ export const InvokeAgentPartsToolResultPart$outboundSchema: z.ZodType<
1237
+ InvokeAgentPartsToolResultPart$Outbound,
1217
1238
  z.ZodTypeDef,
1218
- InvokeAgentParts5
1239
+ InvokeAgentPartsToolResultPart
1219
1240
  > = z.object({
1220
- kind: InvokeAgentPartsAgentsResponse200ApplicationJSONKind$outboundSchema,
1241
+ kind: InvokeAgentPartsAgentsResponse200Kind$outboundSchema,
1221
1242
  toolCallId: z.string(),
1222
1243
  result: z.any().optional(),
1223
1244
  metadata: z.record(z.any()).optional(),
@@ -1227,40 +1248,41 @@ export const InvokeAgentParts5$outboundSchema: z.ZodType<
1227
1248
  });
1228
1249
  });
1229
1250
 
1230
- export function invokeAgentParts5ToJSON(
1231
- invokeAgentParts5: InvokeAgentParts5,
1251
+ export function invokeAgentPartsToolResultPartToJSON(
1252
+ invokeAgentPartsToolResultPart: InvokeAgentPartsToolResultPart,
1232
1253
  ): string {
1233
1254
  return JSON.stringify(
1234
- InvokeAgentParts5$outboundSchema.parse(invokeAgentParts5),
1255
+ InvokeAgentPartsToolResultPart$outboundSchema.parse(
1256
+ invokeAgentPartsToolResultPart,
1257
+ ),
1235
1258
  );
1236
1259
  }
1237
- export function invokeAgentParts5FromJSON(
1260
+ export function invokeAgentPartsToolResultPartFromJSON(
1238
1261
  jsonString: string,
1239
- ): SafeParseResult<InvokeAgentParts5, SDKValidationError> {
1262
+ ): SafeParseResult<InvokeAgentPartsToolResultPart, SDKValidationError> {
1240
1263
  return safeParse(
1241
1264
  jsonString,
1242
- (x) => InvokeAgentParts5$inboundSchema.parse(JSON.parse(x)),
1243
- `Failed to parse 'InvokeAgentParts5' from JSON`,
1265
+ (x) => InvokeAgentPartsToolResultPart$inboundSchema.parse(JSON.parse(x)),
1266
+ `Failed to parse 'InvokeAgentPartsToolResultPart' from JSON`,
1244
1267
  );
1245
1268
  }
1246
1269
 
1247
1270
  /** @internal */
1248
- export const InvokeAgentPartsAgentsResponse200Kind$inboundSchema:
1249
- z.ZodNativeEnum<typeof InvokeAgentPartsAgentsResponse200Kind> = z.nativeEnum(
1250
- InvokeAgentPartsAgentsResponse200Kind,
1251
- );
1271
+ export const InvokeAgentPartsAgentsResponseKind$inboundSchema: z.ZodNativeEnum<
1272
+ typeof InvokeAgentPartsAgentsResponseKind
1273
+ > = z.nativeEnum(InvokeAgentPartsAgentsResponseKind);
1252
1274
  /** @internal */
1253
- export const InvokeAgentPartsAgentsResponse200Kind$outboundSchema:
1254
- z.ZodNativeEnum<typeof InvokeAgentPartsAgentsResponse200Kind> =
1255
- InvokeAgentPartsAgentsResponse200Kind$inboundSchema;
1275
+ export const InvokeAgentPartsAgentsResponseKind$outboundSchema: z.ZodNativeEnum<
1276
+ typeof InvokeAgentPartsAgentsResponseKind
1277
+ > = InvokeAgentPartsAgentsResponseKind$inboundSchema;
1256
1278
 
1257
1279
  /** @internal */
1258
- export const InvokeAgentParts4$inboundSchema: z.ZodType<
1259
- InvokeAgentParts4,
1280
+ export const InvokeAgentPartsToolCallPart$inboundSchema: z.ZodType<
1281
+ InvokeAgentPartsToolCallPart,
1260
1282
  z.ZodTypeDef,
1261
1283
  unknown
1262
1284
  > = z.object({
1263
- kind: InvokeAgentPartsAgentsResponse200Kind$inboundSchema,
1285
+ kind: InvokeAgentPartsAgentsResponseKind$inboundSchema,
1264
1286
  tool_name: z.string(),
1265
1287
  tool_call_id: z.string(),
1266
1288
  arguments: z.record(z.any()),
@@ -1272,7 +1294,7 @@ export const InvokeAgentParts4$inboundSchema: z.ZodType<
1272
1294
  });
1273
1295
  });
1274
1296
  /** @internal */
1275
- export type InvokeAgentParts4$Outbound = {
1297
+ export type InvokeAgentPartsToolCallPart$Outbound = {
1276
1298
  kind: string;
1277
1299
  tool_name: string;
1278
1300
  tool_call_id: string;
@@ -1281,12 +1303,12 @@ export type InvokeAgentParts4$Outbound = {
1281
1303
  };
1282
1304
 
1283
1305
  /** @internal */
1284
- export const InvokeAgentParts4$outboundSchema: z.ZodType<
1285
- InvokeAgentParts4$Outbound,
1306
+ export const InvokeAgentPartsToolCallPart$outboundSchema: z.ZodType<
1307
+ InvokeAgentPartsToolCallPart$Outbound,
1286
1308
  z.ZodTypeDef,
1287
- InvokeAgentParts4
1309
+ InvokeAgentPartsToolCallPart
1288
1310
  > = z.object({
1289
- kind: InvokeAgentPartsAgentsResponse200Kind$outboundSchema,
1311
+ kind: InvokeAgentPartsAgentsResponseKind$outboundSchema,
1290
1312
  toolName: z.string(),
1291
1313
  toolCallId: z.string(),
1292
1314
  arguments: z.record(z.any()),
@@ -1298,31 +1320,33 @@ export const InvokeAgentParts4$outboundSchema: z.ZodType<
1298
1320
  });
1299
1321
  });
1300
1322
 
1301
- export function invokeAgentParts4ToJSON(
1302
- invokeAgentParts4: InvokeAgentParts4,
1323
+ export function invokeAgentPartsToolCallPartToJSON(
1324
+ invokeAgentPartsToolCallPart: InvokeAgentPartsToolCallPart,
1303
1325
  ): string {
1304
1326
  return JSON.stringify(
1305
- InvokeAgentParts4$outboundSchema.parse(invokeAgentParts4),
1327
+ InvokeAgentPartsToolCallPart$outboundSchema.parse(
1328
+ invokeAgentPartsToolCallPart,
1329
+ ),
1306
1330
  );
1307
1331
  }
1308
- export function invokeAgentParts4FromJSON(
1332
+ export function invokeAgentPartsToolCallPartFromJSON(
1309
1333
  jsonString: string,
1310
- ): SafeParseResult<InvokeAgentParts4, SDKValidationError> {
1334
+ ): SafeParseResult<InvokeAgentPartsToolCallPart, SDKValidationError> {
1311
1335
  return safeParse(
1312
1336
  jsonString,
1313
- (x) => InvokeAgentParts4$inboundSchema.parse(JSON.parse(x)),
1314
- `Failed to parse 'InvokeAgentParts4' from JSON`,
1337
+ (x) => InvokeAgentPartsToolCallPart$inboundSchema.parse(JSON.parse(x)),
1338
+ `Failed to parse 'InvokeAgentPartsToolCallPart' from JSON`,
1315
1339
  );
1316
1340
  }
1317
1341
 
1318
1342
  /** @internal */
1319
- export const InvokeAgentPartsAgentsResponseKind$inboundSchema: z.ZodNativeEnum<
1320
- typeof InvokeAgentPartsAgentsResponseKind
1321
- > = z.nativeEnum(InvokeAgentPartsAgentsResponseKind);
1343
+ export const InvokeAgentPartsAgentsKind$inboundSchema: z.ZodNativeEnum<
1344
+ typeof InvokeAgentPartsAgentsKind
1345
+ > = z.nativeEnum(InvokeAgentPartsAgentsKind);
1322
1346
  /** @internal */
1323
- export const InvokeAgentPartsAgentsResponseKind$outboundSchema: z.ZodNativeEnum<
1324
- typeof InvokeAgentPartsAgentsResponseKind
1325
- > = InvokeAgentPartsAgentsResponseKind$inboundSchema;
1347
+ export const InvokeAgentPartsAgentsKind$outboundSchema: z.ZodNativeEnum<
1348
+ typeof InvokeAgentPartsAgentsKind
1349
+ > = InvokeAgentPartsAgentsKind$inboundSchema;
1326
1350
 
1327
1351
  /** @internal */
1328
1352
  export const InvokeAgentFileFileInURIFormat$inboundSchema: z.ZodType<
@@ -1460,12 +1484,12 @@ export function invokeAgentPartsFileFromJSON(
1460
1484
  }
1461
1485
 
1462
1486
  /** @internal */
1463
- export const InvokeAgentParts3$inboundSchema: z.ZodType<
1464
- InvokeAgentParts3,
1487
+ export const InvokeAgentPartsFilePart$inboundSchema: z.ZodType<
1488
+ InvokeAgentPartsFilePart,
1465
1489
  z.ZodTypeDef,
1466
1490
  unknown
1467
1491
  > = z.object({
1468
- kind: InvokeAgentPartsAgentsResponseKind$inboundSchema,
1492
+ kind: InvokeAgentPartsAgentsKind$inboundSchema,
1469
1493
  file: z.union([
1470
1494
  z.lazy(() => InvokeAgentFileBinaryFormat$inboundSchema),
1471
1495
  z.lazy(() => InvokeAgentFileFileInURIFormat$inboundSchema),
@@ -1473,7 +1497,7 @@ export const InvokeAgentParts3$inboundSchema: z.ZodType<
1473
1497
  metadata: z.record(z.any()).optional(),
1474
1498
  });
1475
1499
  /** @internal */
1476
- export type InvokeAgentParts3$Outbound = {
1500
+ export type InvokeAgentPartsFilePart$Outbound = {
1477
1501
  kind: string;
1478
1502
  file:
1479
1503
  | InvokeAgentFileBinaryFormat$Outbound
@@ -1482,12 +1506,12 @@ export type InvokeAgentParts3$Outbound = {
1482
1506
  };
1483
1507
 
1484
1508
  /** @internal */
1485
- export const InvokeAgentParts3$outboundSchema: z.ZodType<
1486
- InvokeAgentParts3$Outbound,
1509
+ export const InvokeAgentPartsFilePart$outboundSchema: z.ZodType<
1510
+ InvokeAgentPartsFilePart$Outbound,
1487
1511
  z.ZodTypeDef,
1488
- InvokeAgentParts3
1512
+ InvokeAgentPartsFilePart
1489
1513
  > = z.object({
1490
- kind: InvokeAgentPartsAgentsResponseKind$outboundSchema,
1514
+ kind: InvokeAgentPartsAgentsKind$outboundSchema,
1491
1515
  file: z.union([
1492
1516
  z.lazy(() => InvokeAgentFileBinaryFormat$outboundSchema),
1493
1517
  z.lazy(() => InvokeAgentFileFileInURIFormat$outboundSchema),
@@ -1495,125 +1519,125 @@ export const InvokeAgentParts3$outboundSchema: z.ZodType<
1495
1519
  metadata: z.record(z.any()).optional(),
1496
1520
  });
1497
1521
 
1498
- export function invokeAgentParts3ToJSON(
1499
- invokeAgentParts3: InvokeAgentParts3,
1522
+ export function invokeAgentPartsFilePartToJSON(
1523
+ invokeAgentPartsFilePart: InvokeAgentPartsFilePart,
1500
1524
  ): string {
1501
1525
  return JSON.stringify(
1502
- InvokeAgentParts3$outboundSchema.parse(invokeAgentParts3),
1526
+ InvokeAgentPartsFilePart$outboundSchema.parse(invokeAgentPartsFilePart),
1503
1527
  );
1504
1528
  }
1505
- export function invokeAgentParts3FromJSON(
1529
+ export function invokeAgentPartsFilePartFromJSON(
1506
1530
  jsonString: string,
1507
- ): SafeParseResult<InvokeAgentParts3, SDKValidationError> {
1531
+ ): SafeParseResult<InvokeAgentPartsFilePart, SDKValidationError> {
1508
1532
  return safeParse(
1509
1533
  jsonString,
1510
- (x) => InvokeAgentParts3$inboundSchema.parse(JSON.parse(x)),
1511
- `Failed to parse 'InvokeAgentParts3' from JSON`,
1534
+ (x) => InvokeAgentPartsFilePart$inboundSchema.parse(JSON.parse(x)),
1535
+ `Failed to parse 'InvokeAgentPartsFilePart' from JSON`,
1512
1536
  );
1513
1537
  }
1514
1538
 
1515
1539
  /** @internal */
1516
- export const InvokeAgentPartsAgentsKind$inboundSchema: z.ZodNativeEnum<
1517
- typeof InvokeAgentPartsAgentsKind
1518
- > = z.nativeEnum(InvokeAgentPartsAgentsKind);
1540
+ export const InvokeAgentPartsKind$inboundSchema: z.ZodNativeEnum<
1541
+ typeof InvokeAgentPartsKind
1542
+ > = z.nativeEnum(InvokeAgentPartsKind);
1519
1543
  /** @internal */
1520
- export const InvokeAgentPartsAgentsKind$outboundSchema: z.ZodNativeEnum<
1521
- typeof InvokeAgentPartsAgentsKind
1522
- > = InvokeAgentPartsAgentsKind$inboundSchema;
1544
+ export const InvokeAgentPartsKind$outboundSchema: z.ZodNativeEnum<
1545
+ typeof InvokeAgentPartsKind
1546
+ > = InvokeAgentPartsKind$inboundSchema;
1523
1547
 
1524
1548
  /** @internal */
1525
- export const InvokeAgentParts2$inboundSchema: z.ZodType<
1526
- InvokeAgentParts2,
1549
+ export const InvokeAgentPartsDataPart$inboundSchema: z.ZodType<
1550
+ InvokeAgentPartsDataPart,
1527
1551
  z.ZodTypeDef,
1528
1552
  unknown
1529
1553
  > = z.object({
1530
- kind: InvokeAgentPartsAgentsKind$inboundSchema,
1554
+ kind: InvokeAgentPartsKind$inboundSchema,
1531
1555
  data: z.record(z.any()),
1532
1556
  metadata: z.record(z.any()).optional(),
1533
1557
  });
1534
1558
  /** @internal */
1535
- export type InvokeAgentParts2$Outbound = {
1559
+ export type InvokeAgentPartsDataPart$Outbound = {
1536
1560
  kind: string;
1537
1561
  data: { [k: string]: any };
1538
1562
  metadata?: { [k: string]: any } | undefined;
1539
1563
  };
1540
1564
 
1541
1565
  /** @internal */
1542
- export const InvokeAgentParts2$outboundSchema: z.ZodType<
1543
- InvokeAgentParts2$Outbound,
1566
+ export const InvokeAgentPartsDataPart$outboundSchema: z.ZodType<
1567
+ InvokeAgentPartsDataPart$Outbound,
1544
1568
  z.ZodTypeDef,
1545
- InvokeAgentParts2
1569
+ InvokeAgentPartsDataPart
1546
1570
  > = z.object({
1547
- kind: InvokeAgentPartsAgentsKind$outboundSchema,
1571
+ kind: InvokeAgentPartsKind$outboundSchema,
1548
1572
  data: z.record(z.any()),
1549
1573
  metadata: z.record(z.any()).optional(),
1550
1574
  });
1551
1575
 
1552
- export function invokeAgentParts2ToJSON(
1553
- invokeAgentParts2: InvokeAgentParts2,
1576
+ export function invokeAgentPartsDataPartToJSON(
1577
+ invokeAgentPartsDataPart: InvokeAgentPartsDataPart,
1554
1578
  ): string {
1555
1579
  return JSON.stringify(
1556
- InvokeAgentParts2$outboundSchema.parse(invokeAgentParts2),
1580
+ InvokeAgentPartsDataPart$outboundSchema.parse(invokeAgentPartsDataPart),
1557
1581
  );
1558
1582
  }
1559
- export function invokeAgentParts2FromJSON(
1583
+ export function invokeAgentPartsDataPartFromJSON(
1560
1584
  jsonString: string,
1561
- ): SafeParseResult<InvokeAgentParts2, SDKValidationError> {
1585
+ ): SafeParseResult<InvokeAgentPartsDataPart, SDKValidationError> {
1562
1586
  return safeParse(
1563
1587
  jsonString,
1564
- (x) => InvokeAgentParts2$inboundSchema.parse(JSON.parse(x)),
1565
- `Failed to parse 'InvokeAgentParts2' from JSON`,
1588
+ (x) => InvokeAgentPartsDataPart$inboundSchema.parse(JSON.parse(x)),
1589
+ `Failed to parse 'InvokeAgentPartsDataPart' from JSON`,
1566
1590
  );
1567
1591
  }
1568
1592
 
1569
1593
  /** @internal */
1570
- export const InvokeAgentPartsKind$inboundSchema: z.ZodNativeEnum<
1571
- typeof InvokeAgentPartsKind
1572
- > = z.nativeEnum(InvokeAgentPartsKind);
1594
+ export const InvokeAgentPartsAgentsResponse200ApplicationJSONKind$inboundSchema:
1595
+ z.ZodNativeEnum<typeof InvokeAgentPartsAgentsResponse200ApplicationJSONKind> =
1596
+ z.nativeEnum(InvokeAgentPartsAgentsResponse200ApplicationJSONKind);
1573
1597
  /** @internal */
1574
- export const InvokeAgentPartsKind$outboundSchema: z.ZodNativeEnum<
1575
- typeof InvokeAgentPartsKind
1576
- > = InvokeAgentPartsKind$inboundSchema;
1598
+ export const InvokeAgentPartsAgentsResponse200ApplicationJSONKind$outboundSchema:
1599
+ z.ZodNativeEnum<typeof InvokeAgentPartsAgentsResponse200ApplicationJSONKind> =
1600
+ InvokeAgentPartsAgentsResponse200ApplicationJSONKind$inboundSchema;
1577
1601
 
1578
1602
  /** @internal */
1579
- export const InvokeAgentParts1$inboundSchema: z.ZodType<
1580
- InvokeAgentParts1,
1603
+ export const InvokeAgentPartsTextPart$inboundSchema: z.ZodType<
1604
+ InvokeAgentPartsTextPart,
1581
1605
  z.ZodTypeDef,
1582
1606
  unknown
1583
1607
  > = z.object({
1584
- kind: InvokeAgentPartsKind$inboundSchema,
1608
+ kind: InvokeAgentPartsAgentsResponse200ApplicationJSONKind$inboundSchema,
1585
1609
  text: z.string(),
1586
1610
  });
1587
1611
  /** @internal */
1588
- export type InvokeAgentParts1$Outbound = {
1612
+ export type InvokeAgentPartsTextPart$Outbound = {
1589
1613
  kind: string;
1590
1614
  text: string;
1591
1615
  };
1592
1616
 
1593
1617
  /** @internal */
1594
- export const InvokeAgentParts1$outboundSchema: z.ZodType<
1595
- InvokeAgentParts1$Outbound,
1618
+ export const InvokeAgentPartsTextPart$outboundSchema: z.ZodType<
1619
+ InvokeAgentPartsTextPart$Outbound,
1596
1620
  z.ZodTypeDef,
1597
- InvokeAgentParts1
1621
+ InvokeAgentPartsTextPart
1598
1622
  > = z.object({
1599
- kind: InvokeAgentPartsKind$outboundSchema,
1623
+ kind: InvokeAgentPartsAgentsResponse200ApplicationJSONKind$outboundSchema,
1600
1624
  text: z.string(),
1601
1625
  });
1602
1626
 
1603
- export function invokeAgentParts1ToJSON(
1604
- invokeAgentParts1: InvokeAgentParts1,
1627
+ export function invokeAgentPartsTextPartToJSON(
1628
+ invokeAgentPartsTextPart: InvokeAgentPartsTextPart,
1605
1629
  ): string {
1606
1630
  return JSON.stringify(
1607
- InvokeAgentParts1$outboundSchema.parse(invokeAgentParts1),
1631
+ InvokeAgentPartsTextPart$outboundSchema.parse(invokeAgentPartsTextPart),
1608
1632
  );
1609
1633
  }
1610
- export function invokeAgentParts1FromJSON(
1634
+ export function invokeAgentPartsTextPartFromJSON(
1611
1635
  jsonString: string,
1612
- ): SafeParseResult<InvokeAgentParts1, SDKValidationError> {
1636
+ ): SafeParseResult<InvokeAgentPartsTextPart, SDKValidationError> {
1613
1637
  return safeParse(
1614
1638
  jsonString,
1615
- (x) => InvokeAgentParts1$inboundSchema.parse(JSON.parse(x)),
1616
- `Failed to parse 'InvokeAgentParts1' from JSON`,
1639
+ (x) => InvokeAgentPartsTextPart$inboundSchema.parse(JSON.parse(x)),
1640
+ `Failed to parse 'InvokeAgentPartsTextPart' from JSON`,
1617
1641
  );
1618
1642
  }
1619
1643
 
@@ -1623,19 +1647,19 @@ export const InvokeAgentParts$inboundSchema: z.ZodType<
1623
1647
  z.ZodTypeDef,
1624
1648
  unknown
1625
1649
  > = z.union([
1626
- z.lazy(() => InvokeAgentParts4$inboundSchema),
1627
- z.lazy(() => InvokeAgentParts1$inboundSchema),
1628
- z.lazy(() => InvokeAgentParts2$inboundSchema),
1629
- z.lazy(() => InvokeAgentParts3$inboundSchema),
1630
- z.lazy(() => InvokeAgentParts5$inboundSchema),
1650
+ z.lazy(() => InvokeAgentPartsToolCallPart$inboundSchema),
1651
+ z.lazy(() => InvokeAgentPartsTextPart$inboundSchema),
1652
+ z.lazy(() => InvokeAgentPartsDataPart$inboundSchema),
1653
+ z.lazy(() => InvokeAgentPartsFilePart$inboundSchema),
1654
+ z.lazy(() => InvokeAgentPartsToolResultPart$inboundSchema),
1631
1655
  ]);
1632
1656
  /** @internal */
1633
1657
  export type InvokeAgentParts$Outbound =
1634
- | InvokeAgentParts4$Outbound
1635
- | InvokeAgentParts1$Outbound
1636
- | InvokeAgentParts2$Outbound
1637
- | InvokeAgentParts3$Outbound
1638
- | InvokeAgentParts5$Outbound;
1658
+ | InvokeAgentPartsToolCallPart$Outbound
1659
+ | InvokeAgentPartsTextPart$Outbound
1660
+ | InvokeAgentPartsDataPart$Outbound
1661
+ | InvokeAgentPartsFilePart$Outbound
1662
+ | InvokeAgentPartsToolResultPart$Outbound;
1639
1663
 
1640
1664
  /** @internal */
1641
1665
  export const InvokeAgentParts$outboundSchema: z.ZodType<
@@ -1643,11 +1667,11 @@ export const InvokeAgentParts$outboundSchema: z.ZodType<
1643
1667
  z.ZodTypeDef,
1644
1668
  InvokeAgentParts
1645
1669
  > = z.union([
1646
- z.lazy(() => InvokeAgentParts4$outboundSchema),
1647
- z.lazy(() => InvokeAgentParts1$outboundSchema),
1648
- z.lazy(() => InvokeAgentParts2$outboundSchema),
1649
- z.lazy(() => InvokeAgentParts3$outboundSchema),
1650
- z.lazy(() => InvokeAgentParts5$outboundSchema),
1670
+ z.lazy(() => InvokeAgentPartsToolCallPart$outboundSchema),
1671
+ z.lazy(() => InvokeAgentPartsTextPart$outboundSchema),
1672
+ z.lazy(() => InvokeAgentPartsDataPart$outboundSchema),
1673
+ z.lazy(() => InvokeAgentPartsFilePart$outboundSchema),
1674
+ z.lazy(() => InvokeAgentPartsToolResultPart$outboundSchema),
1651
1675
  ]);
1652
1676
 
1653
1677
  export function invokeAgentPartsToJSON(
@@ -1668,167 +1692,163 @@ export function invokeAgentPartsFromJSON(
1668
1692
  }
1669
1693
 
1670
1694
  /** @internal */
1671
- export const InvokeAgentMessage$inboundSchema: z.ZodType<
1672
- InvokeAgentMessage,
1695
+ export const TaskStatusMessage$inboundSchema: z.ZodType<
1696
+ TaskStatusMessage,
1673
1697
  z.ZodTypeDef,
1674
1698
  unknown
1675
1699
  > = z.object({
1676
1700
  kind: InvokeAgentAgentsKind$inboundSchema,
1677
1701
  messageId: z.string(),
1678
- role: InvokeAgentAgentsRole$inboundSchema,
1702
+ role: InvokeAgentExtendedMessageRole$inboundSchema,
1679
1703
  parts: z.array(
1680
1704
  z.union([
1681
- z.lazy(() => InvokeAgentParts4$inboundSchema),
1682
- z.lazy(() => InvokeAgentParts1$inboundSchema),
1683
- z.lazy(() => InvokeAgentParts2$inboundSchema),
1684
- z.lazy(() => InvokeAgentParts3$inboundSchema),
1685
- z.lazy(() => InvokeAgentParts5$inboundSchema),
1705
+ z.lazy(() => InvokeAgentPartsToolCallPart$inboundSchema),
1706
+ z.lazy(() => InvokeAgentPartsTextPart$inboundSchema),
1707
+ z.lazy(() => InvokeAgentPartsDataPart$inboundSchema),
1708
+ z.lazy(() => InvokeAgentPartsFilePart$inboundSchema),
1709
+ z.lazy(() => InvokeAgentPartsToolResultPart$inboundSchema),
1686
1710
  ]),
1687
1711
  ),
1688
1712
  });
1689
1713
  /** @internal */
1690
- export type InvokeAgentMessage$Outbound = {
1714
+ export type TaskStatusMessage$Outbound = {
1691
1715
  kind: string;
1692
1716
  messageId: string;
1693
1717
  role: string;
1694
1718
  parts: Array<
1695
- | InvokeAgentParts4$Outbound
1696
- | InvokeAgentParts1$Outbound
1697
- | InvokeAgentParts2$Outbound
1698
- | InvokeAgentParts3$Outbound
1699
- | InvokeAgentParts5$Outbound
1719
+ | InvokeAgentPartsToolCallPart$Outbound
1720
+ | InvokeAgentPartsTextPart$Outbound
1721
+ | InvokeAgentPartsDataPart$Outbound
1722
+ | InvokeAgentPartsFilePart$Outbound
1723
+ | InvokeAgentPartsToolResultPart$Outbound
1700
1724
  >;
1701
1725
  };
1702
1726
 
1703
1727
  /** @internal */
1704
- export const InvokeAgentMessage$outboundSchema: z.ZodType<
1705
- InvokeAgentMessage$Outbound,
1728
+ export const TaskStatusMessage$outboundSchema: z.ZodType<
1729
+ TaskStatusMessage$Outbound,
1706
1730
  z.ZodTypeDef,
1707
- InvokeAgentMessage
1731
+ TaskStatusMessage
1708
1732
  > = z.object({
1709
1733
  kind: InvokeAgentAgentsKind$outboundSchema,
1710
1734
  messageId: z.string(),
1711
- role: InvokeAgentAgentsRole$outboundSchema,
1735
+ role: InvokeAgentExtendedMessageRole$outboundSchema,
1712
1736
  parts: z.array(
1713
1737
  z.union([
1714
- z.lazy(() => InvokeAgentParts4$outboundSchema),
1715
- z.lazy(() => InvokeAgentParts1$outboundSchema),
1716
- z.lazy(() => InvokeAgentParts2$outboundSchema),
1717
- z.lazy(() => InvokeAgentParts3$outboundSchema),
1718
- z.lazy(() => InvokeAgentParts5$outboundSchema),
1738
+ z.lazy(() => InvokeAgentPartsToolCallPart$outboundSchema),
1739
+ z.lazy(() => InvokeAgentPartsTextPart$outboundSchema),
1740
+ z.lazy(() => InvokeAgentPartsDataPart$outboundSchema),
1741
+ z.lazy(() => InvokeAgentPartsFilePart$outboundSchema),
1742
+ z.lazy(() => InvokeAgentPartsToolResultPart$outboundSchema),
1719
1743
  ]),
1720
1744
  ),
1721
1745
  });
1722
1746
 
1723
- export function invokeAgentMessageToJSON(
1724
- invokeAgentMessage: InvokeAgentMessage,
1747
+ export function taskStatusMessageToJSON(
1748
+ taskStatusMessage: TaskStatusMessage,
1725
1749
  ): string {
1726
1750
  return JSON.stringify(
1727
- InvokeAgentMessage$outboundSchema.parse(invokeAgentMessage),
1751
+ TaskStatusMessage$outboundSchema.parse(taskStatusMessage),
1728
1752
  );
1729
1753
  }
1730
- export function invokeAgentMessageFromJSON(
1754
+ export function taskStatusMessageFromJSON(
1731
1755
  jsonString: string,
1732
- ): SafeParseResult<InvokeAgentMessage, SDKValidationError> {
1756
+ ): SafeParseResult<TaskStatusMessage, SDKValidationError> {
1733
1757
  return safeParse(
1734
1758
  jsonString,
1735
- (x) => InvokeAgentMessage$inboundSchema.parse(JSON.parse(x)),
1736
- `Failed to parse 'InvokeAgentMessage' from JSON`,
1759
+ (x) => TaskStatusMessage$inboundSchema.parse(JSON.parse(x)),
1760
+ `Failed to parse 'TaskStatusMessage' from JSON`,
1737
1761
  );
1738
1762
  }
1739
1763
 
1740
1764
  /** @internal */
1741
- export const InvokeAgentStatus$inboundSchema: z.ZodType<
1742
- InvokeAgentStatus,
1765
+ export const TaskStatus$inboundSchema: z.ZodType<
1766
+ TaskStatus,
1743
1767
  z.ZodTypeDef,
1744
1768
  unknown
1745
1769
  > = z.object({
1746
- state: InvokeAgentState$inboundSchema,
1770
+ state: TaskState$inboundSchema,
1747
1771
  timestamp: z.string().optional(),
1748
- message: z.lazy(() => InvokeAgentMessage$inboundSchema).optional(),
1772
+ message: z.lazy(() => TaskStatusMessage$inboundSchema).optional(),
1749
1773
  });
1750
1774
  /** @internal */
1751
- export type InvokeAgentStatus$Outbound = {
1775
+ export type TaskStatus$Outbound = {
1752
1776
  state: string;
1753
1777
  timestamp?: string | undefined;
1754
- message?: InvokeAgentMessage$Outbound | undefined;
1778
+ message?: TaskStatusMessage$Outbound | undefined;
1755
1779
  };
1756
1780
 
1757
1781
  /** @internal */
1758
- export const InvokeAgentStatus$outboundSchema: z.ZodType<
1759
- InvokeAgentStatus$Outbound,
1782
+ export const TaskStatus$outboundSchema: z.ZodType<
1783
+ TaskStatus$Outbound,
1760
1784
  z.ZodTypeDef,
1761
- InvokeAgentStatus
1785
+ TaskStatus
1762
1786
  > = z.object({
1763
- state: InvokeAgentState$outboundSchema,
1787
+ state: TaskState$outboundSchema,
1764
1788
  timestamp: z.string().optional(),
1765
- message: z.lazy(() => InvokeAgentMessage$outboundSchema).optional(),
1789
+ message: z.lazy(() => TaskStatusMessage$outboundSchema).optional(),
1766
1790
  });
1767
1791
 
1768
- export function invokeAgentStatusToJSON(
1769
- invokeAgentStatus: InvokeAgentStatus,
1770
- ): string {
1771
- return JSON.stringify(
1772
- InvokeAgentStatus$outboundSchema.parse(invokeAgentStatus),
1773
- );
1792
+ export function taskStatusToJSON(taskStatus: TaskStatus): string {
1793
+ return JSON.stringify(TaskStatus$outboundSchema.parse(taskStatus));
1774
1794
  }
1775
- export function invokeAgentStatusFromJSON(
1795
+ export function taskStatusFromJSON(
1776
1796
  jsonString: string,
1777
- ): SafeParseResult<InvokeAgentStatus, SDKValidationError> {
1797
+ ): SafeParseResult<TaskStatus, SDKValidationError> {
1778
1798
  return safeParse(
1779
1799
  jsonString,
1780
- (x) => InvokeAgentStatus$inboundSchema.parse(JSON.parse(x)),
1781
- `Failed to parse 'InvokeAgentStatus' from JSON`,
1800
+ (x) => TaskStatus$inboundSchema.parse(JSON.parse(x)),
1801
+ `Failed to parse 'TaskStatus' from JSON`,
1782
1802
  );
1783
1803
  }
1784
1804
 
1785
1805
  /** @internal */
1786
- export const InvokeAgentResponseBody$inboundSchema: z.ZodType<
1787
- InvokeAgentResponseBody,
1806
+ export const InvokeAgentA2ATaskResponse$inboundSchema: z.ZodType<
1807
+ InvokeAgentA2ATaskResponse,
1788
1808
  z.ZodTypeDef,
1789
1809
  unknown
1790
1810
  > = z.object({
1791
1811
  id: z.string(),
1792
1812
  contextId: z.string(),
1793
1813
  kind: InvokeAgentKind$inboundSchema,
1794
- status: z.lazy(() => InvokeAgentStatus$inboundSchema),
1814
+ status: z.lazy(() => TaskStatus$inboundSchema),
1795
1815
  metadata: z.record(z.any()).optional(),
1796
1816
  });
1797
1817
  /** @internal */
1798
- export type InvokeAgentResponseBody$Outbound = {
1818
+ export type InvokeAgentA2ATaskResponse$Outbound = {
1799
1819
  id: string;
1800
1820
  contextId: string;
1801
1821
  kind: string;
1802
- status: InvokeAgentStatus$Outbound;
1822
+ status: TaskStatus$Outbound;
1803
1823
  metadata?: { [k: string]: any } | undefined;
1804
1824
  };
1805
1825
 
1806
1826
  /** @internal */
1807
- export const InvokeAgentResponseBody$outboundSchema: z.ZodType<
1808
- InvokeAgentResponseBody$Outbound,
1827
+ export const InvokeAgentA2ATaskResponse$outboundSchema: z.ZodType<
1828
+ InvokeAgentA2ATaskResponse$Outbound,
1809
1829
  z.ZodTypeDef,
1810
- InvokeAgentResponseBody
1830
+ InvokeAgentA2ATaskResponse
1811
1831
  > = z.object({
1812
1832
  id: z.string(),
1813
1833
  contextId: z.string(),
1814
1834
  kind: InvokeAgentKind$outboundSchema,
1815
- status: z.lazy(() => InvokeAgentStatus$outboundSchema),
1835
+ status: z.lazy(() => TaskStatus$outboundSchema),
1816
1836
  metadata: z.record(z.any()).optional(),
1817
1837
  });
1818
1838
 
1819
- export function invokeAgentResponseBodyToJSON(
1820
- invokeAgentResponseBody: InvokeAgentResponseBody,
1839
+ export function invokeAgentA2ATaskResponseToJSON(
1840
+ invokeAgentA2ATaskResponse: InvokeAgentA2ATaskResponse,
1821
1841
  ): string {
1822
1842
  return JSON.stringify(
1823
- InvokeAgentResponseBody$outboundSchema.parse(invokeAgentResponseBody),
1843
+ InvokeAgentA2ATaskResponse$outboundSchema.parse(invokeAgentA2ATaskResponse),
1824
1844
  );
1825
1845
  }
1826
- export function invokeAgentResponseBodyFromJSON(
1846
+ export function invokeAgentA2ATaskResponseFromJSON(
1827
1847
  jsonString: string,
1828
- ): SafeParseResult<InvokeAgentResponseBody, SDKValidationError> {
1848
+ ): SafeParseResult<InvokeAgentA2ATaskResponse, SDKValidationError> {
1829
1849
  return safeParse(
1830
1850
  jsonString,
1831
- (x) => InvokeAgentResponseBody$inboundSchema.parse(JSON.parse(x)),
1832
- `Failed to parse 'InvokeAgentResponseBody' from JSON`,
1851
+ (x) => InvokeAgentA2ATaskResponse$inboundSchema.parse(JSON.parse(x)),
1852
+ `Failed to parse 'InvokeAgentA2ATaskResponse' from JSON`,
1833
1853
  );
1834
1854
  }