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

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 (188) hide show
  1. package/README.md +3 -4
  2. package/bin/mcp-server.js +6167 -1952
  3. package/bin/mcp-server.js.map +55 -56
  4. package/docs/sdks/agents/README.md +120 -82
  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/funcs/agentsStream.js +2 -0
  23. package/funcs/agentsStream.js.map +1 -1
  24. package/funcs/agentsStreamRun.js +2 -0
  25. package/funcs/agentsStreamRun.js.map +1 -1
  26. package/jsr.json +1 -1
  27. package/lib/config.d.ts +2 -2
  28. package/lib/config.js +2 -2
  29. package/mcp-server/mcp-server.js +1 -1
  30. package/mcp-server/server.js +2 -2
  31. package/mcp-server/server.js.map +1 -1
  32. package/models/errors/index.d.ts +0 -1
  33. package/models/errors/index.d.ts.map +1 -1
  34. package/models/errors/index.js +0 -1
  35. package/models/errors/index.js.map +1 -1
  36. package/models/operations/createagent.d.ts +17 -7
  37. package/models/operations/createagent.d.ts.map +1 -1
  38. package/models/operations/createagent.js +12 -4
  39. package/models/operations/createagent.js.map +1 -1
  40. package/models/operations/createbudget.js +2 -2
  41. package/models/operations/createcontact.js +2 -2
  42. package/models/operations/createdataset.js +2 -2
  43. package/models/operations/createdatasetitem.js +8 -8
  44. package/models/operations/createdatasource.js +2 -2
  45. package/models/operations/createeval.d.ts +70 -70
  46. package/models/operations/createeval.d.ts.map +1 -1
  47. package/models/operations/createeval.js +162 -169
  48. package/models/operations/createeval.js.map +1 -1
  49. package/models/operations/createtool.d.ts +25 -25
  50. package/models/operations/createtool.d.ts.map +1 -1
  51. package/models/operations/createtool.js +41 -41
  52. package/models/operations/createtool.js.map +1 -1
  53. package/models/operations/deploymentinvoke.d.ts +6 -6
  54. package/models/operations/deploymentinvoke.d.ts.map +1 -1
  55. package/models/operations/deploymentinvoke.js +9 -9
  56. package/models/operations/deploymentinvoke.js.map +1 -1
  57. package/models/operations/fileget.js +2 -2
  58. package/models/operations/filelist.js +2 -2
  59. package/models/operations/fileupload.js +2 -2
  60. package/models/operations/getagent.d.ts +5 -0
  61. package/models/operations/getagent.d.ts.map +1 -1
  62. package/models/operations/getagent.js +4 -0
  63. package/models/operations/getagent.js.map +1 -1
  64. package/models/operations/getagenttask.d.ts +682 -108
  65. package/models/operations/getagenttask.d.ts.map +1 -1
  66. package/models/operations/getagenttask.js +635 -155
  67. package/models/operations/getagenttask.js.map +1 -1
  68. package/models/operations/getalltools.d.ts +34 -34
  69. package/models/operations/getalltools.d.ts.map +1 -1
  70. package/models/operations/getalltools.js +74 -79
  71. package/models/operations/getalltools.js.map +1 -1
  72. package/models/operations/getbudget.js +2 -2
  73. package/models/operations/getevals.js +28 -28
  74. package/models/operations/invokeagent.d.ts +143 -123
  75. package/models/operations/invokeagent.d.ts.map +1 -1
  76. package/models/operations/invokeagent.js +143 -146
  77. package/models/operations/invokeagent.js.map +1 -1
  78. package/models/operations/listagents.d.ts +5 -0
  79. package/models/operations/listagents.d.ts.map +1 -1
  80. package/models/operations/listagents.js +4 -0
  81. package/models/operations/listagents.js.map +1 -1
  82. package/models/operations/listagenttasks.d.ts +680 -118
  83. package/models/operations/listagenttasks.d.ts.map +1 -1
  84. package/models/operations/listagenttasks.js +612 -144
  85. package/models/operations/listagenttasks.js.map +1 -1
  86. package/models/operations/listbudgets.js +2 -2
  87. package/models/operations/listchunks.d.ts +6 -6
  88. package/models/operations/listchunks.d.ts.map +1 -1
  89. package/models/operations/listchunks.js +9 -9
  90. package/models/operations/listchunks.js.map +1 -1
  91. package/models/operations/listcontacts.js +2 -2
  92. package/models/operations/listdatasetdatapoints.js +8 -8
  93. package/models/operations/listdatasets.js +2 -2
  94. package/models/operations/listdatasources.d.ts +6 -6
  95. package/models/operations/listdatasources.d.ts.map +1 -1
  96. package/models/operations/listdatasources.js +12 -11
  97. package/models/operations/listdatasources.js.map +1 -1
  98. package/models/operations/retrievecontact.js +2 -2
  99. package/models/operations/retrievedatapoint.js +8 -8
  100. package/models/operations/retrievedataset.js +2 -2
  101. package/models/operations/retrievedatasource.js +2 -2
  102. package/models/operations/retrievetool.js +12 -12
  103. package/models/operations/runagent.d.ts +112 -98
  104. package/models/operations/runagent.d.ts.map +1 -1
  105. package/models/operations/runagent.js +120 -121
  106. package/models/operations/runagent.js.map +1 -1
  107. package/models/operations/streamagent.d.ts +2725 -167
  108. package/models/operations/streamagent.d.ts.map +1 -1
  109. package/models/operations/streamagent.js +2948 -17
  110. package/models/operations/streamagent.js.map +1 -1
  111. package/models/operations/streamrunagent.d.ts +3274 -722
  112. package/models/operations/streamrunagent.d.ts.map +1 -1
  113. package/models/operations/streamrunagent.js +2948 -24
  114. package/models/operations/streamrunagent.js.map +1 -1
  115. package/models/operations/updateagent.d.ts +28 -15
  116. package/models/operations/updateagent.d.ts.map +1 -1
  117. package/models/operations/updateagent.js +25 -15
  118. package/models/operations/updateagent.js.map +1 -1
  119. package/models/operations/updatebudget.js +2 -2
  120. package/models/operations/updatecontact.js +2 -2
  121. package/models/operations/updatedatapoint.js +8 -8
  122. package/models/operations/updatedataset.js +2 -2
  123. package/models/operations/updatedatasource.js +2 -2
  124. package/models/operations/updateeval.js +28 -28
  125. package/models/operations/updatetool.js +14 -14
  126. package/package.json +1 -1
  127. package/sdk/agents.d.ts +10 -10
  128. package/sdk/agents.d.ts.map +1 -1
  129. package/sdk/agents.js +9 -9
  130. package/sdk/agents.js.map +1 -1
  131. package/src/funcs/agentsInvoke.ts +4 -4
  132. package/src/funcs/agentsListTasks.ts +4 -4
  133. package/src/funcs/agentsRetrieveTask.ts +8 -8
  134. package/src/funcs/agentsRun.ts +4 -4
  135. package/src/funcs/agentsStream.ts +1 -0
  136. package/src/funcs/agentsStreamRun.ts +1 -0
  137. package/src/lib/config.ts +2 -2
  138. package/src/mcp-server/mcp-server.ts +1 -1
  139. package/src/mcp-server/server.ts +2 -2
  140. package/src/models/errors/index.ts +0 -1
  141. package/src/models/operations/createagent.ts +31 -13
  142. package/src/models/operations/createbudget.ts +2 -2
  143. package/src/models/operations/createcontact.ts +2 -2
  144. package/src/models/operations/createdataset.ts +2 -2
  145. package/src/models/operations/createdatasetitem.ts +8 -8
  146. package/src/models/operations/createdatasource.ts +2 -2
  147. package/src/models/operations/createeval.ts +368 -294
  148. package/src/models/operations/createtool.ts +76 -76
  149. package/src/models/operations/deploymentinvoke.ts +17 -24
  150. package/src/models/operations/fileget.ts +2 -2
  151. package/src/models/operations/filelist.ts +2 -2
  152. package/src/models/operations/fileupload.ts +2 -2
  153. package/src/models/operations/getagent.ts +9 -0
  154. package/src/models/operations/getagenttask.ts +1873 -428
  155. package/src/models/operations/getalltools.ts +277 -231
  156. package/src/models/operations/getbudget.ts +2 -2
  157. package/src/models/operations/getevals.ts +28 -28
  158. package/src/models/operations/invokeagent.ts +319 -299
  159. package/src/models/operations/listagents.ts +9 -0
  160. package/src/models/operations/listagenttasks.ts +2029 -540
  161. package/src/models/operations/listbudgets.ts +2 -2
  162. package/src/models/operations/listchunks.ts +14 -14
  163. package/src/models/operations/listcontacts.ts +2 -2
  164. package/src/models/operations/listdatasetdatapoints.ts +8 -8
  165. package/src/models/operations/listdatasets.ts +2 -2
  166. package/src/models/operations/listdatasources.ts +15 -22
  167. package/src/models/operations/retrievecontact.ts +2 -2
  168. package/src/models/operations/retrievedatapoint.ts +8 -8
  169. package/src/models/operations/retrievedataset.ts +2 -2
  170. package/src/models/operations/retrievedatasource.ts +2 -2
  171. package/src/models/operations/retrievetool.ts +12 -12
  172. package/src/models/operations/runagent.ts +264 -220
  173. package/src/models/operations/streamagent.ts +7635 -414
  174. package/src/models/operations/streamrunagent.ts +10745 -3582
  175. package/src/models/operations/updateagent.ts +56 -31
  176. package/src/models/operations/updatebudget.ts +2 -2
  177. package/src/models/operations/updatecontact.ts +2 -2
  178. package/src/models/operations/updatedatapoint.ts +8 -8
  179. package/src/models/operations/updatedataset.ts +2 -2
  180. package/src/models/operations/updatedatasource.ts +2 -2
  181. package/src/models/operations/updateeval.ts +28 -28
  182. package/src/models/operations/updatetool.ts +14 -14
  183. package/src/sdk/agents.ts +20 -20
  184. package/models/errors/getagenttask.d.ts +0 -29
  185. package/models/errors/getagenttask.d.ts.map +0 -1
  186. package/models/errors/getagenttask.js +0 -74
  187. package/models/errors/getagenttask.js.map +0 -1
  188. package/src/models/errors/getagenttask.ts +0 -67
@@ -743,26 +743,26 @@ export type RunAgentFallbackModelConfiguration =
743
743
  | string;
744
744
 
745
745
  /**
746
- * Tool message
746
+ * Message containing tool execution results
747
747
  */
748
748
  export const RunAgentRoleToolMessage = {
749
749
  Tool: "tool",
750
750
  } as const;
751
751
  /**
752
- * Tool message
752
+ * Message containing tool execution results
753
753
  */
754
754
  export type RunAgentRoleToolMessage = ClosedEnum<
755
755
  typeof RunAgentRoleToolMessage
756
756
  >;
757
757
 
758
758
  /**
759
- * User message
759
+ * Message from the end user
760
760
  */
761
761
  export const RunAgentRoleUserMessage = {
762
762
  User: "user",
763
763
  } as const;
764
764
  /**
765
- * User message
765
+ * Message from the end user
766
766
  */
767
767
  export type RunAgentRoleUserMessage = ClosedEnum<
768
768
  typeof RunAgentRoleUserMessage
@@ -872,7 +872,7 @@ export type RunAgentPublicMessagePart =
872
872
  /**
873
873
  * The A2A format message containing the task for the agent to perform.
874
874
  */
875
- export type RunAgentMessage = {
875
+ export type RunAgentA2AMessage = {
876
876
  /**
877
877
  * Optional A2A message ID in ULID format
878
878
  */
@@ -1705,7 +1705,7 @@ export type RunAgentRequestBody = {
1705
1705
  /**
1706
1706
  * The A2A format message containing the task for the agent to perform.
1707
1707
  */
1708
- message: RunAgentMessage;
1708
+ message: RunAgentA2AMessage;
1709
1709
  /**
1710
1710
  * Optional variables for template replacement in system prompt, instructions, and messages
1711
1711
  */
@@ -1760,34 +1760,33 @@ export type RunAgentRequestBody = {
1760
1760
  };
1761
1761
 
1762
1762
  /**
1763
- * A2A entity type
1763
+ * A2A entity type identifier
1764
1764
  */
1765
1765
  export const RunAgentKind = {
1766
1766
  Task: "task",
1767
1767
  } as const;
1768
1768
  /**
1769
- * A2A entity type
1769
+ * A2A entity type identifier
1770
1770
  */
1771
1771
  export type RunAgentKind = ClosedEnum<typeof RunAgentKind>;
1772
1772
 
1773
1773
  /**
1774
- * Current task state
1774
+ * 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.
1775
1775
  */
1776
- export const RunAgentState = {
1776
+ export const RunAgentTaskState = {
1777
1777
  Submitted: "submitted",
1778
1778
  Working: "working",
1779
1779
  InputRequired: "input-required",
1780
+ AuthRequired: "auth-required",
1780
1781
  Completed: "completed",
1781
1782
  Failed: "failed",
1782
1783
  Canceled: "canceled",
1783
1784
  Rejected: "rejected",
1784
- AuthRequired: "auth-required",
1785
- Unknown: "unknown",
1786
1785
  } as const;
1787
1786
  /**
1788
- * Current task state
1787
+ * 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.
1789
1788
  */
1790
- export type RunAgentState = ClosedEnum<typeof RunAgentState>;
1789
+ export type RunAgentTaskState = ClosedEnum<typeof RunAgentTaskState>;
1791
1790
 
1792
1791
  export const RunAgentAgentsKind = {
1793
1792
  Message: "message",
@@ -1795,18 +1794,20 @@ export const RunAgentAgentsKind = {
1795
1794
  export type RunAgentAgentsKind = ClosedEnum<typeof RunAgentAgentsKind>;
1796
1795
 
1797
1796
  /**
1798
- * Extended A2A message role
1797
+ * Role of the message sender in the A2A protocol. Values: user (end user), agent (AI agent), tool (tool execution result), system (system instructions/prompts).
1799
1798
  */
1800
- export const RunAgentAgentsRole = {
1799
+ export const RunAgentExtendedMessageRole = {
1801
1800
  User: "user",
1802
1801
  Agent: "agent",
1803
1802
  Tool: "tool",
1804
1803
  System: "system",
1805
1804
  } as const;
1806
1805
  /**
1807
- * Extended A2A message role
1806
+ * Role of the message sender in the A2A protocol. Values: user (end user), agent (AI agent), tool (tool execution result), system (system instructions/prompts).
1808
1807
  */
1809
- export type RunAgentAgentsRole = ClosedEnum<typeof RunAgentAgentsRole>;
1808
+ export type RunAgentExtendedMessageRole = ClosedEnum<
1809
+ typeof RunAgentExtendedMessageRole
1810
+ >;
1810
1811
 
1811
1812
  export const RunAgentPartsAgentsResponse200ApplicationJSONKind = {
1812
1813
  ToolResult: "tool_result",
@@ -1815,7 +1816,10 @@ export type RunAgentPartsAgentsResponse200ApplicationJSONKind = ClosedEnum<
1815
1816
  typeof RunAgentPartsAgentsResponse200ApplicationJSONKind
1816
1817
  >;
1817
1818
 
1818
- export type RunAgentParts5 = {
1819
+ /**
1820
+ * The result of a tool execution. Contains the tool call ID for correlation and the result data from the tool invocation.
1821
+ */
1822
+ export type RunAgentPartsToolResultPart = {
1819
1823
  kind: RunAgentPartsAgentsResponse200ApplicationJSONKind;
1820
1824
  toolCallId: string;
1821
1825
  result?: any | undefined;
@@ -1829,7 +1833,10 @@ export type RunAgentPartsAgentsResponse200Kind = ClosedEnum<
1829
1833
  typeof RunAgentPartsAgentsResponse200Kind
1830
1834
  >;
1831
1835
 
1832
- export type RunAgentParts4 = {
1836
+ /**
1837
+ * A tool invocation request from an agent. Contains the tool name, unique call ID, and arguments for the tool execution.
1838
+ */
1839
+ export type RunAgentPartsToolCallPart = {
1833
1840
  kind: RunAgentPartsAgentsResponse200Kind;
1834
1841
  toolName: string;
1835
1842
  toolCallId: string;
@@ -1884,7 +1891,10 @@ export type RunAgentPartsFile =
1884
1891
  | RunAgentFileBinaryFormat
1885
1892
  | RunAgentFileFileInURIFormat;
1886
1893
 
1887
- export type RunAgentParts3 = {
1894
+ /**
1895
+ * 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.
1896
+ */
1897
+ export type RunAgentPartsFilePart = {
1888
1898
  kind: RunAgentPartsAgentsResponseKind;
1889
1899
  file: RunAgentFileBinaryFormat | RunAgentFileFileInURIFormat;
1890
1900
  metadata?: { [k: string]: any } | undefined;
@@ -1897,7 +1907,10 @@ export type RunAgentPartsAgentsKind = ClosedEnum<
1897
1907
  typeof RunAgentPartsAgentsKind
1898
1908
  >;
1899
1909
 
1900
- export type RunAgentParts2 = {
1910
+ /**
1911
+ * A structured data part containing JSON-serializable key-value pairs. Used for passing structured information between agents and tools.
1912
+ */
1913
+ export type RunAgentPartsDataPart = {
1901
1914
  kind: RunAgentPartsAgentsKind;
1902
1915
  data: { [k: string]: any };
1903
1916
  metadata?: { [k: string]: any } | undefined;
@@ -1908,77 +1921,80 @@ export const RunAgentPartsKind = {
1908
1921
  } as const;
1909
1922
  export type RunAgentPartsKind = ClosedEnum<typeof RunAgentPartsKind>;
1910
1923
 
1911
- export type RunAgentParts1 = {
1924
+ /**
1925
+ * A text content part containing plain text or markdown. Used for agent messages, user input, and text-based responses.
1926
+ */
1927
+ export type RunAgentPartsTextPart = {
1912
1928
  kind: RunAgentPartsKind;
1913
1929
  text: string;
1914
1930
  };
1915
1931
 
1916
1932
  export type RunAgentParts =
1917
- | RunAgentParts4
1918
- | RunAgentParts1
1919
- | RunAgentParts2
1920
- | RunAgentParts3
1921
- | RunAgentParts5;
1933
+ | RunAgentPartsToolCallPart
1934
+ | RunAgentPartsTextPart
1935
+ | RunAgentPartsDataPart
1936
+ | RunAgentPartsFilePart
1937
+ | RunAgentPartsToolResultPart;
1922
1938
 
1923
1939
  /**
1924
- * Optional status message
1940
+ * Optional A2A message providing additional context about the current status
1925
1941
  */
1926
- export type RunAgentAgentsMessage = {
1942
+ export type RunAgentTaskStatusMessage = {
1927
1943
  kind: RunAgentAgentsKind;
1928
1944
  messageId: string;
1929
1945
  /**
1930
- * Extended A2A message role
1946
+ * Role of the message sender in the A2A protocol. Values: user (end user), agent (AI agent), tool (tool execution result), system (system instructions/prompts).
1931
1947
  */
1932
- role: RunAgentAgentsRole;
1948
+ role: RunAgentExtendedMessageRole;
1933
1949
  parts: Array<
1934
- | RunAgentParts4
1935
- | RunAgentParts1
1936
- | RunAgentParts2
1937
- | RunAgentParts3
1938
- | RunAgentParts5
1950
+ | RunAgentPartsToolCallPart
1951
+ | RunAgentPartsTextPart
1952
+ | RunAgentPartsDataPart
1953
+ | RunAgentPartsFilePart
1954
+ | RunAgentPartsToolResultPart
1939
1955
  >;
1940
1956
  };
1941
1957
 
1942
1958
  /**
1943
- * Task status information
1959
+ * Current task status information
1944
1960
  */
1945
- export type RunAgentStatus = {
1961
+ export type RunAgentTaskStatus = {
1946
1962
  /**
1947
- * Current task state
1963
+ * 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.
1948
1964
  */
1949
- state: RunAgentState;
1965
+ state: RunAgentTaskState;
1950
1966
  /**
1951
- * ISO timestamp of status update
1967
+ * ISO 8601 timestamp of when the status was updated
1952
1968
  */
1953
1969
  timestamp?: string | undefined;
1954
1970
  /**
1955
- * Optional status message
1971
+ * Optional A2A message providing additional context about the current status
1956
1972
  */
1957
- message?: RunAgentAgentsMessage | undefined;
1973
+ message?: RunAgentTaskStatusMessage | undefined;
1958
1974
  };
1959
1975
 
1960
1976
  /**
1961
- * A2A Task response format
1977
+ * Response format following the Agent-to-Agent (A2A) protocol. Returned when starting or continuing an agent task execution.
1962
1978
  */
1963
- export type RunAgentResponseBody = {
1979
+ export type RunAgentA2ATaskResponse = {
1964
1980
  /**
1965
- * The ID of the created agent execution task
1981
+ * The unique ID of the created agent execution task
1966
1982
  */
1967
1983
  id: string;
1968
1984
  /**
1969
- * The correlation ID for this execution
1985
+ * The correlation ID for this execution (used for tracking)
1970
1986
  */
1971
1987
  contextId: string;
1972
1988
  /**
1973
- * A2A entity type
1989
+ * A2A entity type identifier
1974
1990
  */
1975
1991
  kind: RunAgentKind;
1976
1992
  /**
1977
- * Task status information
1993
+ * Current task status information
1978
1994
  */
1979
- status: RunAgentStatus;
1995
+ status: RunAgentTaskStatus;
1980
1996
  /**
1981
- * Task metadata containing workspace_id and trace_id for feedback
1997
+ * Task metadata containing workspace_id and trace_id for feedback and tracking
1982
1998
  */
1983
1999
  metadata?: { [k: string]: any } | undefined;
1984
2000
  };
@@ -4348,8 +4364,8 @@ export function runAgentPublicMessagePartFromJSON(
4348
4364
  }
4349
4365
 
4350
4366
  /** @internal */
4351
- export const RunAgentMessage$inboundSchema: z.ZodType<
4352
- RunAgentMessage,
4367
+ export const RunAgentA2AMessage$inboundSchema: z.ZodType<
4368
+ RunAgentA2AMessage,
4353
4369
  z.ZodTypeDef,
4354
4370
  unknown
4355
4371
  > = z.object({
@@ -4367,7 +4383,7 @@ export const RunAgentMessage$inboundSchema: z.ZodType<
4367
4383
  ),
4368
4384
  });
4369
4385
  /** @internal */
4370
- export type RunAgentMessage$Outbound = {
4386
+ export type RunAgentA2AMessage$Outbound = {
4371
4387
  messageId?: string | undefined;
4372
4388
  role: string | string;
4373
4389
  parts: Array<
@@ -4378,10 +4394,10 @@ export type RunAgentMessage$Outbound = {
4378
4394
  };
4379
4395
 
4380
4396
  /** @internal */
4381
- export const RunAgentMessage$outboundSchema: z.ZodType<
4382
- RunAgentMessage$Outbound,
4397
+ export const RunAgentA2AMessage$outboundSchema: z.ZodType<
4398
+ RunAgentA2AMessage$Outbound,
4383
4399
  z.ZodTypeDef,
4384
- RunAgentMessage
4400
+ RunAgentA2AMessage
4385
4401
  > = z.object({
4386
4402
  messageId: z.string().optional(),
4387
4403
  role: z.union([
@@ -4397,18 +4413,20 @@ export const RunAgentMessage$outboundSchema: z.ZodType<
4397
4413
  ),
4398
4414
  });
4399
4415
 
4400
- export function runAgentMessageToJSON(
4401
- runAgentMessage: RunAgentMessage,
4416
+ export function runAgentA2AMessageToJSON(
4417
+ runAgentA2AMessage: RunAgentA2AMessage,
4402
4418
  ): string {
4403
- return JSON.stringify(RunAgentMessage$outboundSchema.parse(runAgentMessage));
4419
+ return JSON.stringify(
4420
+ RunAgentA2AMessage$outboundSchema.parse(runAgentA2AMessage),
4421
+ );
4404
4422
  }
4405
- export function runAgentMessageFromJSON(
4423
+ export function runAgentA2AMessageFromJSON(
4406
4424
  jsonString: string,
4407
- ): SafeParseResult<RunAgentMessage, SDKValidationError> {
4425
+ ): SafeParseResult<RunAgentA2AMessage, SDKValidationError> {
4408
4426
  return safeParse(
4409
4427
  jsonString,
4410
- (x) => RunAgentMessage$inboundSchema.parse(JSON.parse(x)),
4411
- `Failed to parse 'RunAgentMessage' from JSON`,
4428
+ (x) => RunAgentA2AMessage$inboundSchema.parse(JSON.parse(x)),
4429
+ `Failed to parse 'RunAgentA2AMessage' from JSON`,
4412
4430
  );
4413
4431
  }
4414
4432
 
@@ -4757,7 +4775,7 @@ export function schemaFromJSON(
4757
4775
  /** @internal */
4758
4776
  export const Tools$inboundSchema: z.ZodType<Tools, z.ZodTypeDef, unknown> = z
4759
4777
  .object({
4760
- id: z.string().default("01KAE3ET25RM6ZNJ0MR18WR3Q3"),
4778
+ id: z.string().default("01KAG5HQZRY2P47TK252G58EK5"),
4761
4779
  name: z.string(),
4762
4780
  description: z.string().optional(),
4763
4781
  schema: z.lazy(() => Schema$inboundSchema),
@@ -4776,7 +4794,7 @@ export const Tools$outboundSchema: z.ZodType<
4776
4794
  z.ZodTypeDef,
4777
4795
  Tools
4778
4796
  > = z.object({
4779
- id: z.string().default("01KAE3ET25RM6ZNJ0MR18WR3Q3"),
4797
+ id: z.string().default("01KAG5HQZRY2P47TK252G58EK5"),
4780
4798
  name: z.string(),
4781
4799
  description: z.string().optional(),
4782
4800
  schema: z.lazy(() => Schema$outboundSchema),
@@ -6785,7 +6803,7 @@ export const RunAgentRequestBody$inboundSchema: z.ZodType<
6785
6803
  ).optional(),
6786
6804
  role: z.string(),
6787
6805
  instructions: z.string(),
6788
- message: z.lazy(() => RunAgentMessage$inboundSchema),
6806
+ message: z.lazy(() => RunAgentA2AMessage$inboundSchema),
6789
6807
  variables: z.record(z.any()).optional(),
6790
6808
  contact: z.lazy(() => RunAgentContact$inboundSchema).optional(),
6791
6809
  thread: z.lazy(() => RunAgentThread$inboundSchema).optional(),
@@ -6820,7 +6838,7 @@ export type RunAgentRequestBody$Outbound = {
6820
6838
  | undefined;
6821
6839
  role: string;
6822
6840
  instructions: string;
6823
- message: RunAgentMessage$Outbound;
6841
+ message: RunAgentA2AMessage$Outbound;
6824
6842
  variables?: { [k: string]: any } | undefined;
6825
6843
  contact?: RunAgentContact$Outbound | undefined;
6826
6844
  thread?: RunAgentThread$Outbound | undefined;
@@ -6855,7 +6873,7 @@ export const RunAgentRequestBody$outboundSchema: z.ZodType<
6855
6873
  ).optional(),
6856
6874
  role: z.string(),
6857
6875
  instructions: z.string(),
6858
- message: z.lazy(() => RunAgentMessage$outboundSchema),
6876
+ message: z.lazy(() => RunAgentA2AMessage$outboundSchema),
6859
6877
  variables: z.record(z.any()).optional(),
6860
6878
  contact: z.lazy(() => RunAgentContact$outboundSchema).optional(),
6861
6879
  thread: z.lazy(() => RunAgentThread$outboundSchema).optional(),
@@ -6906,13 +6924,13 @@ export const RunAgentKind$outboundSchema: z.ZodNativeEnum<typeof RunAgentKind> =
6906
6924
  RunAgentKind$inboundSchema;
6907
6925
 
6908
6926
  /** @internal */
6909
- export const RunAgentState$inboundSchema: z.ZodNativeEnum<
6910
- typeof RunAgentState
6911
- > = z.nativeEnum(RunAgentState);
6927
+ export const RunAgentTaskState$inboundSchema: z.ZodNativeEnum<
6928
+ typeof RunAgentTaskState
6929
+ > = z.nativeEnum(RunAgentTaskState);
6912
6930
  /** @internal */
6913
- export const RunAgentState$outboundSchema: z.ZodNativeEnum<
6914
- typeof RunAgentState
6915
- > = RunAgentState$inboundSchema;
6931
+ export const RunAgentTaskState$outboundSchema: z.ZodNativeEnum<
6932
+ typeof RunAgentTaskState
6933
+ > = RunAgentTaskState$inboundSchema;
6916
6934
 
6917
6935
  /** @internal */
6918
6936
  export const RunAgentAgentsKind$inboundSchema: z.ZodNativeEnum<
@@ -6924,13 +6942,13 @@ export const RunAgentAgentsKind$outboundSchema: z.ZodNativeEnum<
6924
6942
  > = RunAgentAgentsKind$inboundSchema;
6925
6943
 
6926
6944
  /** @internal */
6927
- export const RunAgentAgentsRole$inboundSchema: z.ZodNativeEnum<
6928
- typeof RunAgentAgentsRole
6929
- > = z.nativeEnum(RunAgentAgentsRole);
6945
+ export const RunAgentExtendedMessageRole$inboundSchema: z.ZodNativeEnum<
6946
+ typeof RunAgentExtendedMessageRole
6947
+ > = z.nativeEnum(RunAgentExtendedMessageRole);
6930
6948
  /** @internal */
6931
- export const RunAgentAgentsRole$outboundSchema: z.ZodNativeEnum<
6932
- typeof RunAgentAgentsRole
6933
- > = RunAgentAgentsRole$inboundSchema;
6949
+ export const RunAgentExtendedMessageRole$outboundSchema: z.ZodNativeEnum<
6950
+ typeof RunAgentExtendedMessageRole
6951
+ > = RunAgentExtendedMessageRole$inboundSchema;
6934
6952
 
6935
6953
  /** @internal */
6936
6954
  export const RunAgentPartsAgentsResponse200ApplicationJSONKind$inboundSchema:
@@ -6942,8 +6960,8 @@ export const RunAgentPartsAgentsResponse200ApplicationJSONKind$outboundSchema:
6942
6960
  RunAgentPartsAgentsResponse200ApplicationJSONKind$inboundSchema;
6943
6961
 
6944
6962
  /** @internal */
6945
- export const RunAgentParts5$inboundSchema: z.ZodType<
6946
- RunAgentParts5,
6963
+ export const RunAgentPartsToolResultPart$inboundSchema: z.ZodType<
6964
+ RunAgentPartsToolResultPart,
6947
6965
  z.ZodTypeDef,
6948
6966
  unknown
6949
6967
  > = z.object({
@@ -6957,7 +6975,7 @@ export const RunAgentParts5$inboundSchema: z.ZodType<
6957
6975
  });
6958
6976
  });
6959
6977
  /** @internal */
6960
- export type RunAgentParts5$Outbound = {
6978
+ export type RunAgentPartsToolResultPart$Outbound = {
6961
6979
  kind: string;
6962
6980
  tool_call_id: string;
6963
6981
  result?: any | undefined;
@@ -6965,10 +6983,10 @@ export type RunAgentParts5$Outbound = {
6965
6983
  };
6966
6984
 
6967
6985
  /** @internal */
6968
- export const RunAgentParts5$outboundSchema: z.ZodType<
6969
- RunAgentParts5$Outbound,
6986
+ export const RunAgentPartsToolResultPart$outboundSchema: z.ZodType<
6987
+ RunAgentPartsToolResultPart$Outbound,
6970
6988
  z.ZodTypeDef,
6971
- RunAgentParts5
6989
+ RunAgentPartsToolResultPart
6972
6990
  > = z.object({
6973
6991
  kind: RunAgentPartsAgentsResponse200ApplicationJSONKind$outboundSchema,
6974
6992
  toolCallId: z.string(),
@@ -6980,16 +6998,22 @@ export const RunAgentParts5$outboundSchema: z.ZodType<
6980
6998
  });
6981
6999
  });
6982
7000
 
6983
- export function runAgentParts5ToJSON(runAgentParts5: RunAgentParts5): string {
6984
- return JSON.stringify(RunAgentParts5$outboundSchema.parse(runAgentParts5));
7001
+ export function runAgentPartsToolResultPartToJSON(
7002
+ runAgentPartsToolResultPart: RunAgentPartsToolResultPart,
7003
+ ): string {
7004
+ return JSON.stringify(
7005
+ RunAgentPartsToolResultPart$outboundSchema.parse(
7006
+ runAgentPartsToolResultPart,
7007
+ ),
7008
+ );
6985
7009
  }
6986
- export function runAgentParts5FromJSON(
7010
+ export function runAgentPartsToolResultPartFromJSON(
6987
7011
  jsonString: string,
6988
- ): SafeParseResult<RunAgentParts5, SDKValidationError> {
7012
+ ): SafeParseResult<RunAgentPartsToolResultPart, SDKValidationError> {
6989
7013
  return safeParse(
6990
7014
  jsonString,
6991
- (x) => RunAgentParts5$inboundSchema.parse(JSON.parse(x)),
6992
- `Failed to parse 'RunAgentParts5' from JSON`,
7015
+ (x) => RunAgentPartsToolResultPart$inboundSchema.parse(JSON.parse(x)),
7016
+ `Failed to parse 'RunAgentPartsToolResultPart' from JSON`,
6993
7017
  );
6994
7018
  }
6995
7019
 
@@ -7003,8 +7027,8 @@ export const RunAgentPartsAgentsResponse200Kind$outboundSchema: z.ZodNativeEnum<
7003
7027
  > = RunAgentPartsAgentsResponse200Kind$inboundSchema;
7004
7028
 
7005
7029
  /** @internal */
7006
- export const RunAgentParts4$inboundSchema: z.ZodType<
7007
- RunAgentParts4,
7030
+ export const RunAgentPartsToolCallPart$inboundSchema: z.ZodType<
7031
+ RunAgentPartsToolCallPart,
7008
7032
  z.ZodTypeDef,
7009
7033
  unknown
7010
7034
  > = z.object({
@@ -7020,7 +7044,7 @@ export const RunAgentParts4$inboundSchema: z.ZodType<
7020
7044
  });
7021
7045
  });
7022
7046
  /** @internal */
7023
- export type RunAgentParts4$Outbound = {
7047
+ export type RunAgentPartsToolCallPart$Outbound = {
7024
7048
  kind: string;
7025
7049
  tool_name: string;
7026
7050
  tool_call_id: string;
@@ -7029,10 +7053,10 @@ export type RunAgentParts4$Outbound = {
7029
7053
  };
7030
7054
 
7031
7055
  /** @internal */
7032
- export const RunAgentParts4$outboundSchema: z.ZodType<
7033
- RunAgentParts4$Outbound,
7056
+ export const RunAgentPartsToolCallPart$outboundSchema: z.ZodType<
7057
+ RunAgentPartsToolCallPart$Outbound,
7034
7058
  z.ZodTypeDef,
7035
- RunAgentParts4
7059
+ RunAgentPartsToolCallPart
7036
7060
  > = z.object({
7037
7061
  kind: RunAgentPartsAgentsResponse200Kind$outboundSchema,
7038
7062
  toolName: z.string(),
@@ -7046,16 +7070,20 @@ export const RunAgentParts4$outboundSchema: z.ZodType<
7046
7070
  });
7047
7071
  });
7048
7072
 
7049
- export function runAgentParts4ToJSON(runAgentParts4: RunAgentParts4): string {
7050
- return JSON.stringify(RunAgentParts4$outboundSchema.parse(runAgentParts4));
7073
+ export function runAgentPartsToolCallPartToJSON(
7074
+ runAgentPartsToolCallPart: RunAgentPartsToolCallPart,
7075
+ ): string {
7076
+ return JSON.stringify(
7077
+ RunAgentPartsToolCallPart$outboundSchema.parse(runAgentPartsToolCallPart),
7078
+ );
7051
7079
  }
7052
- export function runAgentParts4FromJSON(
7080
+ export function runAgentPartsToolCallPartFromJSON(
7053
7081
  jsonString: string,
7054
- ): SafeParseResult<RunAgentParts4, SDKValidationError> {
7082
+ ): SafeParseResult<RunAgentPartsToolCallPart, SDKValidationError> {
7055
7083
  return safeParse(
7056
7084
  jsonString,
7057
- (x) => RunAgentParts4$inboundSchema.parse(JSON.parse(x)),
7058
- `Failed to parse 'RunAgentParts4' from JSON`,
7085
+ (x) => RunAgentPartsToolCallPart$inboundSchema.parse(JSON.parse(x)),
7086
+ `Failed to parse 'RunAgentPartsToolCallPart' from JSON`,
7059
7087
  );
7060
7088
  }
7061
7089
 
@@ -7202,8 +7230,8 @@ export function runAgentPartsFileFromJSON(
7202
7230
  }
7203
7231
 
7204
7232
  /** @internal */
7205
- export const RunAgentParts3$inboundSchema: z.ZodType<
7206
- RunAgentParts3,
7233
+ export const RunAgentPartsFilePart$inboundSchema: z.ZodType<
7234
+ RunAgentPartsFilePart,
7207
7235
  z.ZodTypeDef,
7208
7236
  unknown
7209
7237
  > = z.object({
@@ -7215,7 +7243,7 @@ export const RunAgentParts3$inboundSchema: z.ZodType<
7215
7243
  metadata: z.record(z.any()).optional(),
7216
7244
  });
7217
7245
  /** @internal */
7218
- export type RunAgentParts3$Outbound = {
7246
+ export type RunAgentPartsFilePart$Outbound = {
7219
7247
  kind: string;
7220
7248
  file:
7221
7249
  | RunAgentFileBinaryFormat$Outbound
@@ -7224,10 +7252,10 @@ export type RunAgentParts3$Outbound = {
7224
7252
  };
7225
7253
 
7226
7254
  /** @internal */
7227
- export const RunAgentParts3$outboundSchema: z.ZodType<
7228
- RunAgentParts3$Outbound,
7255
+ export const RunAgentPartsFilePart$outboundSchema: z.ZodType<
7256
+ RunAgentPartsFilePart$Outbound,
7229
7257
  z.ZodTypeDef,
7230
- RunAgentParts3
7258
+ RunAgentPartsFilePart
7231
7259
  > = z.object({
7232
7260
  kind: RunAgentPartsAgentsResponseKind$outboundSchema,
7233
7261
  file: z.union([
@@ -7237,16 +7265,20 @@ export const RunAgentParts3$outboundSchema: z.ZodType<
7237
7265
  metadata: z.record(z.any()).optional(),
7238
7266
  });
7239
7267
 
7240
- export function runAgentParts3ToJSON(runAgentParts3: RunAgentParts3): string {
7241
- return JSON.stringify(RunAgentParts3$outboundSchema.parse(runAgentParts3));
7268
+ export function runAgentPartsFilePartToJSON(
7269
+ runAgentPartsFilePart: RunAgentPartsFilePart,
7270
+ ): string {
7271
+ return JSON.stringify(
7272
+ RunAgentPartsFilePart$outboundSchema.parse(runAgentPartsFilePart),
7273
+ );
7242
7274
  }
7243
- export function runAgentParts3FromJSON(
7275
+ export function runAgentPartsFilePartFromJSON(
7244
7276
  jsonString: string,
7245
- ): SafeParseResult<RunAgentParts3, SDKValidationError> {
7277
+ ): SafeParseResult<RunAgentPartsFilePart, SDKValidationError> {
7246
7278
  return safeParse(
7247
7279
  jsonString,
7248
- (x) => RunAgentParts3$inboundSchema.parse(JSON.parse(x)),
7249
- `Failed to parse 'RunAgentParts3' from JSON`,
7280
+ (x) => RunAgentPartsFilePart$inboundSchema.parse(JSON.parse(x)),
7281
+ `Failed to parse 'RunAgentPartsFilePart' from JSON`,
7250
7282
  );
7251
7283
  }
7252
7284
 
@@ -7260,8 +7292,8 @@ export const RunAgentPartsAgentsKind$outboundSchema: z.ZodNativeEnum<
7260
7292
  > = RunAgentPartsAgentsKind$inboundSchema;
7261
7293
 
7262
7294
  /** @internal */
7263
- export const RunAgentParts2$inboundSchema: z.ZodType<
7264
- RunAgentParts2,
7295
+ export const RunAgentPartsDataPart$inboundSchema: z.ZodType<
7296
+ RunAgentPartsDataPart,
7265
7297
  z.ZodTypeDef,
7266
7298
  unknown
7267
7299
  > = z.object({
@@ -7270,33 +7302,37 @@ export const RunAgentParts2$inboundSchema: z.ZodType<
7270
7302
  metadata: z.record(z.any()).optional(),
7271
7303
  });
7272
7304
  /** @internal */
7273
- export type RunAgentParts2$Outbound = {
7305
+ export type RunAgentPartsDataPart$Outbound = {
7274
7306
  kind: string;
7275
7307
  data: { [k: string]: any };
7276
7308
  metadata?: { [k: string]: any } | undefined;
7277
7309
  };
7278
7310
 
7279
7311
  /** @internal */
7280
- export const RunAgentParts2$outboundSchema: z.ZodType<
7281
- RunAgentParts2$Outbound,
7312
+ export const RunAgentPartsDataPart$outboundSchema: z.ZodType<
7313
+ RunAgentPartsDataPart$Outbound,
7282
7314
  z.ZodTypeDef,
7283
- RunAgentParts2
7315
+ RunAgentPartsDataPart
7284
7316
  > = z.object({
7285
7317
  kind: RunAgentPartsAgentsKind$outboundSchema,
7286
7318
  data: z.record(z.any()),
7287
7319
  metadata: z.record(z.any()).optional(),
7288
7320
  });
7289
7321
 
7290
- export function runAgentParts2ToJSON(runAgentParts2: RunAgentParts2): string {
7291
- return JSON.stringify(RunAgentParts2$outboundSchema.parse(runAgentParts2));
7322
+ export function runAgentPartsDataPartToJSON(
7323
+ runAgentPartsDataPart: RunAgentPartsDataPart,
7324
+ ): string {
7325
+ return JSON.stringify(
7326
+ RunAgentPartsDataPart$outboundSchema.parse(runAgentPartsDataPart),
7327
+ );
7292
7328
  }
7293
- export function runAgentParts2FromJSON(
7329
+ export function runAgentPartsDataPartFromJSON(
7294
7330
  jsonString: string,
7295
- ): SafeParseResult<RunAgentParts2, SDKValidationError> {
7331
+ ): SafeParseResult<RunAgentPartsDataPart, SDKValidationError> {
7296
7332
  return safeParse(
7297
7333
  jsonString,
7298
- (x) => RunAgentParts2$inboundSchema.parse(JSON.parse(x)),
7299
- `Failed to parse 'RunAgentParts2' from JSON`,
7334
+ (x) => RunAgentPartsDataPart$inboundSchema.parse(JSON.parse(x)),
7335
+ `Failed to parse 'RunAgentPartsDataPart' from JSON`,
7300
7336
  );
7301
7337
  }
7302
7338
 
@@ -7310,8 +7346,8 @@ export const RunAgentPartsKind$outboundSchema: z.ZodNativeEnum<
7310
7346
  > = RunAgentPartsKind$inboundSchema;
7311
7347
 
7312
7348
  /** @internal */
7313
- export const RunAgentParts1$inboundSchema: z.ZodType<
7314
- RunAgentParts1,
7349
+ export const RunAgentPartsTextPart$inboundSchema: z.ZodType<
7350
+ RunAgentPartsTextPart,
7315
7351
  z.ZodTypeDef,
7316
7352
  unknown
7317
7353
  > = z.object({
@@ -7319,31 +7355,35 @@ export const RunAgentParts1$inboundSchema: z.ZodType<
7319
7355
  text: z.string(),
7320
7356
  });
7321
7357
  /** @internal */
7322
- export type RunAgentParts1$Outbound = {
7358
+ export type RunAgentPartsTextPart$Outbound = {
7323
7359
  kind: string;
7324
7360
  text: string;
7325
7361
  };
7326
7362
 
7327
7363
  /** @internal */
7328
- export const RunAgentParts1$outboundSchema: z.ZodType<
7329
- RunAgentParts1$Outbound,
7364
+ export const RunAgentPartsTextPart$outboundSchema: z.ZodType<
7365
+ RunAgentPartsTextPart$Outbound,
7330
7366
  z.ZodTypeDef,
7331
- RunAgentParts1
7367
+ RunAgentPartsTextPart
7332
7368
  > = z.object({
7333
7369
  kind: RunAgentPartsKind$outboundSchema,
7334
7370
  text: z.string(),
7335
7371
  });
7336
7372
 
7337
- export function runAgentParts1ToJSON(runAgentParts1: RunAgentParts1): string {
7338
- return JSON.stringify(RunAgentParts1$outboundSchema.parse(runAgentParts1));
7373
+ export function runAgentPartsTextPartToJSON(
7374
+ runAgentPartsTextPart: RunAgentPartsTextPart,
7375
+ ): string {
7376
+ return JSON.stringify(
7377
+ RunAgentPartsTextPart$outboundSchema.parse(runAgentPartsTextPart),
7378
+ );
7339
7379
  }
7340
- export function runAgentParts1FromJSON(
7380
+ export function runAgentPartsTextPartFromJSON(
7341
7381
  jsonString: string,
7342
- ): SafeParseResult<RunAgentParts1, SDKValidationError> {
7382
+ ): SafeParseResult<RunAgentPartsTextPart, SDKValidationError> {
7343
7383
  return safeParse(
7344
7384
  jsonString,
7345
- (x) => RunAgentParts1$inboundSchema.parse(JSON.parse(x)),
7346
- `Failed to parse 'RunAgentParts1' from JSON`,
7385
+ (x) => RunAgentPartsTextPart$inboundSchema.parse(JSON.parse(x)),
7386
+ `Failed to parse 'RunAgentPartsTextPart' from JSON`,
7347
7387
  );
7348
7388
  }
7349
7389
 
@@ -7353,19 +7393,19 @@ export const RunAgentParts$inboundSchema: z.ZodType<
7353
7393
  z.ZodTypeDef,
7354
7394
  unknown
7355
7395
  > = z.union([
7356
- z.lazy(() => RunAgentParts4$inboundSchema),
7357
- z.lazy(() => RunAgentParts1$inboundSchema),
7358
- z.lazy(() => RunAgentParts2$inboundSchema),
7359
- z.lazy(() => RunAgentParts3$inboundSchema),
7360
- z.lazy(() => RunAgentParts5$inboundSchema),
7396
+ z.lazy(() => RunAgentPartsToolCallPart$inboundSchema),
7397
+ z.lazy(() => RunAgentPartsTextPart$inboundSchema),
7398
+ z.lazy(() => RunAgentPartsDataPart$inboundSchema),
7399
+ z.lazy(() => RunAgentPartsFilePart$inboundSchema),
7400
+ z.lazy(() => RunAgentPartsToolResultPart$inboundSchema),
7361
7401
  ]);
7362
7402
  /** @internal */
7363
7403
  export type RunAgentParts$Outbound =
7364
- | RunAgentParts4$Outbound
7365
- | RunAgentParts1$Outbound
7366
- | RunAgentParts2$Outbound
7367
- | RunAgentParts3$Outbound
7368
- | RunAgentParts5$Outbound;
7404
+ | RunAgentPartsToolCallPart$Outbound
7405
+ | RunAgentPartsTextPart$Outbound
7406
+ | RunAgentPartsDataPart$Outbound
7407
+ | RunAgentPartsFilePart$Outbound
7408
+ | RunAgentPartsToolResultPart$Outbound;
7369
7409
 
7370
7410
  /** @internal */
7371
7411
  export const RunAgentParts$outboundSchema: z.ZodType<
@@ -7373,11 +7413,11 @@ export const RunAgentParts$outboundSchema: z.ZodType<
7373
7413
  z.ZodTypeDef,
7374
7414
  RunAgentParts
7375
7415
  > = z.union([
7376
- z.lazy(() => RunAgentParts4$outboundSchema),
7377
- z.lazy(() => RunAgentParts1$outboundSchema),
7378
- z.lazy(() => RunAgentParts2$outboundSchema),
7379
- z.lazy(() => RunAgentParts3$outboundSchema),
7380
- z.lazy(() => RunAgentParts5$outboundSchema),
7416
+ z.lazy(() => RunAgentPartsToolCallPart$outboundSchema),
7417
+ z.lazy(() => RunAgentPartsTextPart$outboundSchema),
7418
+ z.lazy(() => RunAgentPartsDataPart$outboundSchema),
7419
+ z.lazy(() => RunAgentPartsFilePart$outboundSchema),
7420
+ z.lazy(() => RunAgentPartsToolResultPart$outboundSchema),
7381
7421
  ]);
7382
7422
 
7383
7423
  export function runAgentPartsToJSON(runAgentParts: RunAgentParts): string {
@@ -7394,163 +7434,167 @@ export function runAgentPartsFromJSON(
7394
7434
  }
7395
7435
 
7396
7436
  /** @internal */
7397
- export const RunAgentAgentsMessage$inboundSchema: z.ZodType<
7398
- RunAgentAgentsMessage,
7437
+ export const RunAgentTaskStatusMessage$inboundSchema: z.ZodType<
7438
+ RunAgentTaskStatusMessage,
7399
7439
  z.ZodTypeDef,
7400
7440
  unknown
7401
7441
  > = z.object({
7402
7442
  kind: RunAgentAgentsKind$inboundSchema,
7403
7443
  messageId: z.string(),
7404
- role: RunAgentAgentsRole$inboundSchema,
7444
+ role: RunAgentExtendedMessageRole$inboundSchema,
7405
7445
  parts: z.array(
7406
7446
  z.union([
7407
- z.lazy(() => RunAgentParts4$inboundSchema),
7408
- z.lazy(() => RunAgentParts1$inboundSchema),
7409
- z.lazy(() => RunAgentParts2$inboundSchema),
7410
- z.lazy(() => RunAgentParts3$inboundSchema),
7411
- z.lazy(() => RunAgentParts5$inboundSchema),
7447
+ z.lazy(() => RunAgentPartsToolCallPart$inboundSchema),
7448
+ z.lazy(() => RunAgentPartsTextPart$inboundSchema),
7449
+ z.lazy(() => RunAgentPartsDataPart$inboundSchema),
7450
+ z.lazy(() => RunAgentPartsFilePart$inboundSchema),
7451
+ z.lazy(() => RunAgentPartsToolResultPart$inboundSchema),
7412
7452
  ]),
7413
7453
  ),
7414
7454
  });
7415
7455
  /** @internal */
7416
- export type RunAgentAgentsMessage$Outbound = {
7456
+ export type RunAgentTaskStatusMessage$Outbound = {
7417
7457
  kind: string;
7418
7458
  messageId: string;
7419
7459
  role: string;
7420
7460
  parts: Array<
7421
- | RunAgentParts4$Outbound
7422
- | RunAgentParts1$Outbound
7423
- | RunAgentParts2$Outbound
7424
- | RunAgentParts3$Outbound
7425
- | RunAgentParts5$Outbound
7461
+ | RunAgentPartsToolCallPart$Outbound
7462
+ | RunAgentPartsTextPart$Outbound
7463
+ | RunAgentPartsDataPart$Outbound
7464
+ | RunAgentPartsFilePart$Outbound
7465
+ | RunAgentPartsToolResultPart$Outbound
7426
7466
  >;
7427
7467
  };
7428
7468
 
7429
7469
  /** @internal */
7430
- export const RunAgentAgentsMessage$outboundSchema: z.ZodType<
7431
- RunAgentAgentsMessage$Outbound,
7470
+ export const RunAgentTaskStatusMessage$outboundSchema: z.ZodType<
7471
+ RunAgentTaskStatusMessage$Outbound,
7432
7472
  z.ZodTypeDef,
7433
- RunAgentAgentsMessage
7473
+ RunAgentTaskStatusMessage
7434
7474
  > = z.object({
7435
7475
  kind: RunAgentAgentsKind$outboundSchema,
7436
7476
  messageId: z.string(),
7437
- role: RunAgentAgentsRole$outboundSchema,
7477
+ role: RunAgentExtendedMessageRole$outboundSchema,
7438
7478
  parts: z.array(
7439
7479
  z.union([
7440
- z.lazy(() => RunAgentParts4$outboundSchema),
7441
- z.lazy(() => RunAgentParts1$outboundSchema),
7442
- z.lazy(() => RunAgentParts2$outboundSchema),
7443
- z.lazy(() => RunAgentParts3$outboundSchema),
7444
- z.lazy(() => RunAgentParts5$outboundSchema),
7480
+ z.lazy(() => RunAgentPartsToolCallPart$outboundSchema),
7481
+ z.lazy(() => RunAgentPartsTextPart$outboundSchema),
7482
+ z.lazy(() => RunAgentPartsDataPart$outboundSchema),
7483
+ z.lazy(() => RunAgentPartsFilePart$outboundSchema),
7484
+ z.lazy(() => RunAgentPartsToolResultPart$outboundSchema),
7445
7485
  ]),
7446
7486
  ),
7447
7487
  });
7448
7488
 
7449
- export function runAgentAgentsMessageToJSON(
7450
- runAgentAgentsMessage: RunAgentAgentsMessage,
7489
+ export function runAgentTaskStatusMessageToJSON(
7490
+ runAgentTaskStatusMessage: RunAgentTaskStatusMessage,
7451
7491
  ): string {
7452
7492
  return JSON.stringify(
7453
- RunAgentAgentsMessage$outboundSchema.parse(runAgentAgentsMessage),
7493
+ RunAgentTaskStatusMessage$outboundSchema.parse(runAgentTaskStatusMessage),
7454
7494
  );
7455
7495
  }
7456
- export function runAgentAgentsMessageFromJSON(
7496
+ export function runAgentTaskStatusMessageFromJSON(
7457
7497
  jsonString: string,
7458
- ): SafeParseResult<RunAgentAgentsMessage, SDKValidationError> {
7498
+ ): SafeParseResult<RunAgentTaskStatusMessage, SDKValidationError> {
7459
7499
  return safeParse(
7460
7500
  jsonString,
7461
- (x) => RunAgentAgentsMessage$inboundSchema.parse(JSON.parse(x)),
7462
- `Failed to parse 'RunAgentAgentsMessage' from JSON`,
7501
+ (x) => RunAgentTaskStatusMessage$inboundSchema.parse(JSON.parse(x)),
7502
+ `Failed to parse 'RunAgentTaskStatusMessage' from JSON`,
7463
7503
  );
7464
7504
  }
7465
7505
 
7466
7506
  /** @internal */
7467
- export const RunAgentStatus$inboundSchema: z.ZodType<
7468
- RunAgentStatus,
7507
+ export const RunAgentTaskStatus$inboundSchema: z.ZodType<
7508
+ RunAgentTaskStatus,
7469
7509
  z.ZodTypeDef,
7470
7510
  unknown
7471
7511
  > = z.object({
7472
- state: RunAgentState$inboundSchema,
7512
+ state: RunAgentTaskState$inboundSchema,
7473
7513
  timestamp: z.string().optional(),
7474
- message: z.lazy(() => RunAgentAgentsMessage$inboundSchema).optional(),
7514
+ message: z.lazy(() => RunAgentTaskStatusMessage$inboundSchema).optional(),
7475
7515
  });
7476
7516
  /** @internal */
7477
- export type RunAgentStatus$Outbound = {
7517
+ export type RunAgentTaskStatus$Outbound = {
7478
7518
  state: string;
7479
7519
  timestamp?: string | undefined;
7480
- message?: RunAgentAgentsMessage$Outbound | undefined;
7520
+ message?: RunAgentTaskStatusMessage$Outbound | undefined;
7481
7521
  };
7482
7522
 
7483
7523
  /** @internal */
7484
- export const RunAgentStatus$outboundSchema: z.ZodType<
7485
- RunAgentStatus$Outbound,
7524
+ export const RunAgentTaskStatus$outboundSchema: z.ZodType<
7525
+ RunAgentTaskStatus$Outbound,
7486
7526
  z.ZodTypeDef,
7487
- RunAgentStatus
7527
+ RunAgentTaskStatus
7488
7528
  > = z.object({
7489
- state: RunAgentState$outboundSchema,
7529
+ state: RunAgentTaskState$outboundSchema,
7490
7530
  timestamp: z.string().optional(),
7491
- message: z.lazy(() => RunAgentAgentsMessage$outboundSchema).optional(),
7531
+ message: z.lazy(() => RunAgentTaskStatusMessage$outboundSchema).optional(),
7492
7532
  });
7493
7533
 
7494
- export function runAgentStatusToJSON(runAgentStatus: RunAgentStatus): string {
7495
- return JSON.stringify(RunAgentStatus$outboundSchema.parse(runAgentStatus));
7534
+ export function runAgentTaskStatusToJSON(
7535
+ runAgentTaskStatus: RunAgentTaskStatus,
7536
+ ): string {
7537
+ return JSON.stringify(
7538
+ RunAgentTaskStatus$outboundSchema.parse(runAgentTaskStatus),
7539
+ );
7496
7540
  }
7497
- export function runAgentStatusFromJSON(
7541
+ export function runAgentTaskStatusFromJSON(
7498
7542
  jsonString: string,
7499
- ): SafeParseResult<RunAgentStatus, SDKValidationError> {
7543
+ ): SafeParseResult<RunAgentTaskStatus, SDKValidationError> {
7500
7544
  return safeParse(
7501
7545
  jsonString,
7502
- (x) => RunAgentStatus$inboundSchema.parse(JSON.parse(x)),
7503
- `Failed to parse 'RunAgentStatus' from JSON`,
7546
+ (x) => RunAgentTaskStatus$inboundSchema.parse(JSON.parse(x)),
7547
+ `Failed to parse 'RunAgentTaskStatus' from JSON`,
7504
7548
  );
7505
7549
  }
7506
7550
 
7507
7551
  /** @internal */
7508
- export const RunAgentResponseBody$inboundSchema: z.ZodType<
7509
- RunAgentResponseBody,
7552
+ export const RunAgentA2ATaskResponse$inboundSchema: z.ZodType<
7553
+ RunAgentA2ATaskResponse,
7510
7554
  z.ZodTypeDef,
7511
7555
  unknown
7512
7556
  > = z.object({
7513
7557
  id: z.string(),
7514
7558
  contextId: z.string(),
7515
7559
  kind: RunAgentKind$inboundSchema,
7516
- status: z.lazy(() => RunAgentStatus$inboundSchema),
7560
+ status: z.lazy(() => RunAgentTaskStatus$inboundSchema),
7517
7561
  metadata: z.record(z.any()).optional(),
7518
7562
  });
7519
7563
  /** @internal */
7520
- export type RunAgentResponseBody$Outbound = {
7564
+ export type RunAgentA2ATaskResponse$Outbound = {
7521
7565
  id: string;
7522
7566
  contextId: string;
7523
7567
  kind: string;
7524
- status: RunAgentStatus$Outbound;
7568
+ status: RunAgentTaskStatus$Outbound;
7525
7569
  metadata?: { [k: string]: any } | undefined;
7526
7570
  };
7527
7571
 
7528
7572
  /** @internal */
7529
- export const RunAgentResponseBody$outboundSchema: z.ZodType<
7530
- RunAgentResponseBody$Outbound,
7573
+ export const RunAgentA2ATaskResponse$outboundSchema: z.ZodType<
7574
+ RunAgentA2ATaskResponse$Outbound,
7531
7575
  z.ZodTypeDef,
7532
- RunAgentResponseBody
7576
+ RunAgentA2ATaskResponse
7533
7577
  > = z.object({
7534
7578
  id: z.string(),
7535
7579
  contextId: z.string(),
7536
7580
  kind: RunAgentKind$outboundSchema,
7537
- status: z.lazy(() => RunAgentStatus$outboundSchema),
7581
+ status: z.lazy(() => RunAgentTaskStatus$outboundSchema),
7538
7582
  metadata: z.record(z.any()).optional(),
7539
7583
  });
7540
7584
 
7541
- export function runAgentResponseBodyToJSON(
7542
- runAgentResponseBody: RunAgentResponseBody,
7585
+ export function runAgentA2ATaskResponseToJSON(
7586
+ runAgentA2ATaskResponse: RunAgentA2ATaskResponse,
7543
7587
  ): string {
7544
7588
  return JSON.stringify(
7545
- RunAgentResponseBody$outboundSchema.parse(runAgentResponseBody),
7589
+ RunAgentA2ATaskResponse$outboundSchema.parse(runAgentA2ATaskResponse),
7546
7590
  );
7547
7591
  }
7548
- export function runAgentResponseBodyFromJSON(
7592
+ export function runAgentA2ATaskResponseFromJSON(
7549
7593
  jsonString: string,
7550
- ): SafeParseResult<RunAgentResponseBody, SDKValidationError> {
7594
+ ): SafeParseResult<RunAgentA2ATaskResponse, SDKValidationError> {
7551
7595
  return safeParse(
7552
7596
  jsonString,
7553
- (x) => RunAgentResponseBody$inboundSchema.parse(JSON.parse(x)),
7554
- `Failed to parse 'RunAgentResponseBody' from JSON`,
7597
+ (x) => RunAgentA2ATaskResponse$inboundSchema.parse(JSON.parse(x)),
7598
+ `Failed to parse 'RunAgentA2ATaskResponse' from JSON`,
7555
7599
  );
7556
7600
  }