@orq-ai/node 4.0.0-rc.67 → 4.0.0-rc.68

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 (143) hide show
  1. package/README.md +23 -18
  2. package/bin/mcp-server.js +2320 -1152
  3. package/bin/mcp-server.js.map +49 -46
  4. package/docs/sdks/responses/README.md +139 -0
  5. package/examples/package-lock.json +1 -1
  6. package/funcs/agentsResponsesCreate.d.ts +17 -0
  7. package/funcs/agentsResponsesCreate.d.ts.map +1 -0
  8. package/funcs/agentsResponsesCreate.js +120 -0
  9. package/funcs/agentsResponsesCreate.js.map +1 -0
  10. package/jsr.json +1 -1
  11. package/lib/config.d.ts +2 -2
  12. package/lib/config.js +2 -2
  13. package/mcp-server/mcp-server.js +1 -1
  14. package/mcp-server/server.d.ts.map +1 -1
  15. package/mcp-server/server.js +3 -1
  16. package/mcp-server/server.js.map +1 -1
  17. package/mcp-server/tools/agentsResponsesCreate.d.ts +8 -0
  18. package/mcp-server/tools/agentsResponsesCreate.d.ts.map +1 -0
  19. package/mcp-server/tools/agentsResponsesCreate.js +64 -0
  20. package/mcp-server/tools/agentsResponsesCreate.js.map +1 -0
  21. package/models/operations/createagent.js +4 -4
  22. package/models/operations/createagent.js.map +1 -1
  23. package/models/operations/createagentresponse.d.ts +564 -0
  24. package/models/operations/createagentresponse.d.ts.map +1 -0
  25. package/models/operations/createagentresponse.js +605 -0
  26. package/models/operations/createagentresponse.js.map +1 -0
  27. package/models/operations/createbudget.js +2 -2
  28. package/models/operations/createcontact.js +2 -2
  29. package/models/operations/createdataset.js +2 -2
  30. package/models/operations/createdatasetitem.js +8 -8
  31. package/models/operations/createdatasource.js +2 -2
  32. package/models/operations/createeval.js +28 -28
  33. package/models/operations/createtool.js +12 -12
  34. package/models/operations/fileget.js +2 -2
  35. package/models/operations/filelist.js +2 -2
  36. package/models/operations/fileupload.js +2 -2
  37. package/models/operations/getagent.js +2 -2
  38. package/models/operations/getagent.js.map +1 -1
  39. package/models/operations/getagenttask.d.ts +32 -32
  40. package/models/operations/getagenttask.d.ts.map +1 -1
  41. package/models/operations/getagenttask.js +50 -50
  42. package/models/operations/getagenttask.js.map +1 -1
  43. package/models/operations/getalltools.js +12 -12
  44. package/models/operations/getbudget.js +2 -2
  45. package/models/operations/getevals.js +28 -28
  46. package/models/operations/index.d.ts +1 -0
  47. package/models/operations/index.d.ts.map +1 -1
  48. package/models/operations/index.js +1 -0
  49. package/models/operations/index.js.map +1 -1
  50. package/models/operations/invokeagent.d.ts +95 -95
  51. package/models/operations/invokeagent.d.ts.map +1 -1
  52. package/models/operations/invokeagent.js +143 -134
  53. package/models/operations/invokeagent.js.map +1 -1
  54. package/models/operations/listagents.js +2 -2
  55. package/models/operations/listagents.js.map +1 -1
  56. package/models/operations/listbudgets.js +2 -2
  57. package/models/operations/listcontacts.js +2 -2
  58. package/models/operations/listdatasetdatapoints.js +8 -8
  59. package/models/operations/listdatasets.js +2 -2
  60. package/models/operations/listdatasources.js +2 -2
  61. package/models/operations/retrievecontact.js +2 -2
  62. package/models/operations/retrievedatapoint.js +8 -8
  63. package/models/operations/retrievedataset.js +2 -2
  64. package/models/operations/retrievedatasource.js +2 -2
  65. package/models/operations/retrievetool.js +12 -12
  66. package/models/operations/runagent.d.ts +54 -54
  67. package/models/operations/runagent.d.ts.map +1 -1
  68. package/models/operations/runagent.js +90 -90
  69. package/models/operations/runagent.js.map +1 -1
  70. package/models/operations/streamagent.d.ts +541 -68
  71. package/models/operations/streamagent.d.ts.map +1 -1
  72. package/models/operations/streamagent.js +649 -118
  73. package/models/operations/streamagent.js.map +1 -1
  74. package/models/operations/streamrunagent.d.ts +541 -68
  75. package/models/operations/streamrunagent.d.ts.map +1 -1
  76. package/models/operations/streamrunagent.js +657 -127
  77. package/models/operations/streamrunagent.js.map +1 -1
  78. package/models/operations/updateagent.js +4 -4
  79. package/models/operations/updateagent.js.map +1 -1
  80. package/models/operations/updatebudget.js +2 -2
  81. package/models/operations/updatecontact.js +2 -2
  82. package/models/operations/updatedatapoint.js +8 -8
  83. package/models/operations/updatedataset.js +2 -2
  84. package/models/operations/updatedatasource.js +2 -2
  85. package/models/operations/updateeval.js +28 -28
  86. package/models/operations/updatetool.js +14 -14
  87. package/package.json +1 -1
  88. package/sdk/agents.d.ts +3 -0
  89. package/sdk/agents.d.ts.map +1 -1
  90. package/sdk/agents.js +4 -0
  91. package/sdk/agents.js.map +1 -1
  92. package/sdk/responses.d.ts +12 -0
  93. package/sdk/responses.d.ts.map +1 -0
  94. package/sdk/responses.js +22 -0
  95. package/sdk/responses.js.map +1 -0
  96. package/src/funcs/agentsResponsesCreate.ts +168 -0
  97. package/src/lib/config.ts +2 -2
  98. package/src/mcp-server/mcp-server.ts +1 -1
  99. package/src/mcp-server/server.ts +3 -1
  100. package/src/mcp-server/tools/agentsResponsesCreate.ts +37 -0
  101. package/src/models/operations/createagent.ts +4 -4
  102. package/src/models/operations/createagentresponse.ts +1339 -0
  103. package/src/models/operations/createbudget.ts +2 -2
  104. package/src/models/operations/createcontact.ts +2 -2
  105. package/src/models/operations/createdataset.ts +2 -2
  106. package/src/models/operations/createdatasetitem.ts +8 -8
  107. package/src/models/operations/createdatasource.ts +2 -2
  108. package/src/models/operations/createeval.ts +28 -28
  109. package/src/models/operations/createtool.ts +12 -12
  110. package/src/models/operations/fileget.ts +2 -2
  111. package/src/models/operations/filelist.ts +2 -2
  112. package/src/models/operations/fileupload.ts +2 -2
  113. package/src/models/operations/getagent.ts +2 -2
  114. package/src/models/operations/getagenttask.ts +94 -94
  115. package/src/models/operations/getalltools.ts +12 -12
  116. package/src/models/operations/getbudget.ts +2 -2
  117. package/src/models/operations/getevals.ts +28 -28
  118. package/src/models/operations/index.ts +1 -0
  119. package/src/models/operations/invokeagent.ts +322 -246
  120. package/src/models/operations/listagents.ts +2 -2
  121. package/src/models/operations/listbudgets.ts +2 -2
  122. package/src/models/operations/listcontacts.ts +2 -2
  123. package/src/models/operations/listdatasetdatapoints.ts +8 -8
  124. package/src/models/operations/listdatasets.ts +2 -2
  125. package/src/models/operations/listdatasources.ts +2 -2
  126. package/src/models/operations/retrievecontact.ts +2 -2
  127. package/src/models/operations/retrievedatapoint.ts +8 -8
  128. package/src/models/operations/retrievedataset.ts +2 -2
  129. package/src/models/operations/retrievedatasource.ts +2 -2
  130. package/src/models/operations/retrievetool.ts +12 -12
  131. package/src/models/operations/runagent.ts +174 -157
  132. package/src/models/operations/streamagent.ts +1739 -297
  133. package/src/models/operations/streamrunagent.ts +1742 -307
  134. package/src/models/operations/updateagent.ts +4 -4
  135. package/src/models/operations/updatebudget.ts +2 -2
  136. package/src/models/operations/updatecontact.ts +2 -2
  137. package/src/models/operations/updatedatapoint.ts +8 -8
  138. package/src/models/operations/updatedataset.ts +2 -2
  139. package/src/models/operations/updatedatasource.ts +2 -2
  140. package/src/models/operations/updateeval.ts +28 -28
  141. package/src/models/operations/updatetool.ts +14 -14
  142. package/src/sdk/agents.ts +6 -0
  143. package/src/sdk/responses.ts +27 -0
@@ -1925,6 +1925,7 @@ export type StreamRunAgentDataAgentsResponse200TextEventStreamResponseBody15Data
1925
1925
  error: ErrorT;
1926
1926
  actionType: string;
1927
1927
  toolExecutionContext: StreamRunAgentDataToolExecutionContext;
1928
+ responseId?: string | undefined;
1928
1929
  };
1929
1930
 
1930
1931
  export type Fifteen = {
@@ -1995,6 +1996,7 @@ export type StreamRunAgentDataAgentsResponse200TextEventStreamResponseBody14Data
1995
1996
  result?: any | undefined;
1996
1997
  actionType: string;
1997
1998
  toolExecutionContext: DataToolExecutionContext;
1999
+ responseId?: string | undefined;
1998
2000
  };
1999
2001
 
2000
2002
  export type Fourteen = {
@@ -2068,6 +2070,7 @@ export type StreamRunAgentDataAgentsResponse200TextEventStreamResponseBody13Data
2068
2070
  actionType: string;
2069
2071
  toolArguments: { [k: string]: any };
2070
2072
  toolExecutionContext: ToolExecutionContext;
2073
+ responseId?: string | undefined;
2071
2074
  };
2072
2075
 
2073
2076
  export type Thirteen = {
@@ -2088,12 +2091,12 @@ export type StreamRunAgentDataAgentsResponse200TextEventStreamResponseBody12Type
2088
2091
  typeof StreamRunAgentDataAgentsResponse200TextEventStreamResponseBody12Type
2089
2092
  >;
2090
2093
 
2091
- export const StreamRunAgentDataAgentsRole = {
2094
+ export const StreamRunAgentDataAgentsResponseRole = {
2092
2095
  User: "user",
2093
2096
  Tool: "tool",
2094
2097
  } as const;
2095
- export type StreamRunAgentDataAgentsRole = ClosedEnum<
2096
- typeof StreamRunAgentDataAgentsRole
2098
+ export type StreamRunAgentDataAgentsResponseRole = ClosedEnum<
2099
+ typeof StreamRunAgentDataAgentsResponseRole
2097
2100
  >;
2098
2101
 
2099
2102
  export const StreamRunAgentPartsAgentsResponse200TextEventStreamResponseBodyData12DataMessage5Kind =
@@ -2108,7 +2111,7 @@ export type StreamRunAgentPartsAgentsResponse200TextEventStreamResponseBodyData1
2108
2111
  /**
2109
2112
  * The result of a tool execution. Contains the tool call ID for correlation and the result data from the tool invocation.
2110
2113
  */
2111
- export type StreamRunAgentPartsAgentsResponseToolResultPart = {
2114
+ export type StreamRunAgentPartsAgentsResponse200ToolResultPart = {
2112
2115
  kind:
2113
2116
  StreamRunAgentPartsAgentsResponse200TextEventStreamResponseBodyData12DataMessage5Kind;
2114
2117
  toolCallId: string;
@@ -2128,7 +2131,7 @@ export type StreamRunAgentPartsAgentsResponse200TextEventStreamResponseBodyData1
2128
2131
  /**
2129
2132
  * A tool invocation request from an agent. Contains the tool name, unique call ID, and arguments for the tool execution.
2130
2133
  */
2131
- export type StreamRunAgentPartsAgentsResponseToolCallPart = {
2134
+ export type StreamRunAgentPartsAgentsResponse200ToolCallPart = {
2132
2135
  kind:
2133
2136
  StreamRunAgentPartsAgentsResponse200TextEventStreamResponseBodyData12DataMessage4Kind;
2134
2137
  toolName: string;
@@ -2149,25 +2152,26 @@ export type StreamRunAgentPartsAgentsResponse200TextEventStreamResponseBodyData1
2149
2152
  /**
2150
2153
  * File in URI format. Check in the model's documentation for the supported mime types for the URI format
2151
2154
  */
2152
- export type StreamRunAgentFileAgentsResponse200FileInURIFormat = {
2153
- /**
2154
- * URL for the File content
2155
- */
2156
- uri: string;
2157
- /**
2158
- * Optional mimeType for the file
2159
- */
2160
- mimeType?: string | undefined;
2161
- /**
2162
- * Optional name for the file
2163
- */
2164
- name?: string | undefined;
2165
- };
2155
+ export type StreamRunAgentFileAgentsResponse200TextEventStreamFileInURIFormat =
2156
+ {
2157
+ /**
2158
+ * URL for the File content
2159
+ */
2160
+ uri: string;
2161
+ /**
2162
+ * Optional mimeType for the file
2163
+ */
2164
+ mimeType?: string | undefined;
2165
+ /**
2166
+ * Optional name for the file
2167
+ */
2168
+ name?: string | undefined;
2169
+ };
2166
2170
 
2167
2171
  /**
2168
2172
  * Binary in base64 format. Check in the model's documentation for the supported mime types for the binary format.
2169
2173
  */
2170
- export type StreamRunAgentFileAgentsResponse200BinaryFormat = {
2174
+ export type StreamRunAgentFileAgentsResponse200TextEventStreamBinaryFormat = {
2171
2175
  /**
2172
2176
  * base64 encoded content of the file
2173
2177
  */
@@ -2182,19 +2186,19 @@ export type StreamRunAgentFileAgentsResponse200BinaryFormat = {
2182
2186
  name?: string | undefined;
2183
2187
  };
2184
2188
 
2185
- export type StreamRunAgentPartsAgentsResponseFile =
2186
- | StreamRunAgentFileAgentsResponse200BinaryFormat
2187
- | StreamRunAgentFileAgentsResponse200FileInURIFormat;
2189
+ export type StreamRunAgentPartsAgentsResponse200File =
2190
+ | StreamRunAgentFileAgentsResponse200TextEventStreamBinaryFormat
2191
+ | StreamRunAgentFileAgentsResponse200TextEventStreamFileInURIFormat;
2188
2192
 
2189
2193
  /**
2190
2194
  * 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.
2191
2195
  */
2192
- export type StreamRunAgentPartsAgentsResponseFilePart = {
2196
+ export type StreamRunAgentPartsAgentsResponse200FilePart = {
2193
2197
  kind:
2194
2198
  StreamRunAgentPartsAgentsResponse200TextEventStreamResponseBodyData12DataMessageKind;
2195
2199
  file:
2196
- | StreamRunAgentFileAgentsResponse200BinaryFormat
2197
- | StreamRunAgentFileAgentsResponse200FileInURIFormat;
2200
+ | StreamRunAgentFileAgentsResponse200TextEventStreamBinaryFormat
2201
+ | StreamRunAgentFileAgentsResponse200TextEventStreamFileInURIFormat;
2198
2202
  metadata?: { [k: string]: any } | undefined;
2199
2203
  };
2200
2204
 
@@ -2210,7 +2214,7 @@ export type StreamRunAgentPartsAgentsResponse200TextEventStreamResponseBodyData1
2210
2214
  /**
2211
2215
  * A structured data part containing JSON-serializable key-value pairs. Used for passing structured information between agents and tools.
2212
2216
  */
2213
- export type StreamRunAgentPartsAgentsResponseDataPart = {
2217
+ export type StreamRunAgentPartsAgentsResponse200DataPart = {
2214
2218
  kind:
2215
2219
  StreamRunAgentPartsAgentsResponse200TextEventStreamResponseBodyData12DataKind;
2216
2220
  data: { [k: string]: any };
@@ -2229,28 +2233,28 @@ export type StreamRunAgentPartsAgentsResponse200TextEventStreamResponseBodyData1
2229
2233
  /**
2230
2234
  * A text content part containing plain text or markdown. Used for agent messages, user input, and text-based responses.
2231
2235
  */
2232
- export type StreamRunAgentPartsAgentsResponseTextPart = {
2236
+ export type StreamRunAgentPartsAgentsResponse200TextPart = {
2233
2237
  kind:
2234
2238
  StreamRunAgentPartsAgentsResponse200TextEventStreamResponseBodyData12Kind;
2235
2239
  text: string;
2236
2240
  };
2237
2241
 
2238
- export type StreamRunAgentDataAgentsParts =
2239
- | StreamRunAgentPartsAgentsResponseToolCallPart
2240
- | StreamRunAgentPartsAgentsResponseTextPart
2241
- | StreamRunAgentPartsAgentsResponseDataPart
2242
- | StreamRunAgentPartsAgentsResponseFilePart
2243
- | StreamRunAgentPartsAgentsResponseToolResultPart;
2242
+ export type StreamRunAgentDataAgentsResponseParts =
2243
+ | StreamRunAgentPartsAgentsResponse200ToolCallPart
2244
+ | StreamRunAgentPartsAgentsResponse200TextPart
2245
+ | StreamRunAgentPartsAgentsResponse200DataPart
2246
+ | StreamRunAgentPartsAgentsResponse200FilePart
2247
+ | StreamRunAgentPartsAgentsResponse200ToolResultPart;
2244
2248
 
2245
2249
  export type DataMessage = {
2246
2250
  messageId?: string | undefined;
2247
- role: StreamRunAgentDataAgentsRole;
2251
+ role: StreamRunAgentDataAgentsResponseRole;
2248
2252
  parts: Array<
2249
- | StreamRunAgentPartsAgentsResponseToolCallPart
2250
- | StreamRunAgentPartsAgentsResponseTextPart
2251
- | StreamRunAgentPartsAgentsResponseDataPart
2252
- | StreamRunAgentPartsAgentsResponseFilePart
2253
- | StreamRunAgentPartsAgentsResponseToolResultPart
2253
+ | StreamRunAgentPartsAgentsResponse200ToolCallPart
2254
+ | StreamRunAgentPartsAgentsResponse200TextPart
2255
+ | StreamRunAgentPartsAgentsResponse200DataPart
2256
+ | StreamRunAgentPartsAgentsResponse200FilePart
2257
+ | StreamRunAgentPartsAgentsResponse200ToolResultPart
2254
2258
  >;
2255
2259
  metadata?: { [k: string]: any } | undefined;
2256
2260
  };
@@ -2458,6 +2462,7 @@ export type StreamRunAgentDataAgentsResponse200TextEventStreamData = {
2458
2462
  tool: StreamRunAgentDataTool;
2459
2463
  input: { [k: string]: any };
2460
2464
  agentToolCallId: string;
2465
+ responseId?: string | undefined;
2461
2466
  };
2462
2467
 
2463
2468
  export type StreamRunAgentData6 = {
@@ -2479,6 +2484,10 @@ export type StreamRunAgentDataAgentsResponse200TextEventStreamType = ClosedEnum<
2479
2484
  export type StreamRunAgentDataAgentsResponse200Data = {
2480
2485
  error: string;
2481
2486
  code: number;
2487
+ /**
2488
+ * ID of the response tracking this execution
2489
+ */
2490
+ responseId?: string | undefined;
2482
2491
  };
2483
2492
 
2484
2493
  export type StreamRunAgentData5 = {
@@ -2497,6 +2506,187 @@ export type StreamRunAgentDataAgentsResponse200Type = ClosedEnum<
2497
2506
  typeof StreamRunAgentDataAgentsResponse200Type
2498
2507
  >;
2499
2508
 
2509
+ /**
2510
+ * Extended A2A message role
2511
+ */
2512
+ export const StreamRunAgentDataAgentsRole = {
2513
+ User: "user",
2514
+ Agent: "agent",
2515
+ Tool: "tool",
2516
+ System: "system",
2517
+ } as const;
2518
+ /**
2519
+ * Extended A2A message role
2520
+ */
2521
+ export type StreamRunAgentDataAgentsRole = ClosedEnum<
2522
+ typeof StreamRunAgentDataAgentsRole
2523
+ >;
2524
+
2525
+ export const StreamRunAgentPartsAgentsResponse200TextEventStreamResponseBodyData4DataLastMessageFull5Kind =
2526
+ {
2527
+ ToolResult: "tool_result",
2528
+ } as const;
2529
+ export type StreamRunAgentPartsAgentsResponse200TextEventStreamResponseBodyData4DataLastMessageFull5Kind =
2530
+ ClosedEnum<
2531
+ typeof StreamRunAgentPartsAgentsResponse200TextEventStreamResponseBodyData4DataLastMessageFull5Kind
2532
+ >;
2533
+
2534
+ /**
2535
+ * The result of a tool execution. Contains the tool call ID for correlation and the result data from the tool invocation.
2536
+ */
2537
+ export type StreamRunAgentPartsAgentsResponseToolResultPart = {
2538
+ kind:
2539
+ StreamRunAgentPartsAgentsResponse200TextEventStreamResponseBodyData4DataLastMessageFull5Kind;
2540
+ toolCallId: string;
2541
+ result?: any | undefined;
2542
+ metadata?: { [k: string]: any } | undefined;
2543
+ };
2544
+
2545
+ export const StreamRunAgentPartsAgentsResponse200TextEventStreamResponseBodyData4DataLastMessageFull4Kind =
2546
+ {
2547
+ ToolCall: "tool_call",
2548
+ } as const;
2549
+ export type StreamRunAgentPartsAgentsResponse200TextEventStreamResponseBodyData4DataLastMessageFull4Kind =
2550
+ ClosedEnum<
2551
+ typeof StreamRunAgentPartsAgentsResponse200TextEventStreamResponseBodyData4DataLastMessageFull4Kind
2552
+ >;
2553
+
2554
+ /**
2555
+ * A tool invocation request from an agent. Contains the tool name, unique call ID, and arguments for the tool execution.
2556
+ */
2557
+ export type StreamRunAgentPartsAgentsResponseToolCallPart = {
2558
+ kind:
2559
+ StreamRunAgentPartsAgentsResponse200TextEventStreamResponseBodyData4DataLastMessageFull4Kind;
2560
+ toolName: string;
2561
+ toolCallId: string;
2562
+ arguments: { [k: string]: any };
2563
+ metadata?: { [k: string]: any } | undefined;
2564
+ };
2565
+
2566
+ export const StreamRunAgentPartsAgentsResponse200TextEventStreamResponseBodyData4DataLastMessageFullKind =
2567
+ {
2568
+ File: "file",
2569
+ } as const;
2570
+ export type StreamRunAgentPartsAgentsResponse200TextEventStreamResponseBodyData4DataLastMessageFullKind =
2571
+ ClosedEnum<
2572
+ typeof StreamRunAgentPartsAgentsResponse200TextEventStreamResponseBodyData4DataLastMessageFullKind
2573
+ >;
2574
+
2575
+ /**
2576
+ * File in URI format. Check in the model's documentation for the supported mime types for the URI format
2577
+ */
2578
+ export type StreamRunAgentFileAgentsResponse200FileInURIFormat = {
2579
+ /**
2580
+ * URL for the File content
2581
+ */
2582
+ uri: string;
2583
+ /**
2584
+ * Optional mimeType for the file
2585
+ */
2586
+ mimeType?: string | undefined;
2587
+ /**
2588
+ * Optional name for the file
2589
+ */
2590
+ name?: string | undefined;
2591
+ };
2592
+
2593
+ /**
2594
+ * Binary in base64 format. Check in the model's documentation for the supported mime types for the binary format.
2595
+ */
2596
+ export type StreamRunAgentFileAgentsResponse200BinaryFormat = {
2597
+ /**
2598
+ * base64 encoded content of the file
2599
+ */
2600
+ bytes: string;
2601
+ /**
2602
+ * Optional mimeType for the file
2603
+ */
2604
+ mimeType?: string | undefined;
2605
+ /**
2606
+ * Optional name for the file
2607
+ */
2608
+ name?: string | undefined;
2609
+ };
2610
+
2611
+ export type StreamRunAgentPartsAgentsResponseFile =
2612
+ | StreamRunAgentFileAgentsResponse200BinaryFormat
2613
+ | StreamRunAgentFileAgentsResponse200FileInURIFormat;
2614
+
2615
+ /**
2616
+ * 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.
2617
+ */
2618
+ export type StreamRunAgentPartsAgentsResponseFilePart = {
2619
+ kind:
2620
+ StreamRunAgentPartsAgentsResponse200TextEventStreamResponseBodyData4DataLastMessageFullKind;
2621
+ file:
2622
+ | StreamRunAgentFileAgentsResponse200BinaryFormat
2623
+ | StreamRunAgentFileAgentsResponse200FileInURIFormat;
2624
+ metadata?: { [k: string]: any } | undefined;
2625
+ };
2626
+
2627
+ export const StreamRunAgentPartsAgentsResponse200TextEventStreamResponseBodyData4DataKind =
2628
+ {
2629
+ Data: "data",
2630
+ } as const;
2631
+ export type StreamRunAgentPartsAgentsResponse200TextEventStreamResponseBodyData4DataKind =
2632
+ ClosedEnum<
2633
+ typeof StreamRunAgentPartsAgentsResponse200TextEventStreamResponseBodyData4DataKind
2634
+ >;
2635
+
2636
+ /**
2637
+ * A structured data part containing JSON-serializable key-value pairs. Used for passing structured information between agents and tools.
2638
+ */
2639
+ export type StreamRunAgentPartsAgentsResponseDataPart = {
2640
+ kind:
2641
+ StreamRunAgentPartsAgentsResponse200TextEventStreamResponseBodyData4DataKind;
2642
+ data: { [k: string]: any };
2643
+ metadata?: { [k: string]: any } | undefined;
2644
+ };
2645
+
2646
+ export const StreamRunAgentPartsAgentsResponse200TextEventStreamResponseBodyData4Kind =
2647
+ {
2648
+ Text: "text",
2649
+ } as const;
2650
+ export type StreamRunAgentPartsAgentsResponse200TextEventStreamResponseBodyData4Kind =
2651
+ ClosedEnum<
2652
+ typeof StreamRunAgentPartsAgentsResponse200TextEventStreamResponseBodyData4Kind
2653
+ >;
2654
+
2655
+ /**
2656
+ * A text content part containing plain text or markdown. Used for agent messages, user input, and text-based responses.
2657
+ */
2658
+ export type StreamRunAgentPartsAgentsResponseTextPart = {
2659
+ kind:
2660
+ StreamRunAgentPartsAgentsResponse200TextEventStreamResponseBodyData4Kind;
2661
+ text: string;
2662
+ };
2663
+
2664
+ export type StreamRunAgentDataAgentsParts =
2665
+ | StreamRunAgentPartsAgentsResponseToolCallPart
2666
+ | StreamRunAgentPartsAgentsResponseTextPart
2667
+ | StreamRunAgentPartsAgentsResponseDataPart
2668
+ | StreamRunAgentPartsAgentsResponseFilePart
2669
+ | StreamRunAgentPartsAgentsResponseToolResultPart;
2670
+
2671
+ /**
2672
+ * Full last message in A2A format (for backwards compatibility)
2673
+ */
2674
+ export type LastMessageFull = {
2675
+ messageId?: string | undefined;
2676
+ /**
2677
+ * Extended A2A message role
2678
+ */
2679
+ role: StreamRunAgentDataAgentsRole;
2680
+ parts: Array<
2681
+ | StreamRunAgentPartsAgentsResponseToolCallPart
2682
+ | StreamRunAgentPartsAgentsResponseTextPart
2683
+ | StreamRunAgentPartsAgentsResponseDataPart
2684
+ | StreamRunAgentPartsAgentsResponseFilePart
2685
+ | StreamRunAgentPartsAgentsResponseToolResultPart
2686
+ >;
2687
+ metadata?: { [k: string]: any } | undefined;
2688
+ };
2689
+
2500
2690
  /**
2501
2691
  * The reason why the agent execution became inactive
2502
2692
  */
@@ -2534,8 +2724,56 @@ export type PendingToolCalls = {
2534
2724
  function: StreamRunAgentDataFunction;
2535
2725
  };
2536
2726
 
2727
+ export type StreamRunAgentDataPromptTokensDetails = {
2728
+ cachedTokens?: number | null | undefined;
2729
+ /**
2730
+ * The number of audio input tokens consumed by the request.
2731
+ */
2732
+ audioTokens?: number | null | undefined;
2733
+ };
2734
+
2735
+ export type StreamRunAgentDataCompletionTokensDetails = {
2736
+ reasoningTokens?: number | null | undefined;
2737
+ acceptedPredictionTokens?: number | null | undefined;
2738
+ rejectedPredictionTokens?: number | null | undefined;
2739
+ /**
2740
+ * The number of audio output tokens produced by the response.
2741
+ */
2742
+ audioTokens?: number | null | undefined;
2743
+ };
2744
+
2745
+ /**
2746
+ * Token usage from the last agent message
2747
+ */
2748
+ export type StreamRunAgentDataUsage = {
2749
+ /**
2750
+ * Number of tokens in the generated completion.
2751
+ */
2752
+ completionTokens?: number | undefined;
2753
+ /**
2754
+ * Number of tokens in the prompt.
2755
+ */
2756
+ promptTokens?: number | undefined;
2757
+ /**
2758
+ * Total number of tokens used in the request (prompt + completion).
2759
+ */
2760
+ totalTokens?: number | undefined;
2761
+ promptTokensDetails?:
2762
+ | StreamRunAgentDataPromptTokensDetails
2763
+ | null
2764
+ | undefined;
2765
+ completionTokensDetails?:
2766
+ | StreamRunAgentDataCompletionTokensDetails
2767
+ | null
2768
+ | undefined;
2769
+ };
2770
+
2537
2771
  export type StreamRunAgentDataAgentsResponseData = {
2538
2772
  lastMessage: string;
2773
+ /**
2774
+ * Full last message in A2A format (for backwards compatibility)
2775
+ */
2776
+ lastMessageFull?: LastMessageFull | undefined;
2539
2777
  /**
2540
2778
  * The reason why the agent execution became inactive
2541
2779
  */
@@ -2544,6 +2782,14 @@ export type StreamRunAgentDataAgentsResponseData = {
2544
2782
  * Tool calls that are pending user response (for function_call finish reason)
2545
2783
  */
2546
2784
  pendingToolCalls?: Array<PendingToolCalls> | undefined;
2785
+ /**
2786
+ * Token usage from the last agent message
2787
+ */
2788
+ usage?: StreamRunAgentDataUsage | undefined;
2789
+ /**
2790
+ * ID of the response tracking this execution
2791
+ */
2792
+ responseId?: string | undefined;
2547
2793
  };
2548
2794
 
2549
2795
  export type Data4 = {
@@ -2775,11 +3021,11 @@ export type DataToolCalls = {
2775
3021
  function?: StreamRunAgentDataAgentsFunction | undefined;
2776
3022
  };
2777
3023
 
2778
- export const StreamRunAgentDataAgentsResponseRole = {
3024
+ export const StreamRunAgentDataAgentsResponse200Role = {
2779
3025
  Assistant: "assistant",
2780
3026
  } as const;
2781
- export type StreamRunAgentDataAgentsResponseRole = ClosedEnum<
2782
- typeof StreamRunAgentDataAgentsResponseRole
3027
+ export type StreamRunAgentDataAgentsResponse200Role = ClosedEnum<
3028
+ typeof StreamRunAgentDataAgentsResponse200Role
2783
3029
  >;
2784
3030
 
2785
3031
  /**
@@ -2799,7 +3045,7 @@ export type StreamRunAgentDataMessage = {
2799
3045
  content?: string | null | undefined;
2800
3046
  refusal?: string | null | undefined;
2801
3047
  toolCalls?: Array<DataToolCalls> | undefined;
2802
- role?: StreamRunAgentDataAgentsResponseRole | undefined;
3048
+ role?: StreamRunAgentDataAgentsResponse200Role | undefined;
2803
3049
  /**
2804
3050
  * Internal thought process of the model
2805
3051
  */
@@ -2919,6 +3165,44 @@ export type Choice = {
2919
3165
  logprobs?: Logprobs | null | undefined;
2920
3166
  };
2921
3167
 
3168
+ export type DataPromptTokensDetails = {
3169
+ cachedTokens?: number | null | undefined;
3170
+ /**
3171
+ * The number of audio input tokens consumed by the request.
3172
+ */
3173
+ audioTokens?: number | null | undefined;
3174
+ };
3175
+
3176
+ export type DataCompletionTokensDetails = {
3177
+ reasoningTokens?: number | null | undefined;
3178
+ acceptedPredictionTokens?: number | null | undefined;
3179
+ rejectedPredictionTokens?: number | null | undefined;
3180
+ /**
3181
+ * The number of audio output tokens produced by the response.
3182
+ */
3183
+ audioTokens?: number | null | undefined;
3184
+ };
3185
+
3186
+ /**
3187
+ * Usage statistics for the completion request.
3188
+ */
3189
+ export type DataUsage = {
3190
+ /**
3191
+ * Number of tokens in the generated completion.
3192
+ */
3193
+ completionTokens?: number | undefined;
3194
+ /**
3195
+ * Number of tokens in the prompt.
3196
+ */
3197
+ promptTokens?: number | undefined;
3198
+ /**
3199
+ * Total number of tokens used in the request (prompt + completion).
3200
+ */
3201
+ totalTokens?: number | undefined;
3202
+ promptTokensDetails?: DataPromptTokensDetails | null | undefined;
3203
+ completionTokensDetails?: DataCompletionTokensDetails | null | undefined;
3204
+ };
3205
+
2922
3206
  export type StreamRunAgentDataAgentsData = {
2923
3207
  agentId: string;
2924
3208
  messageDifference: { [k: string]: MessageDifference };
@@ -2926,7 +3210,12 @@ export type StreamRunAgentDataAgentsData = {
2926
3210
  choiceIndex?: number | undefined;
2927
3211
  iteration: number;
2928
3212
  accumulatedExecutionTime: number;
2929
- };
3213
+ responseId?: string | undefined;
3214
+ /**
3215
+ * Usage statistics for the completion request.
3216
+ */
3217
+ usage?: DataUsage | undefined;
3218
+ };
2930
3219
 
2931
3220
  export type Data3 = {
2932
3221
  type: StreamRunAgentDataAgentsResponseType;
@@ -3254,6 +3543,7 @@ export type StreamRunAgentDataData = {
3254
3543
  toolExecutionId?: string | undefined;
3255
3544
  isContinuation?: boolean | undefined;
3256
3545
  stream?: boolean | undefined;
3546
+ responseId?: string | undefined;
3257
3547
  };
3258
3548
 
3259
3549
  export type Data2 = {
@@ -6299,7 +6589,7 @@ export const AgentToolInputRunTools$inboundSchema: z.ZodType<
6299
6589
  z.ZodTypeDef,
6300
6590
  unknown
6301
6591
  > = z.object({
6302
- id: z.string().default("01KANJXYY5X5KQPGXYH2MBPFRX"),
6592
+ id: z.string().default("01KAPPHK7QM15CJG4A8SSCAAXJ"),
6303
6593
  name: z.string(),
6304
6594
  description: z.string().optional(),
6305
6595
  schema: z.lazy(() => AgentToolInputRunSchema$inboundSchema),
@@ -6318,7 +6608,7 @@ export const AgentToolInputRunTools$outboundSchema: z.ZodType<
6318
6608
  z.ZodTypeDef,
6319
6609
  AgentToolInputRunTools
6320
6610
  > = z.object({
6321
- id: z.string().default("01KANJXYY5X5KQPGXYH2MBPFRX"),
6611
+ id: z.string().default("01KAPPHK7QM15CJG4A8SSCAAXJ"),
6322
6612
  name: z.string(),
6323
6613
  description: z.string().optional(),
6324
6614
  schema: z.lazy(() => AgentToolInputRunSchema$outboundSchema),
@@ -8449,7 +8739,7 @@ export const StreamRunAgentSettings$inboundSchema: z.ZodType<
8449
8739
  ).optional(),
8450
8740
  tool_approval_required: StreamRunAgentToolApprovalRequired$inboundSchema
8451
8741
  .default("none"),
8452
- max_iterations: z.number().int().default(15),
8742
+ max_iterations: z.number().int().default(100),
8453
8743
  max_execution_time: z.number().int().default(300),
8454
8744
  evaluators: z.array(z.lazy(() => StreamRunAgentEvaluators$inboundSchema))
8455
8745
  .optional(),
@@ -8539,7 +8829,7 @@ export const StreamRunAgentSettings$outboundSchema: z.ZodType<
8539
8829
  ).optional(),
8540
8830
  toolApprovalRequired: StreamRunAgentToolApprovalRequired$outboundSchema
8541
8831
  .default("none"),
8542
- maxIterations: z.number().int().default(15),
8832
+ maxIterations: z.number().int().default(100),
8543
8833
  maxExecutionTime: z.number().int().default(300),
8544
8834
  evaluators: z.array(z.lazy(() => StreamRunAgentEvaluators$outboundSchema))
8545
8835
  .optional(),
@@ -9139,6 +9429,7 @@ export const StreamRunAgentDataAgentsResponse200TextEventStreamResponseBody15Dat
9139
9429
  tool_execution_context: z.lazy(() =>
9140
9430
  StreamRunAgentDataToolExecutionContext$inboundSchema
9141
9431
  ),
9432
+ responseId: z.string().optional(),
9142
9433
  }).transform((v) => {
9143
9434
  return remap$(v, {
9144
9435
  "action_type": "actionType",
@@ -9151,6 +9442,7 @@ export type StreamRunAgentDataAgentsResponse200TextEventStreamResponseBody15Data
9151
9442
  error: ErrorT$Outbound;
9152
9443
  action_type: string;
9153
9444
  tool_execution_context: StreamRunAgentDataToolExecutionContext$Outbound;
9445
+ responseId?: string | undefined;
9154
9446
  };
9155
9447
 
9156
9448
  /** @internal */
@@ -9165,6 +9457,7 @@ export const StreamRunAgentDataAgentsResponse200TextEventStreamResponseBody15Dat
9165
9457
  toolExecutionContext: z.lazy(() =>
9166
9458
  StreamRunAgentDataToolExecutionContext$outboundSchema
9167
9459
  ),
9460
+ responseId: z.string().optional(),
9168
9461
  }).transform((v) => {
9169
9462
  return remap$(v, {
9170
9463
  actionType: "action_type",
@@ -9401,6 +9694,7 @@ export const StreamRunAgentDataAgentsResponse200TextEventStreamResponseBody14Dat
9401
9694
  tool_execution_context: z.lazy(() =>
9402
9695
  DataToolExecutionContext$inboundSchema
9403
9696
  ),
9697
+ responseId: z.string().optional(),
9404
9698
  }).transform((v) => {
9405
9699
  return remap$(v, {
9406
9700
  "action_type": "actionType",
@@ -9413,6 +9707,7 @@ export type StreamRunAgentDataAgentsResponse200TextEventStreamResponseBody14Data
9413
9707
  result?: any | undefined;
9414
9708
  action_type: string;
9415
9709
  tool_execution_context: DataToolExecutionContext$Outbound;
9710
+ responseId?: string | undefined;
9416
9711
  };
9417
9712
 
9418
9713
  /** @internal */
@@ -9425,6 +9720,7 @@ export const StreamRunAgentDataAgentsResponse200TextEventStreamResponseBody14Dat
9425
9720
  result: z.any().optional(),
9426
9721
  actionType: z.string(),
9427
9722
  toolExecutionContext: z.lazy(() => DataToolExecutionContext$outboundSchema),
9723
+ responseId: z.string().optional(),
9428
9724
  }).transform((v) => {
9429
9725
  return remap$(v, {
9430
9726
  actionType: "action_type",
@@ -9661,6 +9957,7 @@ export const StreamRunAgentDataAgentsResponse200TextEventStreamResponseBody13Dat
9661
9957
  action_type: z.string(),
9662
9958
  tool_arguments: z.record(z.any()),
9663
9959
  tool_execution_context: z.lazy(() => ToolExecutionContext$inboundSchema),
9960
+ responseId: z.string().optional(),
9664
9961
  }).transform((v) => {
9665
9962
  return remap$(v, {
9666
9963
  "tool_id": "toolId",
@@ -9680,6 +9977,7 @@ export type StreamRunAgentDataAgentsResponse200TextEventStreamResponseBody13Data
9680
9977
  action_type: string;
9681
9978
  tool_arguments: { [k: string]: any };
9682
9979
  tool_execution_context: ToolExecutionContext$Outbound;
9980
+ responseId?: string | undefined;
9683
9981
  };
9684
9982
 
9685
9983
  /** @internal */
@@ -9695,6 +9993,7 @@ export const StreamRunAgentDataAgentsResponse200TextEventStreamResponseBody13Dat
9695
9993
  actionType: z.string(),
9696
9994
  toolArguments: z.record(z.any()),
9697
9995
  toolExecutionContext: z.lazy(() => ToolExecutionContext$outboundSchema),
9996
+ responseId: z.string().optional(),
9698
9997
  }).transform((v) => {
9699
9998
  return remap$(v, {
9700
9999
  toolId: "tool_id",
@@ -9795,13 +10094,14 @@ export const StreamRunAgentDataAgentsResponse200TextEventStreamResponseBody12Typ
9795
10094
  StreamRunAgentDataAgentsResponse200TextEventStreamResponseBody12Type$inboundSchema;
9796
10095
 
9797
10096
  /** @internal */
9798
- export const StreamRunAgentDataAgentsRole$inboundSchema: z.ZodNativeEnum<
9799
- typeof StreamRunAgentDataAgentsRole
9800
- > = z.nativeEnum(StreamRunAgentDataAgentsRole);
10097
+ export const StreamRunAgentDataAgentsResponseRole$inboundSchema:
10098
+ z.ZodNativeEnum<typeof StreamRunAgentDataAgentsResponseRole> = z.nativeEnum(
10099
+ StreamRunAgentDataAgentsResponseRole,
10100
+ );
9801
10101
  /** @internal */
9802
- export const StreamRunAgentDataAgentsRole$outboundSchema: z.ZodNativeEnum<
9803
- typeof StreamRunAgentDataAgentsRole
9804
- > = StreamRunAgentDataAgentsRole$inboundSchema;
10102
+ export const StreamRunAgentDataAgentsResponseRole$outboundSchema:
10103
+ z.ZodNativeEnum<typeof StreamRunAgentDataAgentsResponseRole> =
10104
+ StreamRunAgentDataAgentsResponseRole$inboundSchema;
9805
10105
 
9806
10106
  /** @internal */
9807
10107
  export const StreamRunAgentPartsAgentsResponse200TextEventStreamResponseBodyData12DataMessage5Kind$inboundSchema:
@@ -9818,9 +10118,9 @@ export const StreamRunAgentPartsAgentsResponse200TextEventStreamResponseBodyData
9818
10118
  StreamRunAgentPartsAgentsResponse200TextEventStreamResponseBodyData12DataMessage5Kind$inboundSchema;
9819
10119
 
9820
10120
  /** @internal */
9821
- export const StreamRunAgentPartsAgentsResponseToolResultPart$inboundSchema:
10121
+ export const StreamRunAgentPartsAgentsResponse200ToolResultPart$inboundSchema:
9822
10122
  z.ZodType<
9823
- StreamRunAgentPartsAgentsResponseToolResultPart,
10123
+ StreamRunAgentPartsAgentsResponse200ToolResultPart,
9824
10124
  z.ZodTypeDef,
9825
10125
  unknown
9826
10126
  > = z.object({
@@ -9835,7 +10135,7 @@ export const StreamRunAgentPartsAgentsResponseToolResultPart$inboundSchema:
9835
10135
  });
9836
10136
  });
9837
10137
  /** @internal */
9838
- export type StreamRunAgentPartsAgentsResponseToolResultPart$Outbound = {
10138
+ export type StreamRunAgentPartsAgentsResponse200ToolResultPart$Outbound = {
9839
10139
  kind: string;
9840
10140
  tool_call_id: string;
9841
10141
  result?: any | undefined;
@@ -9843,11 +10143,11 @@ export type StreamRunAgentPartsAgentsResponseToolResultPart$Outbound = {
9843
10143
  };
9844
10144
 
9845
10145
  /** @internal */
9846
- export const StreamRunAgentPartsAgentsResponseToolResultPart$outboundSchema:
10146
+ export const StreamRunAgentPartsAgentsResponse200ToolResultPart$outboundSchema:
9847
10147
  z.ZodType<
9848
- StreamRunAgentPartsAgentsResponseToolResultPart$Outbound,
10148
+ StreamRunAgentPartsAgentsResponse200ToolResultPart$Outbound,
9849
10149
  z.ZodTypeDef,
9850
- StreamRunAgentPartsAgentsResponseToolResultPart
10150
+ StreamRunAgentPartsAgentsResponse200ToolResultPart
9851
10151
  > = z.object({
9852
10152
  kind:
9853
10153
  StreamRunAgentPartsAgentsResponse200TextEventStreamResponseBodyData12DataMessage5Kind$outboundSchema,
@@ -9860,29 +10160,29 @@ export const StreamRunAgentPartsAgentsResponseToolResultPart$outboundSchema:
9860
10160
  });
9861
10161
  });
9862
10162
 
9863
- export function streamRunAgentPartsAgentsResponseToolResultPartToJSON(
9864
- streamRunAgentPartsAgentsResponseToolResultPart:
9865
- StreamRunAgentPartsAgentsResponseToolResultPart,
10163
+ export function streamRunAgentPartsAgentsResponse200ToolResultPartToJSON(
10164
+ streamRunAgentPartsAgentsResponse200ToolResultPart:
10165
+ StreamRunAgentPartsAgentsResponse200ToolResultPart,
9866
10166
  ): string {
9867
10167
  return JSON.stringify(
9868
- StreamRunAgentPartsAgentsResponseToolResultPart$outboundSchema.parse(
9869
- streamRunAgentPartsAgentsResponseToolResultPart,
10168
+ StreamRunAgentPartsAgentsResponse200ToolResultPart$outboundSchema.parse(
10169
+ streamRunAgentPartsAgentsResponse200ToolResultPart,
9870
10170
  ),
9871
10171
  );
9872
10172
  }
9873
- export function streamRunAgentPartsAgentsResponseToolResultPartFromJSON(
10173
+ export function streamRunAgentPartsAgentsResponse200ToolResultPartFromJSON(
9874
10174
  jsonString: string,
9875
10175
  ): SafeParseResult<
9876
- StreamRunAgentPartsAgentsResponseToolResultPart,
10176
+ StreamRunAgentPartsAgentsResponse200ToolResultPart,
9877
10177
  SDKValidationError
9878
10178
  > {
9879
10179
  return safeParse(
9880
10180
  jsonString,
9881
10181
  (x) =>
9882
- StreamRunAgentPartsAgentsResponseToolResultPart$inboundSchema.parse(
10182
+ StreamRunAgentPartsAgentsResponse200ToolResultPart$inboundSchema.parse(
9883
10183
  JSON.parse(x),
9884
10184
  ),
9885
- `Failed to parse 'StreamRunAgentPartsAgentsResponseToolResultPart' from JSON`,
10185
+ `Failed to parse 'StreamRunAgentPartsAgentsResponse200ToolResultPart' from JSON`,
9886
10186
  );
9887
10187
  }
9888
10188
 
@@ -9901,9 +10201,9 @@ export const StreamRunAgentPartsAgentsResponse200TextEventStreamResponseBodyData
9901
10201
  StreamRunAgentPartsAgentsResponse200TextEventStreamResponseBodyData12DataMessage4Kind$inboundSchema;
9902
10202
 
9903
10203
  /** @internal */
9904
- export const StreamRunAgentPartsAgentsResponseToolCallPart$inboundSchema:
10204
+ export const StreamRunAgentPartsAgentsResponse200ToolCallPart$inboundSchema:
9905
10205
  z.ZodType<
9906
- StreamRunAgentPartsAgentsResponseToolCallPart,
10206
+ StreamRunAgentPartsAgentsResponse200ToolCallPart,
9907
10207
  z.ZodTypeDef,
9908
10208
  unknown
9909
10209
  > = z.object({
@@ -9920,7 +10220,7 @@ export const StreamRunAgentPartsAgentsResponseToolCallPart$inboundSchema:
9920
10220
  });
9921
10221
  });
9922
10222
  /** @internal */
9923
- export type StreamRunAgentPartsAgentsResponseToolCallPart$Outbound = {
10223
+ export type StreamRunAgentPartsAgentsResponse200ToolCallPart$Outbound = {
9924
10224
  kind: string;
9925
10225
  tool_name: string;
9926
10226
  tool_call_id: string;
@@ -9929,11 +10229,11 @@ export type StreamRunAgentPartsAgentsResponseToolCallPart$Outbound = {
9929
10229
  };
9930
10230
 
9931
10231
  /** @internal */
9932
- export const StreamRunAgentPartsAgentsResponseToolCallPart$outboundSchema:
10232
+ export const StreamRunAgentPartsAgentsResponse200ToolCallPart$outboundSchema:
9933
10233
  z.ZodType<
9934
- StreamRunAgentPartsAgentsResponseToolCallPart$Outbound,
10234
+ StreamRunAgentPartsAgentsResponse200ToolCallPart$Outbound,
9935
10235
  z.ZodTypeDef,
9936
- StreamRunAgentPartsAgentsResponseToolCallPart
10236
+ StreamRunAgentPartsAgentsResponse200ToolCallPart
9937
10237
  > = z.object({
9938
10238
  kind:
9939
10239
  StreamRunAgentPartsAgentsResponse200TextEventStreamResponseBodyData12DataMessage4Kind$outboundSchema,
@@ -9948,29 +10248,29 @@ export const StreamRunAgentPartsAgentsResponseToolCallPart$outboundSchema:
9948
10248
  });
9949
10249
  });
9950
10250
 
9951
- export function streamRunAgentPartsAgentsResponseToolCallPartToJSON(
9952
- streamRunAgentPartsAgentsResponseToolCallPart:
9953
- StreamRunAgentPartsAgentsResponseToolCallPart,
10251
+ export function streamRunAgentPartsAgentsResponse200ToolCallPartToJSON(
10252
+ streamRunAgentPartsAgentsResponse200ToolCallPart:
10253
+ StreamRunAgentPartsAgentsResponse200ToolCallPart,
9954
10254
  ): string {
9955
10255
  return JSON.stringify(
9956
- StreamRunAgentPartsAgentsResponseToolCallPart$outboundSchema.parse(
9957
- streamRunAgentPartsAgentsResponseToolCallPart,
10256
+ StreamRunAgentPartsAgentsResponse200ToolCallPart$outboundSchema.parse(
10257
+ streamRunAgentPartsAgentsResponse200ToolCallPart,
9958
10258
  ),
9959
10259
  );
9960
10260
  }
9961
- export function streamRunAgentPartsAgentsResponseToolCallPartFromJSON(
10261
+ export function streamRunAgentPartsAgentsResponse200ToolCallPartFromJSON(
9962
10262
  jsonString: string,
9963
10263
  ): SafeParseResult<
9964
- StreamRunAgentPartsAgentsResponseToolCallPart,
10264
+ StreamRunAgentPartsAgentsResponse200ToolCallPart,
9965
10265
  SDKValidationError
9966
10266
  > {
9967
10267
  return safeParse(
9968
10268
  jsonString,
9969
10269
  (x) =>
9970
- StreamRunAgentPartsAgentsResponseToolCallPart$inboundSchema.parse(
10270
+ StreamRunAgentPartsAgentsResponse200ToolCallPart$inboundSchema.parse(
9971
10271
  JSON.parse(x),
9972
10272
  ),
9973
- `Failed to parse 'StreamRunAgentPartsAgentsResponseToolCallPart' from JSON`,
10273
+ `Failed to parse 'StreamRunAgentPartsAgentsResponse200ToolCallPart' from JSON`,
9974
10274
  );
9975
10275
  }
9976
10276
 
@@ -9989,9 +10289,9 @@ export const StreamRunAgentPartsAgentsResponse200TextEventStreamResponseBodyData
9989
10289
  StreamRunAgentPartsAgentsResponse200TextEventStreamResponseBodyData12DataMessageKind$inboundSchema;
9990
10290
 
9991
10291
  /** @internal */
9992
- export const StreamRunAgentFileAgentsResponse200FileInURIFormat$inboundSchema:
10292
+ export const StreamRunAgentFileAgentsResponse200TextEventStreamFileInURIFormat$inboundSchema:
9993
10293
  z.ZodType<
9994
- StreamRunAgentFileAgentsResponse200FileInURIFormat,
10294
+ StreamRunAgentFileAgentsResponse200TextEventStreamFileInURIFormat,
9995
10295
  z.ZodTypeDef,
9996
10296
  unknown
9997
10297
  > = z.object({
@@ -10000,54 +10300,53 @@ export const StreamRunAgentFileAgentsResponse200FileInURIFormat$inboundSchema:
10000
10300
  name: z.string().optional(),
10001
10301
  });
10002
10302
  /** @internal */
10003
- export type StreamRunAgentFileAgentsResponse200FileInURIFormat$Outbound = {
10004
- uri: string;
10005
- mimeType?: string | undefined;
10006
- name?: string | undefined;
10007
- };
10303
+ export type StreamRunAgentFileAgentsResponse200TextEventStreamFileInURIFormat$Outbound =
10304
+ {
10305
+ uri: string;
10306
+ mimeType?: string | undefined;
10307
+ name?: string | undefined;
10308
+ };
10008
10309
 
10009
10310
  /** @internal */
10010
- export const StreamRunAgentFileAgentsResponse200FileInURIFormat$outboundSchema:
10311
+ export const StreamRunAgentFileAgentsResponse200TextEventStreamFileInURIFormat$outboundSchema:
10011
10312
  z.ZodType<
10012
- StreamRunAgentFileAgentsResponse200FileInURIFormat$Outbound,
10313
+ StreamRunAgentFileAgentsResponse200TextEventStreamFileInURIFormat$Outbound,
10013
10314
  z.ZodTypeDef,
10014
- StreamRunAgentFileAgentsResponse200FileInURIFormat
10315
+ StreamRunAgentFileAgentsResponse200TextEventStreamFileInURIFormat
10015
10316
  > = z.object({
10016
10317
  uri: z.string(),
10017
10318
  mimeType: z.string().optional(),
10018
10319
  name: z.string().optional(),
10019
10320
  });
10020
10321
 
10021
- export function streamRunAgentFileAgentsResponse200FileInURIFormatToJSON(
10022
- streamRunAgentFileAgentsResponse200FileInURIFormat:
10023
- StreamRunAgentFileAgentsResponse200FileInURIFormat,
10322
+ export function streamRunAgentFileAgentsResponse200TextEventStreamFileInURIFormatToJSON(
10323
+ streamRunAgentFileAgentsResponse200TextEventStreamFileInURIFormat:
10324
+ StreamRunAgentFileAgentsResponse200TextEventStreamFileInURIFormat,
10024
10325
  ): string {
10025
10326
  return JSON.stringify(
10026
- StreamRunAgentFileAgentsResponse200FileInURIFormat$outboundSchema.parse(
10027
- streamRunAgentFileAgentsResponse200FileInURIFormat,
10028
- ),
10327
+ StreamRunAgentFileAgentsResponse200TextEventStreamFileInURIFormat$outboundSchema
10328
+ .parse(streamRunAgentFileAgentsResponse200TextEventStreamFileInURIFormat),
10029
10329
  );
10030
10330
  }
10031
- export function streamRunAgentFileAgentsResponse200FileInURIFormatFromJSON(
10331
+ export function streamRunAgentFileAgentsResponse200TextEventStreamFileInURIFormatFromJSON(
10032
10332
  jsonString: string,
10033
10333
  ): SafeParseResult<
10034
- StreamRunAgentFileAgentsResponse200FileInURIFormat,
10334
+ StreamRunAgentFileAgentsResponse200TextEventStreamFileInURIFormat,
10035
10335
  SDKValidationError
10036
10336
  > {
10037
10337
  return safeParse(
10038
10338
  jsonString,
10039
10339
  (x) =>
10040
- StreamRunAgentFileAgentsResponse200FileInURIFormat$inboundSchema.parse(
10041
- JSON.parse(x),
10042
- ),
10043
- `Failed to parse 'StreamRunAgentFileAgentsResponse200FileInURIFormat' from JSON`,
10340
+ StreamRunAgentFileAgentsResponse200TextEventStreamFileInURIFormat$inboundSchema
10341
+ .parse(JSON.parse(x)),
10342
+ `Failed to parse 'StreamRunAgentFileAgentsResponse200TextEventStreamFileInURIFormat' from JSON`,
10044
10343
  );
10045
10344
  }
10046
10345
 
10047
10346
  /** @internal */
10048
- export const StreamRunAgentFileAgentsResponse200BinaryFormat$inboundSchema:
10347
+ export const StreamRunAgentFileAgentsResponse200TextEventStreamBinaryFormat$inboundSchema:
10049
10348
  z.ZodType<
10050
- StreamRunAgentFileAgentsResponse200BinaryFormat,
10349
+ StreamRunAgentFileAgentsResponse200TextEventStreamBinaryFormat,
10051
10350
  z.ZodTypeDef,
10052
10351
  unknown
10053
10352
  > = z.object({
@@ -10056,166 +10355,178 @@ export const StreamRunAgentFileAgentsResponse200BinaryFormat$inboundSchema:
10056
10355
  name: z.string().optional(),
10057
10356
  });
10058
10357
  /** @internal */
10059
- export type StreamRunAgentFileAgentsResponse200BinaryFormat$Outbound = {
10060
- bytes: string;
10061
- mimeType?: string | undefined;
10062
- name?: string | undefined;
10063
- };
10358
+ export type StreamRunAgentFileAgentsResponse200TextEventStreamBinaryFormat$Outbound =
10359
+ {
10360
+ bytes: string;
10361
+ mimeType?: string | undefined;
10362
+ name?: string | undefined;
10363
+ };
10064
10364
 
10065
10365
  /** @internal */
10066
- export const StreamRunAgentFileAgentsResponse200BinaryFormat$outboundSchema:
10366
+ export const StreamRunAgentFileAgentsResponse200TextEventStreamBinaryFormat$outboundSchema:
10067
10367
  z.ZodType<
10068
- StreamRunAgentFileAgentsResponse200BinaryFormat$Outbound,
10368
+ StreamRunAgentFileAgentsResponse200TextEventStreamBinaryFormat$Outbound,
10069
10369
  z.ZodTypeDef,
10070
- StreamRunAgentFileAgentsResponse200BinaryFormat
10370
+ StreamRunAgentFileAgentsResponse200TextEventStreamBinaryFormat
10071
10371
  > = z.object({
10072
10372
  bytes: z.string(),
10073
10373
  mimeType: z.string().optional(),
10074
10374
  name: z.string().optional(),
10075
10375
  });
10076
10376
 
10077
- export function streamRunAgentFileAgentsResponse200BinaryFormatToJSON(
10078
- streamRunAgentFileAgentsResponse200BinaryFormat:
10079
- StreamRunAgentFileAgentsResponse200BinaryFormat,
10377
+ export function streamRunAgentFileAgentsResponse200TextEventStreamBinaryFormatToJSON(
10378
+ streamRunAgentFileAgentsResponse200TextEventStreamBinaryFormat:
10379
+ StreamRunAgentFileAgentsResponse200TextEventStreamBinaryFormat,
10080
10380
  ): string {
10081
10381
  return JSON.stringify(
10082
- StreamRunAgentFileAgentsResponse200BinaryFormat$outboundSchema.parse(
10083
- streamRunAgentFileAgentsResponse200BinaryFormat,
10084
- ),
10382
+ StreamRunAgentFileAgentsResponse200TextEventStreamBinaryFormat$outboundSchema
10383
+ .parse(streamRunAgentFileAgentsResponse200TextEventStreamBinaryFormat),
10085
10384
  );
10086
10385
  }
10087
- export function streamRunAgentFileAgentsResponse200BinaryFormatFromJSON(
10386
+ export function streamRunAgentFileAgentsResponse200TextEventStreamBinaryFormatFromJSON(
10088
10387
  jsonString: string,
10089
10388
  ): SafeParseResult<
10090
- StreamRunAgentFileAgentsResponse200BinaryFormat,
10389
+ StreamRunAgentFileAgentsResponse200TextEventStreamBinaryFormat,
10091
10390
  SDKValidationError
10092
10391
  > {
10093
10392
  return safeParse(
10094
10393
  jsonString,
10095
10394
  (x) =>
10096
- StreamRunAgentFileAgentsResponse200BinaryFormat$inboundSchema.parse(
10097
- JSON.parse(x),
10098
- ),
10099
- `Failed to parse 'StreamRunAgentFileAgentsResponse200BinaryFormat' from JSON`,
10395
+ StreamRunAgentFileAgentsResponse200TextEventStreamBinaryFormat$inboundSchema
10396
+ .parse(JSON.parse(x)),
10397
+ `Failed to parse 'StreamRunAgentFileAgentsResponse200TextEventStreamBinaryFormat' from JSON`,
10100
10398
  );
10101
10399
  }
10102
10400
 
10103
10401
  /** @internal */
10104
- export const StreamRunAgentPartsAgentsResponseFile$inboundSchema: z.ZodType<
10105
- StreamRunAgentPartsAgentsResponseFile,
10402
+ export const StreamRunAgentPartsAgentsResponse200File$inboundSchema: z.ZodType<
10403
+ StreamRunAgentPartsAgentsResponse200File,
10106
10404
  z.ZodTypeDef,
10107
10405
  unknown
10108
10406
  > = z.union([
10109
- z.lazy(() => StreamRunAgentFileAgentsResponse200BinaryFormat$inboundSchema),
10110
10407
  z.lazy(() =>
10111
- StreamRunAgentFileAgentsResponse200FileInURIFormat$inboundSchema
10408
+ StreamRunAgentFileAgentsResponse200TextEventStreamBinaryFormat$inboundSchema
10409
+ ),
10410
+ z.lazy(() =>
10411
+ StreamRunAgentFileAgentsResponse200TextEventStreamFileInURIFormat$inboundSchema
10112
10412
  ),
10113
10413
  ]);
10114
10414
  /** @internal */
10115
- export type StreamRunAgentPartsAgentsResponseFile$Outbound =
10116
- | StreamRunAgentFileAgentsResponse200BinaryFormat$Outbound
10117
- | StreamRunAgentFileAgentsResponse200FileInURIFormat$Outbound;
10415
+ export type StreamRunAgentPartsAgentsResponse200File$Outbound =
10416
+ | StreamRunAgentFileAgentsResponse200TextEventStreamBinaryFormat$Outbound
10417
+ | StreamRunAgentFileAgentsResponse200TextEventStreamFileInURIFormat$Outbound;
10118
10418
 
10119
10419
  /** @internal */
10120
- export const StreamRunAgentPartsAgentsResponseFile$outboundSchema: z.ZodType<
10121
- StreamRunAgentPartsAgentsResponseFile$Outbound,
10420
+ export const StreamRunAgentPartsAgentsResponse200File$outboundSchema: z.ZodType<
10421
+ StreamRunAgentPartsAgentsResponse200File$Outbound,
10122
10422
  z.ZodTypeDef,
10123
- StreamRunAgentPartsAgentsResponseFile
10423
+ StreamRunAgentPartsAgentsResponse200File
10124
10424
  > = z.union([
10125
- z.lazy(() => StreamRunAgentFileAgentsResponse200BinaryFormat$outboundSchema),
10126
10425
  z.lazy(() =>
10127
- StreamRunAgentFileAgentsResponse200FileInURIFormat$outboundSchema
10426
+ StreamRunAgentFileAgentsResponse200TextEventStreamBinaryFormat$outboundSchema
10427
+ ),
10428
+ z.lazy(() =>
10429
+ StreamRunAgentFileAgentsResponse200TextEventStreamFileInURIFormat$outboundSchema
10128
10430
  ),
10129
10431
  ]);
10130
10432
 
10131
- export function streamRunAgentPartsAgentsResponseFileToJSON(
10132
- streamRunAgentPartsAgentsResponseFile: StreamRunAgentPartsAgentsResponseFile,
10433
+ export function streamRunAgentPartsAgentsResponse200FileToJSON(
10434
+ streamRunAgentPartsAgentsResponse200File:
10435
+ StreamRunAgentPartsAgentsResponse200File,
10133
10436
  ): string {
10134
10437
  return JSON.stringify(
10135
- StreamRunAgentPartsAgentsResponseFile$outboundSchema.parse(
10136
- streamRunAgentPartsAgentsResponseFile,
10438
+ StreamRunAgentPartsAgentsResponse200File$outboundSchema.parse(
10439
+ streamRunAgentPartsAgentsResponse200File,
10137
10440
  ),
10138
10441
  );
10139
10442
  }
10140
- export function streamRunAgentPartsAgentsResponseFileFromJSON(
10443
+ export function streamRunAgentPartsAgentsResponse200FileFromJSON(
10141
10444
  jsonString: string,
10142
- ): SafeParseResult<StreamRunAgentPartsAgentsResponseFile, SDKValidationError> {
10445
+ ): SafeParseResult<
10446
+ StreamRunAgentPartsAgentsResponse200File,
10447
+ SDKValidationError
10448
+ > {
10143
10449
  return safeParse(
10144
10450
  jsonString,
10145
10451
  (x) =>
10146
- StreamRunAgentPartsAgentsResponseFile$inboundSchema.parse(JSON.parse(x)),
10147
- `Failed to parse 'StreamRunAgentPartsAgentsResponseFile' from JSON`,
10452
+ StreamRunAgentPartsAgentsResponse200File$inboundSchema.parse(
10453
+ JSON.parse(x),
10454
+ ),
10455
+ `Failed to parse 'StreamRunAgentPartsAgentsResponse200File' from JSON`,
10148
10456
  );
10149
10457
  }
10150
10458
 
10151
10459
  /** @internal */
10152
- export const StreamRunAgentPartsAgentsResponseFilePart$inboundSchema: z.ZodType<
10153
- StreamRunAgentPartsAgentsResponseFilePart,
10154
- z.ZodTypeDef,
10155
- unknown
10156
- > = z.object({
10157
- kind:
10158
- StreamRunAgentPartsAgentsResponse200TextEventStreamResponseBodyData12DataMessageKind$inboundSchema,
10159
- file: z.union([
10160
- z.lazy(() => StreamRunAgentFileAgentsResponse200BinaryFormat$inboundSchema),
10161
- z.lazy(() =>
10162
- StreamRunAgentFileAgentsResponse200FileInURIFormat$inboundSchema
10163
- ),
10164
- ]),
10165
- metadata: z.record(z.any()).optional(),
10166
- });
10460
+ export const StreamRunAgentPartsAgentsResponse200FilePart$inboundSchema:
10461
+ z.ZodType<
10462
+ StreamRunAgentPartsAgentsResponse200FilePart,
10463
+ z.ZodTypeDef,
10464
+ unknown
10465
+ > = z.object({
10466
+ kind:
10467
+ StreamRunAgentPartsAgentsResponse200TextEventStreamResponseBodyData12DataMessageKind$inboundSchema,
10468
+ file: z.union([
10469
+ z.lazy(() =>
10470
+ StreamRunAgentFileAgentsResponse200TextEventStreamBinaryFormat$inboundSchema
10471
+ ),
10472
+ z.lazy(() =>
10473
+ StreamRunAgentFileAgentsResponse200TextEventStreamFileInURIFormat$inboundSchema
10474
+ ),
10475
+ ]),
10476
+ metadata: z.record(z.any()).optional(),
10477
+ });
10167
10478
  /** @internal */
10168
- export type StreamRunAgentPartsAgentsResponseFilePart$Outbound = {
10479
+ export type StreamRunAgentPartsAgentsResponse200FilePart$Outbound = {
10169
10480
  kind: string;
10170
10481
  file:
10171
- | StreamRunAgentFileAgentsResponse200BinaryFormat$Outbound
10172
- | StreamRunAgentFileAgentsResponse200FileInURIFormat$Outbound;
10482
+ | StreamRunAgentFileAgentsResponse200TextEventStreamBinaryFormat$Outbound
10483
+ | StreamRunAgentFileAgentsResponse200TextEventStreamFileInURIFormat$Outbound;
10173
10484
  metadata?: { [k: string]: any } | undefined;
10174
10485
  };
10175
10486
 
10176
10487
  /** @internal */
10177
- export const StreamRunAgentPartsAgentsResponseFilePart$outboundSchema:
10488
+ export const StreamRunAgentPartsAgentsResponse200FilePart$outboundSchema:
10178
10489
  z.ZodType<
10179
- StreamRunAgentPartsAgentsResponseFilePart$Outbound,
10490
+ StreamRunAgentPartsAgentsResponse200FilePart$Outbound,
10180
10491
  z.ZodTypeDef,
10181
- StreamRunAgentPartsAgentsResponseFilePart
10492
+ StreamRunAgentPartsAgentsResponse200FilePart
10182
10493
  > = z.object({
10183
10494
  kind:
10184
10495
  StreamRunAgentPartsAgentsResponse200TextEventStreamResponseBodyData12DataMessageKind$outboundSchema,
10185
10496
  file: z.union([
10186
10497
  z.lazy(() =>
10187
- StreamRunAgentFileAgentsResponse200BinaryFormat$outboundSchema
10498
+ StreamRunAgentFileAgentsResponse200TextEventStreamBinaryFormat$outboundSchema
10188
10499
  ),
10189
10500
  z.lazy(() =>
10190
- StreamRunAgentFileAgentsResponse200FileInURIFormat$outboundSchema
10501
+ StreamRunAgentFileAgentsResponse200TextEventStreamFileInURIFormat$outboundSchema
10191
10502
  ),
10192
10503
  ]),
10193
10504
  metadata: z.record(z.any()).optional(),
10194
10505
  });
10195
10506
 
10196
- export function streamRunAgentPartsAgentsResponseFilePartToJSON(
10197
- streamRunAgentPartsAgentsResponseFilePart:
10198
- StreamRunAgentPartsAgentsResponseFilePart,
10507
+ export function streamRunAgentPartsAgentsResponse200FilePartToJSON(
10508
+ streamRunAgentPartsAgentsResponse200FilePart:
10509
+ StreamRunAgentPartsAgentsResponse200FilePart,
10199
10510
  ): string {
10200
10511
  return JSON.stringify(
10201
- StreamRunAgentPartsAgentsResponseFilePart$outboundSchema.parse(
10202
- streamRunAgentPartsAgentsResponseFilePart,
10512
+ StreamRunAgentPartsAgentsResponse200FilePart$outboundSchema.parse(
10513
+ streamRunAgentPartsAgentsResponse200FilePart,
10203
10514
  ),
10204
10515
  );
10205
10516
  }
10206
- export function streamRunAgentPartsAgentsResponseFilePartFromJSON(
10517
+ export function streamRunAgentPartsAgentsResponse200FilePartFromJSON(
10207
10518
  jsonString: string,
10208
10519
  ): SafeParseResult<
10209
- StreamRunAgentPartsAgentsResponseFilePart,
10520
+ StreamRunAgentPartsAgentsResponse200FilePart,
10210
10521
  SDKValidationError
10211
10522
  > {
10212
10523
  return safeParse(
10213
10524
  jsonString,
10214
10525
  (x) =>
10215
- StreamRunAgentPartsAgentsResponseFilePart$inboundSchema.parse(
10526
+ StreamRunAgentPartsAgentsResponse200FilePart$inboundSchema.parse(
10216
10527
  JSON.parse(x),
10217
10528
  ),
10218
- `Failed to parse 'StreamRunAgentPartsAgentsResponseFilePart' from JSON`,
10529
+ `Failed to parse 'StreamRunAgentPartsAgentsResponse200FilePart' from JSON`,
10219
10530
  );
10220
10531
  }
10221
10532
 
@@ -10234,29 +10545,30 @@ export const StreamRunAgentPartsAgentsResponse200TextEventStreamResponseBodyData
10234
10545
  StreamRunAgentPartsAgentsResponse200TextEventStreamResponseBodyData12DataKind$inboundSchema;
10235
10546
 
10236
10547
  /** @internal */
10237
- export const StreamRunAgentPartsAgentsResponseDataPart$inboundSchema: z.ZodType<
10238
- StreamRunAgentPartsAgentsResponseDataPart,
10239
- z.ZodTypeDef,
10240
- unknown
10241
- > = z.object({
10242
- kind:
10243
- StreamRunAgentPartsAgentsResponse200TextEventStreamResponseBodyData12DataKind$inboundSchema,
10244
- data: z.record(z.any()),
10245
- metadata: z.record(z.any()).optional(),
10246
- });
10548
+ export const StreamRunAgentPartsAgentsResponse200DataPart$inboundSchema:
10549
+ z.ZodType<
10550
+ StreamRunAgentPartsAgentsResponse200DataPart,
10551
+ z.ZodTypeDef,
10552
+ unknown
10553
+ > = z.object({
10554
+ kind:
10555
+ StreamRunAgentPartsAgentsResponse200TextEventStreamResponseBodyData12DataKind$inboundSchema,
10556
+ data: z.record(z.any()),
10557
+ metadata: z.record(z.any()).optional(),
10558
+ });
10247
10559
  /** @internal */
10248
- export type StreamRunAgentPartsAgentsResponseDataPart$Outbound = {
10560
+ export type StreamRunAgentPartsAgentsResponse200DataPart$Outbound = {
10249
10561
  kind: string;
10250
10562
  data: { [k: string]: any };
10251
10563
  metadata?: { [k: string]: any } | undefined;
10252
10564
  };
10253
10565
 
10254
10566
  /** @internal */
10255
- export const StreamRunAgentPartsAgentsResponseDataPart$outboundSchema:
10567
+ export const StreamRunAgentPartsAgentsResponse200DataPart$outboundSchema:
10256
10568
  z.ZodType<
10257
- StreamRunAgentPartsAgentsResponseDataPart$Outbound,
10569
+ StreamRunAgentPartsAgentsResponse200DataPart$Outbound,
10258
10570
  z.ZodTypeDef,
10259
- StreamRunAgentPartsAgentsResponseDataPart
10571
+ StreamRunAgentPartsAgentsResponse200DataPart
10260
10572
  > = z.object({
10261
10573
  kind:
10262
10574
  StreamRunAgentPartsAgentsResponse200TextEventStreamResponseBodyData12DataKind$outboundSchema,
@@ -10264,29 +10576,29 @@ export const StreamRunAgentPartsAgentsResponseDataPart$outboundSchema:
10264
10576
  metadata: z.record(z.any()).optional(),
10265
10577
  });
10266
10578
 
10267
- export function streamRunAgentPartsAgentsResponseDataPartToJSON(
10268
- streamRunAgentPartsAgentsResponseDataPart:
10269
- StreamRunAgentPartsAgentsResponseDataPart,
10579
+ export function streamRunAgentPartsAgentsResponse200DataPartToJSON(
10580
+ streamRunAgentPartsAgentsResponse200DataPart:
10581
+ StreamRunAgentPartsAgentsResponse200DataPart,
10270
10582
  ): string {
10271
10583
  return JSON.stringify(
10272
- StreamRunAgentPartsAgentsResponseDataPart$outboundSchema.parse(
10273
- streamRunAgentPartsAgentsResponseDataPart,
10584
+ StreamRunAgentPartsAgentsResponse200DataPart$outboundSchema.parse(
10585
+ streamRunAgentPartsAgentsResponse200DataPart,
10274
10586
  ),
10275
10587
  );
10276
10588
  }
10277
- export function streamRunAgentPartsAgentsResponseDataPartFromJSON(
10589
+ export function streamRunAgentPartsAgentsResponse200DataPartFromJSON(
10278
10590
  jsonString: string,
10279
10591
  ): SafeParseResult<
10280
- StreamRunAgentPartsAgentsResponseDataPart,
10592
+ StreamRunAgentPartsAgentsResponse200DataPart,
10281
10593
  SDKValidationError
10282
10594
  > {
10283
10595
  return safeParse(
10284
10596
  jsonString,
10285
10597
  (x) =>
10286
- StreamRunAgentPartsAgentsResponseDataPart$inboundSchema.parse(
10598
+ StreamRunAgentPartsAgentsResponse200DataPart$inboundSchema.parse(
10287
10599
  JSON.parse(x),
10288
10600
  ),
10289
- `Failed to parse 'StreamRunAgentPartsAgentsResponseDataPart' from JSON`,
10601
+ `Failed to parse 'StreamRunAgentPartsAgentsResponse200DataPart' from JSON`,
10290
10602
  );
10291
10603
  }
10292
10604
 
@@ -10305,108 +10617,114 @@ export const StreamRunAgentPartsAgentsResponse200TextEventStreamResponseBodyData
10305
10617
  StreamRunAgentPartsAgentsResponse200TextEventStreamResponseBodyData12Kind$inboundSchema;
10306
10618
 
10307
10619
  /** @internal */
10308
- export const StreamRunAgentPartsAgentsResponseTextPart$inboundSchema: z.ZodType<
10309
- StreamRunAgentPartsAgentsResponseTextPart,
10310
- z.ZodTypeDef,
10311
- unknown
10312
- > = z.object({
10313
- kind:
10314
- StreamRunAgentPartsAgentsResponse200TextEventStreamResponseBodyData12Kind$inboundSchema,
10315
- text: z.string(),
10316
- });
10620
+ export const StreamRunAgentPartsAgentsResponse200TextPart$inboundSchema:
10621
+ z.ZodType<
10622
+ StreamRunAgentPartsAgentsResponse200TextPart,
10623
+ z.ZodTypeDef,
10624
+ unknown
10625
+ > = z.object({
10626
+ kind:
10627
+ StreamRunAgentPartsAgentsResponse200TextEventStreamResponseBodyData12Kind$inboundSchema,
10628
+ text: z.string(),
10629
+ });
10317
10630
  /** @internal */
10318
- export type StreamRunAgentPartsAgentsResponseTextPart$Outbound = {
10631
+ export type StreamRunAgentPartsAgentsResponse200TextPart$Outbound = {
10319
10632
  kind: string;
10320
10633
  text: string;
10321
10634
  };
10322
10635
 
10323
10636
  /** @internal */
10324
- export const StreamRunAgentPartsAgentsResponseTextPart$outboundSchema:
10637
+ export const StreamRunAgentPartsAgentsResponse200TextPart$outboundSchema:
10325
10638
  z.ZodType<
10326
- StreamRunAgentPartsAgentsResponseTextPart$Outbound,
10639
+ StreamRunAgentPartsAgentsResponse200TextPart$Outbound,
10327
10640
  z.ZodTypeDef,
10328
- StreamRunAgentPartsAgentsResponseTextPart
10641
+ StreamRunAgentPartsAgentsResponse200TextPart
10329
10642
  > = z.object({
10330
10643
  kind:
10331
10644
  StreamRunAgentPartsAgentsResponse200TextEventStreamResponseBodyData12Kind$outboundSchema,
10332
10645
  text: z.string(),
10333
10646
  });
10334
10647
 
10335
- export function streamRunAgentPartsAgentsResponseTextPartToJSON(
10336
- streamRunAgentPartsAgentsResponseTextPart:
10337
- StreamRunAgentPartsAgentsResponseTextPart,
10648
+ export function streamRunAgentPartsAgentsResponse200TextPartToJSON(
10649
+ streamRunAgentPartsAgentsResponse200TextPart:
10650
+ StreamRunAgentPartsAgentsResponse200TextPart,
10338
10651
  ): string {
10339
10652
  return JSON.stringify(
10340
- StreamRunAgentPartsAgentsResponseTextPart$outboundSchema.parse(
10341
- streamRunAgentPartsAgentsResponseTextPart,
10653
+ StreamRunAgentPartsAgentsResponse200TextPart$outboundSchema.parse(
10654
+ streamRunAgentPartsAgentsResponse200TextPart,
10342
10655
  ),
10343
10656
  );
10344
10657
  }
10345
- export function streamRunAgentPartsAgentsResponseTextPartFromJSON(
10658
+ export function streamRunAgentPartsAgentsResponse200TextPartFromJSON(
10346
10659
  jsonString: string,
10347
10660
  ): SafeParseResult<
10348
- StreamRunAgentPartsAgentsResponseTextPart,
10661
+ StreamRunAgentPartsAgentsResponse200TextPart,
10349
10662
  SDKValidationError
10350
10663
  > {
10351
10664
  return safeParse(
10352
10665
  jsonString,
10353
10666
  (x) =>
10354
- StreamRunAgentPartsAgentsResponseTextPart$inboundSchema.parse(
10667
+ StreamRunAgentPartsAgentsResponse200TextPart$inboundSchema.parse(
10355
10668
  JSON.parse(x),
10356
10669
  ),
10357
- `Failed to parse 'StreamRunAgentPartsAgentsResponseTextPart' from JSON`,
10670
+ `Failed to parse 'StreamRunAgentPartsAgentsResponse200TextPart' from JSON`,
10358
10671
  );
10359
10672
  }
10360
10673
 
10361
10674
  /** @internal */
10362
- export const StreamRunAgentDataAgentsParts$inboundSchema: z.ZodType<
10363
- StreamRunAgentDataAgentsParts,
10675
+ export const StreamRunAgentDataAgentsResponseParts$inboundSchema: z.ZodType<
10676
+ StreamRunAgentDataAgentsResponseParts,
10364
10677
  z.ZodTypeDef,
10365
10678
  unknown
10366
10679
  > = z.union([
10367
- z.lazy(() => StreamRunAgentPartsAgentsResponseToolCallPart$inboundSchema),
10368
- z.lazy(() => StreamRunAgentPartsAgentsResponseTextPart$inboundSchema),
10369
- z.lazy(() => StreamRunAgentPartsAgentsResponseDataPart$inboundSchema),
10370
- z.lazy(() => StreamRunAgentPartsAgentsResponseFilePart$inboundSchema),
10371
- z.lazy(() => StreamRunAgentPartsAgentsResponseToolResultPart$inboundSchema),
10680
+ z.lazy(() => StreamRunAgentPartsAgentsResponse200ToolCallPart$inboundSchema),
10681
+ z.lazy(() => StreamRunAgentPartsAgentsResponse200TextPart$inboundSchema),
10682
+ z.lazy(() => StreamRunAgentPartsAgentsResponse200DataPart$inboundSchema),
10683
+ z.lazy(() => StreamRunAgentPartsAgentsResponse200FilePart$inboundSchema),
10684
+ z.lazy(() =>
10685
+ StreamRunAgentPartsAgentsResponse200ToolResultPart$inboundSchema
10686
+ ),
10372
10687
  ]);
10373
10688
  /** @internal */
10374
- export type StreamRunAgentDataAgentsParts$Outbound =
10375
- | StreamRunAgentPartsAgentsResponseToolCallPart$Outbound
10376
- | StreamRunAgentPartsAgentsResponseTextPart$Outbound
10377
- | StreamRunAgentPartsAgentsResponseDataPart$Outbound
10378
- | StreamRunAgentPartsAgentsResponseFilePart$Outbound
10379
- | StreamRunAgentPartsAgentsResponseToolResultPart$Outbound;
10689
+ export type StreamRunAgentDataAgentsResponseParts$Outbound =
10690
+ | StreamRunAgentPartsAgentsResponse200ToolCallPart$Outbound
10691
+ | StreamRunAgentPartsAgentsResponse200TextPart$Outbound
10692
+ | StreamRunAgentPartsAgentsResponse200DataPart$Outbound
10693
+ | StreamRunAgentPartsAgentsResponse200FilePart$Outbound
10694
+ | StreamRunAgentPartsAgentsResponse200ToolResultPart$Outbound;
10380
10695
 
10381
10696
  /** @internal */
10382
- export const StreamRunAgentDataAgentsParts$outboundSchema: z.ZodType<
10383
- StreamRunAgentDataAgentsParts$Outbound,
10697
+ export const StreamRunAgentDataAgentsResponseParts$outboundSchema: z.ZodType<
10698
+ StreamRunAgentDataAgentsResponseParts$Outbound,
10384
10699
  z.ZodTypeDef,
10385
- StreamRunAgentDataAgentsParts
10700
+ StreamRunAgentDataAgentsResponseParts
10386
10701
  > = z.union([
10387
- z.lazy(() => StreamRunAgentPartsAgentsResponseToolCallPart$outboundSchema),
10388
- z.lazy(() => StreamRunAgentPartsAgentsResponseTextPart$outboundSchema),
10389
- z.lazy(() => StreamRunAgentPartsAgentsResponseDataPart$outboundSchema),
10390
- z.lazy(() => StreamRunAgentPartsAgentsResponseFilePart$outboundSchema),
10391
- z.lazy(() => StreamRunAgentPartsAgentsResponseToolResultPart$outboundSchema),
10702
+ z.lazy(() => StreamRunAgentPartsAgentsResponse200ToolCallPart$outboundSchema),
10703
+ z.lazy(() => StreamRunAgentPartsAgentsResponse200TextPart$outboundSchema),
10704
+ z.lazy(() => StreamRunAgentPartsAgentsResponse200DataPart$outboundSchema),
10705
+ z.lazy(() => StreamRunAgentPartsAgentsResponse200FilePart$outboundSchema),
10706
+ z.lazy(() =>
10707
+ StreamRunAgentPartsAgentsResponse200ToolResultPart$outboundSchema
10708
+ ),
10392
10709
  ]);
10393
10710
 
10394
- export function streamRunAgentDataAgentsPartsToJSON(
10395
- streamRunAgentDataAgentsParts: StreamRunAgentDataAgentsParts,
10711
+ export function streamRunAgentDataAgentsResponsePartsToJSON(
10712
+ streamRunAgentDataAgentsResponseParts: StreamRunAgentDataAgentsResponseParts,
10396
10713
  ): string {
10397
10714
  return JSON.stringify(
10398
- StreamRunAgentDataAgentsParts$outboundSchema.parse(
10399
- streamRunAgentDataAgentsParts,
10715
+ StreamRunAgentDataAgentsResponseParts$outboundSchema.parse(
10716
+ streamRunAgentDataAgentsResponseParts,
10400
10717
  ),
10401
10718
  );
10402
10719
  }
10403
- export function streamRunAgentDataAgentsPartsFromJSON(
10720
+ export function streamRunAgentDataAgentsResponsePartsFromJSON(
10404
10721
  jsonString: string,
10405
- ): SafeParseResult<StreamRunAgentDataAgentsParts, SDKValidationError> {
10722
+ ): SafeParseResult<StreamRunAgentDataAgentsResponseParts, SDKValidationError> {
10406
10723
  return safeParse(
10407
10724
  jsonString,
10408
- (x) => StreamRunAgentDataAgentsParts$inboundSchema.parse(JSON.parse(x)),
10409
- `Failed to parse 'StreamRunAgentDataAgentsParts' from JSON`,
10725
+ (x) =>
10726
+ StreamRunAgentDataAgentsResponseParts$inboundSchema.parse(JSON.parse(x)),
10727
+ `Failed to parse 'StreamRunAgentDataAgentsResponseParts' from JSON`,
10410
10728
  );
10411
10729
  }
10412
10730
 
@@ -10417,15 +10735,17 @@ export const DataMessage$inboundSchema: z.ZodType<
10417
10735
  unknown
10418
10736
  > = z.object({
10419
10737
  messageId: z.string().optional(),
10420
- role: StreamRunAgentDataAgentsRole$inboundSchema,
10738
+ role: StreamRunAgentDataAgentsResponseRole$inboundSchema,
10421
10739
  parts: z.array(
10422
10740
  z.union([
10423
- z.lazy(() => StreamRunAgentPartsAgentsResponseToolCallPart$inboundSchema),
10424
- z.lazy(() => StreamRunAgentPartsAgentsResponseTextPart$inboundSchema),
10425
- z.lazy(() => StreamRunAgentPartsAgentsResponseDataPart$inboundSchema),
10426
- z.lazy(() => StreamRunAgentPartsAgentsResponseFilePart$inboundSchema),
10427
10741
  z.lazy(() =>
10428
- StreamRunAgentPartsAgentsResponseToolResultPart$inboundSchema
10742
+ StreamRunAgentPartsAgentsResponse200ToolCallPart$inboundSchema
10743
+ ),
10744
+ z.lazy(() => StreamRunAgentPartsAgentsResponse200TextPart$inboundSchema),
10745
+ z.lazy(() => StreamRunAgentPartsAgentsResponse200DataPart$inboundSchema),
10746
+ z.lazy(() => StreamRunAgentPartsAgentsResponse200FilePart$inboundSchema),
10747
+ z.lazy(() =>
10748
+ StreamRunAgentPartsAgentsResponse200ToolResultPart$inboundSchema
10429
10749
  ),
10430
10750
  ]),
10431
10751
  ),
@@ -10436,11 +10756,11 @@ export type DataMessage$Outbound = {
10436
10756
  messageId?: string | undefined;
10437
10757
  role: string;
10438
10758
  parts: Array<
10439
- | StreamRunAgentPartsAgentsResponseToolCallPart$Outbound
10440
- | StreamRunAgentPartsAgentsResponseTextPart$Outbound
10441
- | StreamRunAgentPartsAgentsResponseDataPart$Outbound
10442
- | StreamRunAgentPartsAgentsResponseFilePart$Outbound
10443
- | StreamRunAgentPartsAgentsResponseToolResultPart$Outbound
10759
+ | StreamRunAgentPartsAgentsResponse200ToolCallPart$Outbound
10760
+ | StreamRunAgentPartsAgentsResponse200TextPart$Outbound
10761
+ | StreamRunAgentPartsAgentsResponse200DataPart$Outbound
10762
+ | StreamRunAgentPartsAgentsResponse200FilePart$Outbound
10763
+ | StreamRunAgentPartsAgentsResponse200ToolResultPart$Outbound
10444
10764
  >;
10445
10765
  metadata?: { [k: string]: any } | undefined;
10446
10766
  };
@@ -10452,17 +10772,19 @@ export const DataMessage$outboundSchema: z.ZodType<
10452
10772
  DataMessage
10453
10773
  > = z.object({
10454
10774
  messageId: z.string().optional(),
10455
- role: StreamRunAgentDataAgentsRole$outboundSchema,
10775
+ role: StreamRunAgentDataAgentsResponseRole$outboundSchema,
10456
10776
  parts: z.array(
10457
10777
  z.union([
10458
10778
  z.lazy(() =>
10459
- StreamRunAgentPartsAgentsResponseToolCallPart$outboundSchema
10779
+ StreamRunAgentPartsAgentsResponse200ToolCallPart$outboundSchema
10460
10780
  ),
10461
- z.lazy(() => StreamRunAgentPartsAgentsResponseTextPart$outboundSchema),
10462
- z.lazy(() => StreamRunAgentPartsAgentsResponseDataPart$outboundSchema),
10463
- z.lazy(() => StreamRunAgentPartsAgentsResponseFilePart$outboundSchema),
10781
+ z.lazy(() => StreamRunAgentPartsAgentsResponse200TextPart$outboundSchema),
10782
+ z.lazy(() => StreamRunAgentPartsAgentsResponse200DataPart$outboundSchema),
10464
10783
  z.lazy(() =>
10465
- StreamRunAgentPartsAgentsResponseToolResultPart$outboundSchema
10784
+ StreamRunAgentPartsAgentsResponse200FilePart$outboundSchema
10785
+ ),
10786
+ z.lazy(() =>
10787
+ StreamRunAgentPartsAgentsResponse200ToolResultPart$outboundSchema
10466
10788
  ),
10467
10789
  ]),
10468
10790
  ),
@@ -11331,6 +11653,7 @@ export const StreamRunAgentDataAgentsResponse200TextEventStreamData$inboundSchem
11331
11653
  tool: z.lazy(() => StreamRunAgentDataTool$inboundSchema),
11332
11654
  input: z.record(z.any()),
11333
11655
  agent_tool_call_id: z.string(),
11656
+ responseId: z.string().optional(),
11334
11657
  }).transform((v) => {
11335
11658
  return remap$(v, {
11336
11659
  "agent_id": "agentId",
@@ -11347,6 +11670,7 @@ export type StreamRunAgentDataAgentsResponse200TextEventStreamData$Outbound = {
11347
11670
  tool: StreamRunAgentDataTool$Outbound;
11348
11671
  input: { [k: string]: any };
11349
11672
  agent_tool_call_id: string;
11673
+ responseId?: string | undefined;
11350
11674
  };
11351
11675
 
11352
11676
  /** @internal */
@@ -11362,6 +11686,7 @@ export const StreamRunAgentDataAgentsResponse200TextEventStreamData$outboundSche
11362
11686
  tool: z.lazy(() => StreamRunAgentDataTool$outboundSchema),
11363
11687
  input: z.record(z.any()),
11364
11688
  agentToolCallId: z.string(),
11689
+ responseId: z.string().optional(),
11365
11690
  }).transform((v) => {
11366
11691
  return remap$(v, {
11367
11692
  agentId: "agent_id",
@@ -11466,11 +11791,13 @@ export const StreamRunAgentDataAgentsResponse200Data$inboundSchema: z.ZodType<
11466
11791
  > = z.object({
11467
11792
  error: z.string(),
11468
11793
  code: z.number(),
11794
+ responseId: z.string().optional(),
11469
11795
  });
11470
11796
  /** @internal */
11471
11797
  export type StreamRunAgentDataAgentsResponse200Data$Outbound = {
11472
11798
  error: string;
11473
11799
  code: number;
11800
+ responseId?: string | undefined;
11474
11801
  };
11475
11802
 
11476
11803
  /** @internal */
@@ -11481,6 +11808,7 @@ export const StreamRunAgentDataAgentsResponse200Data$outboundSchema: z.ZodType<
11481
11808
  > = z.object({
11482
11809
  error: z.string(),
11483
11810
  code: z.number(),
11811
+ responseId: z.string().optional(),
11484
11812
  });
11485
11813
 
11486
11814
  export function streamRunAgentDataAgentsResponse200DataToJSON(
@@ -11527,42 +11855,732 @@ export type StreamRunAgentData5$Outbound = {
11527
11855
  };
11528
11856
 
11529
11857
  /** @internal */
11530
- export const StreamRunAgentData5$outboundSchema: z.ZodType<
11531
- StreamRunAgentData5$Outbound,
11858
+ export const StreamRunAgentData5$outboundSchema: z.ZodType<
11859
+ StreamRunAgentData5$Outbound,
11860
+ z.ZodTypeDef,
11861
+ StreamRunAgentData5
11862
+ > = z.object({
11863
+ type: StreamRunAgentDataAgentsResponse200TextEventStreamType$outboundSchema,
11864
+ timestamp: z.string(),
11865
+ data: z.lazy(() => StreamRunAgentDataAgentsResponse200Data$outboundSchema),
11866
+ });
11867
+
11868
+ export function streamRunAgentData5ToJSON(
11869
+ streamRunAgentData5: StreamRunAgentData5,
11870
+ ): string {
11871
+ return JSON.stringify(
11872
+ StreamRunAgentData5$outboundSchema.parse(streamRunAgentData5),
11873
+ );
11874
+ }
11875
+ export function streamRunAgentData5FromJSON(
11876
+ jsonString: string,
11877
+ ): SafeParseResult<StreamRunAgentData5, SDKValidationError> {
11878
+ return safeParse(
11879
+ jsonString,
11880
+ (x) => StreamRunAgentData5$inboundSchema.parse(JSON.parse(x)),
11881
+ `Failed to parse 'StreamRunAgentData5' from JSON`,
11882
+ );
11883
+ }
11884
+
11885
+ /** @internal */
11886
+ export const StreamRunAgentDataAgentsResponse200Type$inboundSchema:
11887
+ z.ZodNativeEnum<typeof StreamRunAgentDataAgentsResponse200Type> = z
11888
+ .nativeEnum(StreamRunAgentDataAgentsResponse200Type);
11889
+ /** @internal */
11890
+ export const StreamRunAgentDataAgentsResponse200Type$outboundSchema:
11891
+ z.ZodNativeEnum<typeof StreamRunAgentDataAgentsResponse200Type> =
11892
+ StreamRunAgentDataAgentsResponse200Type$inboundSchema;
11893
+
11894
+ /** @internal */
11895
+ export const StreamRunAgentDataAgentsRole$inboundSchema: z.ZodNativeEnum<
11896
+ typeof StreamRunAgentDataAgentsRole
11897
+ > = z.nativeEnum(StreamRunAgentDataAgentsRole);
11898
+ /** @internal */
11899
+ export const StreamRunAgentDataAgentsRole$outboundSchema: z.ZodNativeEnum<
11900
+ typeof StreamRunAgentDataAgentsRole
11901
+ > = StreamRunAgentDataAgentsRole$inboundSchema;
11902
+
11903
+ /** @internal */
11904
+ export const StreamRunAgentPartsAgentsResponse200TextEventStreamResponseBodyData4DataLastMessageFull5Kind$inboundSchema:
11905
+ z.ZodNativeEnum<
11906
+ typeof StreamRunAgentPartsAgentsResponse200TextEventStreamResponseBodyData4DataLastMessageFull5Kind
11907
+ > = z.nativeEnum(
11908
+ StreamRunAgentPartsAgentsResponse200TextEventStreamResponseBodyData4DataLastMessageFull5Kind,
11909
+ );
11910
+ /** @internal */
11911
+ export const StreamRunAgentPartsAgentsResponse200TextEventStreamResponseBodyData4DataLastMessageFull5Kind$outboundSchema:
11912
+ z.ZodNativeEnum<
11913
+ typeof StreamRunAgentPartsAgentsResponse200TextEventStreamResponseBodyData4DataLastMessageFull5Kind
11914
+ > =
11915
+ StreamRunAgentPartsAgentsResponse200TextEventStreamResponseBodyData4DataLastMessageFull5Kind$inboundSchema;
11916
+
11917
+ /** @internal */
11918
+ export const StreamRunAgentPartsAgentsResponseToolResultPart$inboundSchema:
11919
+ z.ZodType<
11920
+ StreamRunAgentPartsAgentsResponseToolResultPart,
11921
+ z.ZodTypeDef,
11922
+ unknown
11923
+ > = z.object({
11924
+ kind:
11925
+ StreamRunAgentPartsAgentsResponse200TextEventStreamResponseBodyData4DataLastMessageFull5Kind$inboundSchema,
11926
+ tool_call_id: z.string(),
11927
+ result: z.any().optional(),
11928
+ metadata: z.record(z.any()).optional(),
11929
+ }).transform((v) => {
11930
+ return remap$(v, {
11931
+ "tool_call_id": "toolCallId",
11932
+ });
11933
+ });
11934
+ /** @internal */
11935
+ export type StreamRunAgentPartsAgentsResponseToolResultPart$Outbound = {
11936
+ kind: string;
11937
+ tool_call_id: string;
11938
+ result?: any | undefined;
11939
+ metadata?: { [k: string]: any } | undefined;
11940
+ };
11941
+
11942
+ /** @internal */
11943
+ export const StreamRunAgentPartsAgentsResponseToolResultPart$outboundSchema:
11944
+ z.ZodType<
11945
+ StreamRunAgentPartsAgentsResponseToolResultPart$Outbound,
11946
+ z.ZodTypeDef,
11947
+ StreamRunAgentPartsAgentsResponseToolResultPart
11948
+ > = z.object({
11949
+ kind:
11950
+ StreamRunAgentPartsAgentsResponse200TextEventStreamResponseBodyData4DataLastMessageFull5Kind$outboundSchema,
11951
+ toolCallId: z.string(),
11952
+ result: z.any().optional(),
11953
+ metadata: z.record(z.any()).optional(),
11954
+ }).transform((v) => {
11955
+ return remap$(v, {
11956
+ toolCallId: "tool_call_id",
11957
+ });
11958
+ });
11959
+
11960
+ export function streamRunAgentPartsAgentsResponseToolResultPartToJSON(
11961
+ streamRunAgentPartsAgentsResponseToolResultPart:
11962
+ StreamRunAgentPartsAgentsResponseToolResultPart,
11963
+ ): string {
11964
+ return JSON.stringify(
11965
+ StreamRunAgentPartsAgentsResponseToolResultPart$outboundSchema.parse(
11966
+ streamRunAgentPartsAgentsResponseToolResultPart,
11967
+ ),
11968
+ );
11969
+ }
11970
+ export function streamRunAgentPartsAgentsResponseToolResultPartFromJSON(
11971
+ jsonString: string,
11972
+ ): SafeParseResult<
11973
+ StreamRunAgentPartsAgentsResponseToolResultPart,
11974
+ SDKValidationError
11975
+ > {
11976
+ return safeParse(
11977
+ jsonString,
11978
+ (x) =>
11979
+ StreamRunAgentPartsAgentsResponseToolResultPart$inboundSchema.parse(
11980
+ JSON.parse(x),
11981
+ ),
11982
+ `Failed to parse 'StreamRunAgentPartsAgentsResponseToolResultPart' from JSON`,
11983
+ );
11984
+ }
11985
+
11986
+ /** @internal */
11987
+ export const StreamRunAgentPartsAgentsResponse200TextEventStreamResponseBodyData4DataLastMessageFull4Kind$inboundSchema:
11988
+ z.ZodNativeEnum<
11989
+ typeof StreamRunAgentPartsAgentsResponse200TextEventStreamResponseBodyData4DataLastMessageFull4Kind
11990
+ > = z.nativeEnum(
11991
+ StreamRunAgentPartsAgentsResponse200TextEventStreamResponseBodyData4DataLastMessageFull4Kind,
11992
+ );
11993
+ /** @internal */
11994
+ export const StreamRunAgentPartsAgentsResponse200TextEventStreamResponseBodyData4DataLastMessageFull4Kind$outboundSchema:
11995
+ z.ZodNativeEnum<
11996
+ typeof StreamRunAgentPartsAgentsResponse200TextEventStreamResponseBodyData4DataLastMessageFull4Kind
11997
+ > =
11998
+ StreamRunAgentPartsAgentsResponse200TextEventStreamResponseBodyData4DataLastMessageFull4Kind$inboundSchema;
11999
+
12000
+ /** @internal */
12001
+ export const StreamRunAgentPartsAgentsResponseToolCallPart$inboundSchema:
12002
+ z.ZodType<
12003
+ StreamRunAgentPartsAgentsResponseToolCallPart,
12004
+ z.ZodTypeDef,
12005
+ unknown
12006
+ > = z.object({
12007
+ kind:
12008
+ StreamRunAgentPartsAgentsResponse200TextEventStreamResponseBodyData4DataLastMessageFull4Kind$inboundSchema,
12009
+ tool_name: z.string(),
12010
+ tool_call_id: z.string(),
12011
+ arguments: z.record(z.any()),
12012
+ metadata: z.record(z.any()).optional(),
12013
+ }).transform((v) => {
12014
+ return remap$(v, {
12015
+ "tool_name": "toolName",
12016
+ "tool_call_id": "toolCallId",
12017
+ });
12018
+ });
12019
+ /** @internal */
12020
+ export type StreamRunAgentPartsAgentsResponseToolCallPart$Outbound = {
12021
+ kind: string;
12022
+ tool_name: string;
12023
+ tool_call_id: string;
12024
+ arguments: { [k: string]: any };
12025
+ metadata?: { [k: string]: any } | undefined;
12026
+ };
12027
+
12028
+ /** @internal */
12029
+ export const StreamRunAgentPartsAgentsResponseToolCallPart$outboundSchema:
12030
+ z.ZodType<
12031
+ StreamRunAgentPartsAgentsResponseToolCallPart$Outbound,
12032
+ z.ZodTypeDef,
12033
+ StreamRunAgentPartsAgentsResponseToolCallPart
12034
+ > = z.object({
12035
+ kind:
12036
+ StreamRunAgentPartsAgentsResponse200TextEventStreamResponseBodyData4DataLastMessageFull4Kind$outboundSchema,
12037
+ toolName: z.string(),
12038
+ toolCallId: z.string(),
12039
+ arguments: z.record(z.any()),
12040
+ metadata: z.record(z.any()).optional(),
12041
+ }).transform((v) => {
12042
+ return remap$(v, {
12043
+ toolName: "tool_name",
12044
+ toolCallId: "tool_call_id",
12045
+ });
12046
+ });
12047
+
12048
+ export function streamRunAgentPartsAgentsResponseToolCallPartToJSON(
12049
+ streamRunAgentPartsAgentsResponseToolCallPart:
12050
+ StreamRunAgentPartsAgentsResponseToolCallPart,
12051
+ ): string {
12052
+ return JSON.stringify(
12053
+ StreamRunAgentPartsAgentsResponseToolCallPart$outboundSchema.parse(
12054
+ streamRunAgentPartsAgentsResponseToolCallPart,
12055
+ ),
12056
+ );
12057
+ }
12058
+ export function streamRunAgentPartsAgentsResponseToolCallPartFromJSON(
12059
+ jsonString: string,
12060
+ ): SafeParseResult<
12061
+ StreamRunAgentPartsAgentsResponseToolCallPart,
12062
+ SDKValidationError
12063
+ > {
12064
+ return safeParse(
12065
+ jsonString,
12066
+ (x) =>
12067
+ StreamRunAgentPartsAgentsResponseToolCallPart$inboundSchema.parse(
12068
+ JSON.parse(x),
12069
+ ),
12070
+ `Failed to parse 'StreamRunAgentPartsAgentsResponseToolCallPart' from JSON`,
12071
+ );
12072
+ }
12073
+
12074
+ /** @internal */
12075
+ export const StreamRunAgentPartsAgentsResponse200TextEventStreamResponseBodyData4DataLastMessageFullKind$inboundSchema:
12076
+ z.ZodNativeEnum<
12077
+ typeof StreamRunAgentPartsAgentsResponse200TextEventStreamResponseBodyData4DataLastMessageFullKind
12078
+ > = z.nativeEnum(
12079
+ StreamRunAgentPartsAgentsResponse200TextEventStreamResponseBodyData4DataLastMessageFullKind,
12080
+ );
12081
+ /** @internal */
12082
+ export const StreamRunAgentPartsAgentsResponse200TextEventStreamResponseBodyData4DataLastMessageFullKind$outboundSchema:
12083
+ z.ZodNativeEnum<
12084
+ typeof StreamRunAgentPartsAgentsResponse200TextEventStreamResponseBodyData4DataLastMessageFullKind
12085
+ > =
12086
+ StreamRunAgentPartsAgentsResponse200TextEventStreamResponseBodyData4DataLastMessageFullKind$inboundSchema;
12087
+
12088
+ /** @internal */
12089
+ export const StreamRunAgentFileAgentsResponse200FileInURIFormat$inboundSchema:
12090
+ z.ZodType<
12091
+ StreamRunAgentFileAgentsResponse200FileInURIFormat,
12092
+ z.ZodTypeDef,
12093
+ unknown
12094
+ > = z.object({
12095
+ uri: z.string(),
12096
+ mimeType: z.string().optional(),
12097
+ name: z.string().optional(),
12098
+ });
12099
+ /** @internal */
12100
+ export type StreamRunAgentFileAgentsResponse200FileInURIFormat$Outbound = {
12101
+ uri: string;
12102
+ mimeType?: string | undefined;
12103
+ name?: string | undefined;
12104
+ };
12105
+
12106
+ /** @internal */
12107
+ export const StreamRunAgentFileAgentsResponse200FileInURIFormat$outboundSchema:
12108
+ z.ZodType<
12109
+ StreamRunAgentFileAgentsResponse200FileInURIFormat$Outbound,
12110
+ z.ZodTypeDef,
12111
+ StreamRunAgentFileAgentsResponse200FileInURIFormat
12112
+ > = z.object({
12113
+ uri: z.string(),
12114
+ mimeType: z.string().optional(),
12115
+ name: z.string().optional(),
12116
+ });
12117
+
12118
+ export function streamRunAgentFileAgentsResponse200FileInURIFormatToJSON(
12119
+ streamRunAgentFileAgentsResponse200FileInURIFormat:
12120
+ StreamRunAgentFileAgentsResponse200FileInURIFormat,
12121
+ ): string {
12122
+ return JSON.stringify(
12123
+ StreamRunAgentFileAgentsResponse200FileInURIFormat$outboundSchema.parse(
12124
+ streamRunAgentFileAgentsResponse200FileInURIFormat,
12125
+ ),
12126
+ );
12127
+ }
12128
+ export function streamRunAgentFileAgentsResponse200FileInURIFormatFromJSON(
12129
+ jsonString: string,
12130
+ ): SafeParseResult<
12131
+ StreamRunAgentFileAgentsResponse200FileInURIFormat,
12132
+ SDKValidationError
12133
+ > {
12134
+ return safeParse(
12135
+ jsonString,
12136
+ (x) =>
12137
+ StreamRunAgentFileAgentsResponse200FileInURIFormat$inboundSchema.parse(
12138
+ JSON.parse(x),
12139
+ ),
12140
+ `Failed to parse 'StreamRunAgentFileAgentsResponse200FileInURIFormat' from JSON`,
12141
+ );
12142
+ }
12143
+
12144
+ /** @internal */
12145
+ export const StreamRunAgentFileAgentsResponse200BinaryFormat$inboundSchema:
12146
+ z.ZodType<
12147
+ StreamRunAgentFileAgentsResponse200BinaryFormat,
12148
+ z.ZodTypeDef,
12149
+ unknown
12150
+ > = z.object({
12151
+ bytes: z.string(),
12152
+ mimeType: z.string().optional(),
12153
+ name: z.string().optional(),
12154
+ });
12155
+ /** @internal */
12156
+ export type StreamRunAgentFileAgentsResponse200BinaryFormat$Outbound = {
12157
+ bytes: string;
12158
+ mimeType?: string | undefined;
12159
+ name?: string | undefined;
12160
+ };
12161
+
12162
+ /** @internal */
12163
+ export const StreamRunAgentFileAgentsResponse200BinaryFormat$outboundSchema:
12164
+ z.ZodType<
12165
+ StreamRunAgentFileAgentsResponse200BinaryFormat$Outbound,
12166
+ z.ZodTypeDef,
12167
+ StreamRunAgentFileAgentsResponse200BinaryFormat
12168
+ > = z.object({
12169
+ bytes: z.string(),
12170
+ mimeType: z.string().optional(),
12171
+ name: z.string().optional(),
12172
+ });
12173
+
12174
+ export function streamRunAgentFileAgentsResponse200BinaryFormatToJSON(
12175
+ streamRunAgentFileAgentsResponse200BinaryFormat:
12176
+ StreamRunAgentFileAgentsResponse200BinaryFormat,
12177
+ ): string {
12178
+ return JSON.stringify(
12179
+ StreamRunAgentFileAgentsResponse200BinaryFormat$outboundSchema.parse(
12180
+ streamRunAgentFileAgentsResponse200BinaryFormat,
12181
+ ),
12182
+ );
12183
+ }
12184
+ export function streamRunAgentFileAgentsResponse200BinaryFormatFromJSON(
12185
+ jsonString: string,
12186
+ ): SafeParseResult<
12187
+ StreamRunAgentFileAgentsResponse200BinaryFormat,
12188
+ SDKValidationError
12189
+ > {
12190
+ return safeParse(
12191
+ jsonString,
12192
+ (x) =>
12193
+ StreamRunAgentFileAgentsResponse200BinaryFormat$inboundSchema.parse(
12194
+ JSON.parse(x),
12195
+ ),
12196
+ `Failed to parse 'StreamRunAgentFileAgentsResponse200BinaryFormat' from JSON`,
12197
+ );
12198
+ }
12199
+
12200
+ /** @internal */
12201
+ export const StreamRunAgentPartsAgentsResponseFile$inboundSchema: z.ZodType<
12202
+ StreamRunAgentPartsAgentsResponseFile,
12203
+ z.ZodTypeDef,
12204
+ unknown
12205
+ > = z.union([
12206
+ z.lazy(() => StreamRunAgentFileAgentsResponse200BinaryFormat$inboundSchema),
12207
+ z.lazy(() =>
12208
+ StreamRunAgentFileAgentsResponse200FileInURIFormat$inboundSchema
12209
+ ),
12210
+ ]);
12211
+ /** @internal */
12212
+ export type StreamRunAgentPartsAgentsResponseFile$Outbound =
12213
+ | StreamRunAgentFileAgentsResponse200BinaryFormat$Outbound
12214
+ | StreamRunAgentFileAgentsResponse200FileInURIFormat$Outbound;
12215
+
12216
+ /** @internal */
12217
+ export const StreamRunAgentPartsAgentsResponseFile$outboundSchema: z.ZodType<
12218
+ StreamRunAgentPartsAgentsResponseFile$Outbound,
12219
+ z.ZodTypeDef,
12220
+ StreamRunAgentPartsAgentsResponseFile
12221
+ > = z.union([
12222
+ z.lazy(() => StreamRunAgentFileAgentsResponse200BinaryFormat$outboundSchema),
12223
+ z.lazy(() =>
12224
+ StreamRunAgentFileAgentsResponse200FileInURIFormat$outboundSchema
12225
+ ),
12226
+ ]);
12227
+
12228
+ export function streamRunAgentPartsAgentsResponseFileToJSON(
12229
+ streamRunAgentPartsAgentsResponseFile: StreamRunAgentPartsAgentsResponseFile,
12230
+ ): string {
12231
+ return JSON.stringify(
12232
+ StreamRunAgentPartsAgentsResponseFile$outboundSchema.parse(
12233
+ streamRunAgentPartsAgentsResponseFile,
12234
+ ),
12235
+ );
12236
+ }
12237
+ export function streamRunAgentPartsAgentsResponseFileFromJSON(
12238
+ jsonString: string,
12239
+ ): SafeParseResult<StreamRunAgentPartsAgentsResponseFile, SDKValidationError> {
12240
+ return safeParse(
12241
+ jsonString,
12242
+ (x) =>
12243
+ StreamRunAgentPartsAgentsResponseFile$inboundSchema.parse(JSON.parse(x)),
12244
+ `Failed to parse 'StreamRunAgentPartsAgentsResponseFile' from JSON`,
12245
+ );
12246
+ }
12247
+
12248
+ /** @internal */
12249
+ export const StreamRunAgentPartsAgentsResponseFilePart$inboundSchema: z.ZodType<
12250
+ StreamRunAgentPartsAgentsResponseFilePart,
12251
+ z.ZodTypeDef,
12252
+ unknown
12253
+ > = z.object({
12254
+ kind:
12255
+ StreamRunAgentPartsAgentsResponse200TextEventStreamResponseBodyData4DataLastMessageFullKind$inboundSchema,
12256
+ file: z.union([
12257
+ z.lazy(() => StreamRunAgentFileAgentsResponse200BinaryFormat$inboundSchema),
12258
+ z.lazy(() =>
12259
+ StreamRunAgentFileAgentsResponse200FileInURIFormat$inboundSchema
12260
+ ),
12261
+ ]),
12262
+ metadata: z.record(z.any()).optional(),
12263
+ });
12264
+ /** @internal */
12265
+ export type StreamRunAgentPartsAgentsResponseFilePart$Outbound = {
12266
+ kind: string;
12267
+ file:
12268
+ | StreamRunAgentFileAgentsResponse200BinaryFormat$Outbound
12269
+ | StreamRunAgentFileAgentsResponse200FileInURIFormat$Outbound;
12270
+ metadata?: { [k: string]: any } | undefined;
12271
+ };
12272
+
12273
+ /** @internal */
12274
+ export const StreamRunAgentPartsAgentsResponseFilePart$outboundSchema:
12275
+ z.ZodType<
12276
+ StreamRunAgentPartsAgentsResponseFilePart$Outbound,
12277
+ z.ZodTypeDef,
12278
+ StreamRunAgentPartsAgentsResponseFilePart
12279
+ > = z.object({
12280
+ kind:
12281
+ StreamRunAgentPartsAgentsResponse200TextEventStreamResponseBodyData4DataLastMessageFullKind$outboundSchema,
12282
+ file: z.union([
12283
+ z.lazy(() =>
12284
+ StreamRunAgentFileAgentsResponse200BinaryFormat$outboundSchema
12285
+ ),
12286
+ z.lazy(() =>
12287
+ StreamRunAgentFileAgentsResponse200FileInURIFormat$outboundSchema
12288
+ ),
12289
+ ]),
12290
+ metadata: z.record(z.any()).optional(),
12291
+ });
12292
+
12293
+ export function streamRunAgentPartsAgentsResponseFilePartToJSON(
12294
+ streamRunAgentPartsAgentsResponseFilePart:
12295
+ StreamRunAgentPartsAgentsResponseFilePart,
12296
+ ): string {
12297
+ return JSON.stringify(
12298
+ StreamRunAgentPartsAgentsResponseFilePart$outboundSchema.parse(
12299
+ streamRunAgentPartsAgentsResponseFilePart,
12300
+ ),
12301
+ );
12302
+ }
12303
+ export function streamRunAgentPartsAgentsResponseFilePartFromJSON(
12304
+ jsonString: string,
12305
+ ): SafeParseResult<
12306
+ StreamRunAgentPartsAgentsResponseFilePart,
12307
+ SDKValidationError
12308
+ > {
12309
+ return safeParse(
12310
+ jsonString,
12311
+ (x) =>
12312
+ StreamRunAgentPartsAgentsResponseFilePart$inboundSchema.parse(
12313
+ JSON.parse(x),
12314
+ ),
12315
+ `Failed to parse 'StreamRunAgentPartsAgentsResponseFilePart' from JSON`,
12316
+ );
12317
+ }
12318
+
12319
+ /** @internal */
12320
+ export const StreamRunAgentPartsAgentsResponse200TextEventStreamResponseBodyData4DataKind$inboundSchema:
12321
+ z.ZodNativeEnum<
12322
+ typeof StreamRunAgentPartsAgentsResponse200TextEventStreamResponseBodyData4DataKind
12323
+ > = z.nativeEnum(
12324
+ StreamRunAgentPartsAgentsResponse200TextEventStreamResponseBodyData4DataKind,
12325
+ );
12326
+ /** @internal */
12327
+ export const StreamRunAgentPartsAgentsResponse200TextEventStreamResponseBodyData4DataKind$outboundSchema:
12328
+ z.ZodNativeEnum<
12329
+ typeof StreamRunAgentPartsAgentsResponse200TextEventStreamResponseBodyData4DataKind
12330
+ > =
12331
+ StreamRunAgentPartsAgentsResponse200TextEventStreamResponseBodyData4DataKind$inboundSchema;
12332
+
12333
+ /** @internal */
12334
+ export const StreamRunAgentPartsAgentsResponseDataPart$inboundSchema: z.ZodType<
12335
+ StreamRunAgentPartsAgentsResponseDataPart,
12336
+ z.ZodTypeDef,
12337
+ unknown
12338
+ > = z.object({
12339
+ kind:
12340
+ StreamRunAgentPartsAgentsResponse200TextEventStreamResponseBodyData4DataKind$inboundSchema,
12341
+ data: z.record(z.any()),
12342
+ metadata: z.record(z.any()).optional(),
12343
+ });
12344
+ /** @internal */
12345
+ export type StreamRunAgentPartsAgentsResponseDataPart$Outbound = {
12346
+ kind: string;
12347
+ data: { [k: string]: any };
12348
+ metadata?: { [k: string]: any } | undefined;
12349
+ };
12350
+
12351
+ /** @internal */
12352
+ export const StreamRunAgentPartsAgentsResponseDataPart$outboundSchema:
12353
+ z.ZodType<
12354
+ StreamRunAgentPartsAgentsResponseDataPart$Outbound,
12355
+ z.ZodTypeDef,
12356
+ StreamRunAgentPartsAgentsResponseDataPart
12357
+ > = z.object({
12358
+ kind:
12359
+ StreamRunAgentPartsAgentsResponse200TextEventStreamResponseBodyData4DataKind$outboundSchema,
12360
+ data: z.record(z.any()),
12361
+ metadata: z.record(z.any()).optional(),
12362
+ });
12363
+
12364
+ export function streamRunAgentPartsAgentsResponseDataPartToJSON(
12365
+ streamRunAgentPartsAgentsResponseDataPart:
12366
+ StreamRunAgentPartsAgentsResponseDataPart,
12367
+ ): string {
12368
+ return JSON.stringify(
12369
+ StreamRunAgentPartsAgentsResponseDataPart$outboundSchema.parse(
12370
+ streamRunAgentPartsAgentsResponseDataPart,
12371
+ ),
12372
+ );
12373
+ }
12374
+ export function streamRunAgentPartsAgentsResponseDataPartFromJSON(
12375
+ jsonString: string,
12376
+ ): SafeParseResult<
12377
+ StreamRunAgentPartsAgentsResponseDataPart,
12378
+ SDKValidationError
12379
+ > {
12380
+ return safeParse(
12381
+ jsonString,
12382
+ (x) =>
12383
+ StreamRunAgentPartsAgentsResponseDataPart$inboundSchema.parse(
12384
+ JSON.parse(x),
12385
+ ),
12386
+ `Failed to parse 'StreamRunAgentPartsAgentsResponseDataPart' from JSON`,
12387
+ );
12388
+ }
12389
+
12390
+ /** @internal */
12391
+ export const StreamRunAgentPartsAgentsResponse200TextEventStreamResponseBodyData4Kind$inboundSchema:
12392
+ z.ZodNativeEnum<
12393
+ typeof StreamRunAgentPartsAgentsResponse200TextEventStreamResponseBodyData4Kind
12394
+ > = z.nativeEnum(
12395
+ StreamRunAgentPartsAgentsResponse200TextEventStreamResponseBodyData4Kind,
12396
+ );
12397
+ /** @internal */
12398
+ export const StreamRunAgentPartsAgentsResponse200TextEventStreamResponseBodyData4Kind$outboundSchema:
12399
+ z.ZodNativeEnum<
12400
+ typeof StreamRunAgentPartsAgentsResponse200TextEventStreamResponseBodyData4Kind
12401
+ > =
12402
+ StreamRunAgentPartsAgentsResponse200TextEventStreamResponseBodyData4Kind$inboundSchema;
12403
+
12404
+ /** @internal */
12405
+ export const StreamRunAgentPartsAgentsResponseTextPart$inboundSchema: z.ZodType<
12406
+ StreamRunAgentPartsAgentsResponseTextPart,
12407
+ z.ZodTypeDef,
12408
+ unknown
12409
+ > = z.object({
12410
+ kind:
12411
+ StreamRunAgentPartsAgentsResponse200TextEventStreamResponseBodyData4Kind$inboundSchema,
12412
+ text: z.string(),
12413
+ });
12414
+ /** @internal */
12415
+ export type StreamRunAgentPartsAgentsResponseTextPart$Outbound = {
12416
+ kind: string;
12417
+ text: string;
12418
+ };
12419
+
12420
+ /** @internal */
12421
+ export const StreamRunAgentPartsAgentsResponseTextPart$outboundSchema:
12422
+ z.ZodType<
12423
+ StreamRunAgentPartsAgentsResponseTextPart$Outbound,
12424
+ z.ZodTypeDef,
12425
+ StreamRunAgentPartsAgentsResponseTextPart
12426
+ > = z.object({
12427
+ kind:
12428
+ StreamRunAgentPartsAgentsResponse200TextEventStreamResponseBodyData4Kind$outboundSchema,
12429
+ text: z.string(),
12430
+ });
12431
+
12432
+ export function streamRunAgentPartsAgentsResponseTextPartToJSON(
12433
+ streamRunAgentPartsAgentsResponseTextPart:
12434
+ StreamRunAgentPartsAgentsResponseTextPart,
12435
+ ): string {
12436
+ return JSON.stringify(
12437
+ StreamRunAgentPartsAgentsResponseTextPart$outboundSchema.parse(
12438
+ streamRunAgentPartsAgentsResponseTextPart,
12439
+ ),
12440
+ );
12441
+ }
12442
+ export function streamRunAgentPartsAgentsResponseTextPartFromJSON(
12443
+ jsonString: string,
12444
+ ): SafeParseResult<
12445
+ StreamRunAgentPartsAgentsResponseTextPart,
12446
+ SDKValidationError
12447
+ > {
12448
+ return safeParse(
12449
+ jsonString,
12450
+ (x) =>
12451
+ StreamRunAgentPartsAgentsResponseTextPart$inboundSchema.parse(
12452
+ JSON.parse(x),
12453
+ ),
12454
+ `Failed to parse 'StreamRunAgentPartsAgentsResponseTextPart' from JSON`,
12455
+ );
12456
+ }
12457
+
12458
+ /** @internal */
12459
+ export const StreamRunAgentDataAgentsParts$inboundSchema: z.ZodType<
12460
+ StreamRunAgentDataAgentsParts,
12461
+ z.ZodTypeDef,
12462
+ unknown
12463
+ > = z.union([
12464
+ z.lazy(() => StreamRunAgentPartsAgentsResponseToolCallPart$inboundSchema),
12465
+ z.lazy(() => StreamRunAgentPartsAgentsResponseTextPart$inboundSchema),
12466
+ z.lazy(() => StreamRunAgentPartsAgentsResponseDataPart$inboundSchema),
12467
+ z.lazy(() => StreamRunAgentPartsAgentsResponseFilePart$inboundSchema),
12468
+ z.lazy(() => StreamRunAgentPartsAgentsResponseToolResultPart$inboundSchema),
12469
+ ]);
12470
+ /** @internal */
12471
+ export type StreamRunAgentDataAgentsParts$Outbound =
12472
+ | StreamRunAgentPartsAgentsResponseToolCallPart$Outbound
12473
+ | StreamRunAgentPartsAgentsResponseTextPart$Outbound
12474
+ | StreamRunAgentPartsAgentsResponseDataPart$Outbound
12475
+ | StreamRunAgentPartsAgentsResponseFilePart$Outbound
12476
+ | StreamRunAgentPartsAgentsResponseToolResultPart$Outbound;
12477
+
12478
+ /** @internal */
12479
+ export const StreamRunAgentDataAgentsParts$outboundSchema: z.ZodType<
12480
+ StreamRunAgentDataAgentsParts$Outbound,
12481
+ z.ZodTypeDef,
12482
+ StreamRunAgentDataAgentsParts
12483
+ > = z.union([
12484
+ z.lazy(() => StreamRunAgentPartsAgentsResponseToolCallPart$outboundSchema),
12485
+ z.lazy(() => StreamRunAgentPartsAgentsResponseTextPart$outboundSchema),
12486
+ z.lazy(() => StreamRunAgentPartsAgentsResponseDataPart$outboundSchema),
12487
+ z.lazy(() => StreamRunAgentPartsAgentsResponseFilePart$outboundSchema),
12488
+ z.lazy(() => StreamRunAgentPartsAgentsResponseToolResultPart$outboundSchema),
12489
+ ]);
12490
+
12491
+ export function streamRunAgentDataAgentsPartsToJSON(
12492
+ streamRunAgentDataAgentsParts: StreamRunAgentDataAgentsParts,
12493
+ ): string {
12494
+ return JSON.stringify(
12495
+ StreamRunAgentDataAgentsParts$outboundSchema.parse(
12496
+ streamRunAgentDataAgentsParts,
12497
+ ),
12498
+ );
12499
+ }
12500
+ export function streamRunAgentDataAgentsPartsFromJSON(
12501
+ jsonString: string,
12502
+ ): SafeParseResult<StreamRunAgentDataAgentsParts, SDKValidationError> {
12503
+ return safeParse(
12504
+ jsonString,
12505
+ (x) => StreamRunAgentDataAgentsParts$inboundSchema.parse(JSON.parse(x)),
12506
+ `Failed to parse 'StreamRunAgentDataAgentsParts' from JSON`,
12507
+ );
12508
+ }
12509
+
12510
+ /** @internal */
12511
+ export const LastMessageFull$inboundSchema: z.ZodType<
12512
+ LastMessageFull,
12513
+ z.ZodTypeDef,
12514
+ unknown
12515
+ > = z.object({
12516
+ messageId: z.string().optional(),
12517
+ role: StreamRunAgentDataAgentsRole$inboundSchema,
12518
+ parts: z.array(
12519
+ z.union([
12520
+ z.lazy(() => StreamRunAgentPartsAgentsResponseToolCallPart$inboundSchema),
12521
+ z.lazy(() => StreamRunAgentPartsAgentsResponseTextPart$inboundSchema),
12522
+ z.lazy(() => StreamRunAgentPartsAgentsResponseDataPart$inboundSchema),
12523
+ z.lazy(() => StreamRunAgentPartsAgentsResponseFilePart$inboundSchema),
12524
+ z.lazy(() =>
12525
+ StreamRunAgentPartsAgentsResponseToolResultPart$inboundSchema
12526
+ ),
12527
+ ]),
12528
+ ),
12529
+ metadata: z.record(z.any()).optional(),
12530
+ });
12531
+ /** @internal */
12532
+ export type LastMessageFull$Outbound = {
12533
+ messageId?: string | undefined;
12534
+ role: string;
12535
+ parts: Array<
12536
+ | StreamRunAgentPartsAgentsResponseToolCallPart$Outbound
12537
+ | StreamRunAgentPartsAgentsResponseTextPart$Outbound
12538
+ | StreamRunAgentPartsAgentsResponseDataPart$Outbound
12539
+ | StreamRunAgentPartsAgentsResponseFilePart$Outbound
12540
+ | StreamRunAgentPartsAgentsResponseToolResultPart$Outbound
12541
+ >;
12542
+ metadata?: { [k: string]: any } | undefined;
12543
+ };
12544
+
12545
+ /** @internal */
12546
+ export const LastMessageFull$outboundSchema: z.ZodType<
12547
+ LastMessageFull$Outbound,
11532
12548
  z.ZodTypeDef,
11533
- StreamRunAgentData5
12549
+ LastMessageFull
11534
12550
  > = z.object({
11535
- type: StreamRunAgentDataAgentsResponse200TextEventStreamType$outboundSchema,
11536
- timestamp: z.string(),
11537
- data: z.lazy(() => StreamRunAgentDataAgentsResponse200Data$outboundSchema),
12551
+ messageId: z.string().optional(),
12552
+ role: StreamRunAgentDataAgentsRole$outboundSchema,
12553
+ parts: z.array(
12554
+ z.union([
12555
+ z.lazy(() =>
12556
+ StreamRunAgentPartsAgentsResponseToolCallPart$outboundSchema
12557
+ ),
12558
+ z.lazy(() => StreamRunAgentPartsAgentsResponseTextPart$outboundSchema),
12559
+ z.lazy(() => StreamRunAgentPartsAgentsResponseDataPart$outboundSchema),
12560
+ z.lazy(() => StreamRunAgentPartsAgentsResponseFilePart$outboundSchema),
12561
+ z.lazy(() =>
12562
+ StreamRunAgentPartsAgentsResponseToolResultPart$outboundSchema
12563
+ ),
12564
+ ]),
12565
+ ),
12566
+ metadata: z.record(z.any()).optional(),
11538
12567
  });
11539
12568
 
11540
- export function streamRunAgentData5ToJSON(
11541
- streamRunAgentData5: StreamRunAgentData5,
12569
+ export function lastMessageFullToJSON(
12570
+ lastMessageFull: LastMessageFull,
11542
12571
  ): string {
11543
- return JSON.stringify(
11544
- StreamRunAgentData5$outboundSchema.parse(streamRunAgentData5),
11545
- );
12572
+ return JSON.stringify(LastMessageFull$outboundSchema.parse(lastMessageFull));
11546
12573
  }
11547
- export function streamRunAgentData5FromJSON(
12574
+ export function lastMessageFullFromJSON(
11548
12575
  jsonString: string,
11549
- ): SafeParseResult<StreamRunAgentData5, SDKValidationError> {
12576
+ ): SafeParseResult<LastMessageFull, SDKValidationError> {
11550
12577
  return safeParse(
11551
12578
  jsonString,
11552
- (x) => StreamRunAgentData5$inboundSchema.parse(JSON.parse(x)),
11553
- `Failed to parse 'StreamRunAgentData5' from JSON`,
12579
+ (x) => LastMessageFull$inboundSchema.parse(JSON.parse(x)),
12580
+ `Failed to parse 'LastMessageFull' from JSON`,
11554
12581
  );
11555
12582
  }
11556
12583
 
11557
- /** @internal */
11558
- export const StreamRunAgentDataAgentsResponse200Type$inboundSchema:
11559
- z.ZodNativeEnum<typeof StreamRunAgentDataAgentsResponse200Type> = z
11560
- .nativeEnum(StreamRunAgentDataAgentsResponse200Type);
11561
- /** @internal */
11562
- export const StreamRunAgentDataAgentsResponse200Type$outboundSchema:
11563
- z.ZodNativeEnum<typeof StreamRunAgentDataAgentsResponse200Type> =
11564
- StreamRunAgentDataAgentsResponse200Type$inboundSchema;
11565
-
11566
12584
  /** @internal */
11567
12585
  export const FinishReason$inboundSchema: z.ZodNativeEnum<typeof FinishReason> =
11568
12586
  z.nativeEnum(FinishReason);
@@ -11673,6 +12691,214 @@ export function pendingToolCallsFromJSON(
11673
12691
  );
11674
12692
  }
11675
12693
 
12694
+ /** @internal */
12695
+ export const StreamRunAgentDataPromptTokensDetails$inboundSchema: z.ZodType<
12696
+ StreamRunAgentDataPromptTokensDetails,
12697
+ z.ZodTypeDef,
12698
+ unknown
12699
+ > = z.object({
12700
+ cached_tokens: z.nullable(z.number().int()).optional(),
12701
+ audio_tokens: z.nullable(z.number().int()).optional(),
12702
+ }).transform((v) => {
12703
+ return remap$(v, {
12704
+ "cached_tokens": "cachedTokens",
12705
+ "audio_tokens": "audioTokens",
12706
+ });
12707
+ });
12708
+ /** @internal */
12709
+ export type StreamRunAgentDataPromptTokensDetails$Outbound = {
12710
+ cached_tokens?: number | null | undefined;
12711
+ audio_tokens?: number | null | undefined;
12712
+ };
12713
+
12714
+ /** @internal */
12715
+ export const StreamRunAgentDataPromptTokensDetails$outboundSchema: z.ZodType<
12716
+ StreamRunAgentDataPromptTokensDetails$Outbound,
12717
+ z.ZodTypeDef,
12718
+ StreamRunAgentDataPromptTokensDetails
12719
+ > = z.object({
12720
+ cachedTokens: z.nullable(z.number().int()).optional(),
12721
+ audioTokens: z.nullable(z.number().int()).optional(),
12722
+ }).transform((v) => {
12723
+ return remap$(v, {
12724
+ cachedTokens: "cached_tokens",
12725
+ audioTokens: "audio_tokens",
12726
+ });
12727
+ });
12728
+
12729
+ export function streamRunAgentDataPromptTokensDetailsToJSON(
12730
+ streamRunAgentDataPromptTokensDetails: StreamRunAgentDataPromptTokensDetails,
12731
+ ): string {
12732
+ return JSON.stringify(
12733
+ StreamRunAgentDataPromptTokensDetails$outboundSchema.parse(
12734
+ streamRunAgentDataPromptTokensDetails,
12735
+ ),
12736
+ );
12737
+ }
12738
+ export function streamRunAgentDataPromptTokensDetailsFromJSON(
12739
+ jsonString: string,
12740
+ ): SafeParseResult<StreamRunAgentDataPromptTokensDetails, SDKValidationError> {
12741
+ return safeParse(
12742
+ jsonString,
12743
+ (x) =>
12744
+ StreamRunAgentDataPromptTokensDetails$inboundSchema.parse(JSON.parse(x)),
12745
+ `Failed to parse 'StreamRunAgentDataPromptTokensDetails' from JSON`,
12746
+ );
12747
+ }
12748
+
12749
+ /** @internal */
12750
+ export const StreamRunAgentDataCompletionTokensDetails$inboundSchema: z.ZodType<
12751
+ StreamRunAgentDataCompletionTokensDetails,
12752
+ z.ZodTypeDef,
12753
+ unknown
12754
+ > = z.object({
12755
+ reasoning_tokens: z.nullable(z.number()).optional(),
12756
+ accepted_prediction_tokens: z.nullable(z.number()).optional(),
12757
+ rejected_prediction_tokens: z.nullable(z.number()).optional(),
12758
+ audio_tokens: z.nullable(z.number().int()).optional(),
12759
+ }).transform((v) => {
12760
+ return remap$(v, {
12761
+ "reasoning_tokens": "reasoningTokens",
12762
+ "accepted_prediction_tokens": "acceptedPredictionTokens",
12763
+ "rejected_prediction_tokens": "rejectedPredictionTokens",
12764
+ "audio_tokens": "audioTokens",
12765
+ });
12766
+ });
12767
+ /** @internal */
12768
+ export type StreamRunAgentDataCompletionTokensDetails$Outbound = {
12769
+ reasoning_tokens?: number | null | undefined;
12770
+ accepted_prediction_tokens?: number | null | undefined;
12771
+ rejected_prediction_tokens?: number | null | undefined;
12772
+ audio_tokens?: number | null | undefined;
12773
+ };
12774
+
12775
+ /** @internal */
12776
+ export const StreamRunAgentDataCompletionTokensDetails$outboundSchema:
12777
+ z.ZodType<
12778
+ StreamRunAgentDataCompletionTokensDetails$Outbound,
12779
+ z.ZodTypeDef,
12780
+ StreamRunAgentDataCompletionTokensDetails
12781
+ > = z.object({
12782
+ reasoningTokens: z.nullable(z.number()).optional(),
12783
+ acceptedPredictionTokens: z.nullable(z.number()).optional(),
12784
+ rejectedPredictionTokens: z.nullable(z.number()).optional(),
12785
+ audioTokens: z.nullable(z.number().int()).optional(),
12786
+ }).transform((v) => {
12787
+ return remap$(v, {
12788
+ reasoningTokens: "reasoning_tokens",
12789
+ acceptedPredictionTokens: "accepted_prediction_tokens",
12790
+ rejectedPredictionTokens: "rejected_prediction_tokens",
12791
+ audioTokens: "audio_tokens",
12792
+ });
12793
+ });
12794
+
12795
+ export function streamRunAgentDataCompletionTokensDetailsToJSON(
12796
+ streamRunAgentDataCompletionTokensDetails:
12797
+ StreamRunAgentDataCompletionTokensDetails,
12798
+ ): string {
12799
+ return JSON.stringify(
12800
+ StreamRunAgentDataCompletionTokensDetails$outboundSchema.parse(
12801
+ streamRunAgentDataCompletionTokensDetails,
12802
+ ),
12803
+ );
12804
+ }
12805
+ export function streamRunAgentDataCompletionTokensDetailsFromJSON(
12806
+ jsonString: string,
12807
+ ): SafeParseResult<
12808
+ StreamRunAgentDataCompletionTokensDetails,
12809
+ SDKValidationError
12810
+ > {
12811
+ return safeParse(
12812
+ jsonString,
12813
+ (x) =>
12814
+ StreamRunAgentDataCompletionTokensDetails$inboundSchema.parse(
12815
+ JSON.parse(x),
12816
+ ),
12817
+ `Failed to parse 'StreamRunAgentDataCompletionTokensDetails' from JSON`,
12818
+ );
12819
+ }
12820
+
12821
+ /** @internal */
12822
+ export const StreamRunAgentDataUsage$inboundSchema: z.ZodType<
12823
+ StreamRunAgentDataUsage,
12824
+ z.ZodTypeDef,
12825
+ unknown
12826
+ > = z.object({
12827
+ completion_tokens: z.number().optional(),
12828
+ prompt_tokens: z.number().optional(),
12829
+ total_tokens: z.number().optional(),
12830
+ prompt_tokens_details: z.nullable(
12831
+ z.lazy(() => StreamRunAgentDataPromptTokensDetails$inboundSchema),
12832
+ ).optional(),
12833
+ completion_tokens_details: z.nullable(
12834
+ z.lazy(() => StreamRunAgentDataCompletionTokensDetails$inboundSchema),
12835
+ ).optional(),
12836
+ }).transform((v) => {
12837
+ return remap$(v, {
12838
+ "completion_tokens": "completionTokens",
12839
+ "prompt_tokens": "promptTokens",
12840
+ "total_tokens": "totalTokens",
12841
+ "prompt_tokens_details": "promptTokensDetails",
12842
+ "completion_tokens_details": "completionTokensDetails",
12843
+ });
12844
+ });
12845
+ /** @internal */
12846
+ export type StreamRunAgentDataUsage$Outbound = {
12847
+ completion_tokens?: number | undefined;
12848
+ prompt_tokens?: number | undefined;
12849
+ total_tokens?: number | undefined;
12850
+ prompt_tokens_details?:
12851
+ | StreamRunAgentDataPromptTokensDetails$Outbound
12852
+ | null
12853
+ | undefined;
12854
+ completion_tokens_details?:
12855
+ | StreamRunAgentDataCompletionTokensDetails$Outbound
12856
+ | null
12857
+ | undefined;
12858
+ };
12859
+
12860
+ /** @internal */
12861
+ export const StreamRunAgentDataUsage$outboundSchema: z.ZodType<
12862
+ StreamRunAgentDataUsage$Outbound,
12863
+ z.ZodTypeDef,
12864
+ StreamRunAgentDataUsage
12865
+ > = z.object({
12866
+ completionTokens: z.number().optional(),
12867
+ promptTokens: z.number().optional(),
12868
+ totalTokens: z.number().optional(),
12869
+ promptTokensDetails: z.nullable(
12870
+ z.lazy(() => StreamRunAgentDataPromptTokensDetails$outboundSchema),
12871
+ ).optional(),
12872
+ completionTokensDetails: z.nullable(
12873
+ z.lazy(() => StreamRunAgentDataCompletionTokensDetails$outboundSchema),
12874
+ ).optional(),
12875
+ }).transform((v) => {
12876
+ return remap$(v, {
12877
+ completionTokens: "completion_tokens",
12878
+ promptTokens: "prompt_tokens",
12879
+ totalTokens: "total_tokens",
12880
+ promptTokensDetails: "prompt_tokens_details",
12881
+ completionTokensDetails: "completion_tokens_details",
12882
+ });
12883
+ });
12884
+
12885
+ export function streamRunAgentDataUsageToJSON(
12886
+ streamRunAgentDataUsage: StreamRunAgentDataUsage,
12887
+ ): string {
12888
+ return JSON.stringify(
12889
+ StreamRunAgentDataUsage$outboundSchema.parse(streamRunAgentDataUsage),
12890
+ );
12891
+ }
12892
+ export function streamRunAgentDataUsageFromJSON(
12893
+ jsonString: string,
12894
+ ): SafeParseResult<StreamRunAgentDataUsage, SDKValidationError> {
12895
+ return safeParse(
12896
+ jsonString,
12897
+ (x) => StreamRunAgentDataUsage$inboundSchema.parse(JSON.parse(x)),
12898
+ `Failed to parse 'StreamRunAgentDataUsage' from JSON`,
12899
+ );
12900
+ }
12901
+
11676
12902
  /** @internal */
11677
12903
  export const StreamRunAgentDataAgentsResponseData$inboundSchema: z.ZodType<
11678
12904
  StreamRunAgentDataAgentsResponseData,
@@ -11680,12 +12906,16 @@ export const StreamRunAgentDataAgentsResponseData$inboundSchema: z.ZodType<
11680
12906
  unknown
11681
12907
  > = z.object({
11682
12908
  last_message: z.string(),
12909
+ last_message_full: z.lazy(() => LastMessageFull$inboundSchema).optional(),
11683
12910
  finish_reason: FinishReason$inboundSchema,
11684
12911
  pending_tool_calls: z.array(z.lazy(() => PendingToolCalls$inboundSchema))
11685
12912
  .optional(),
12913
+ usage: z.lazy(() => StreamRunAgentDataUsage$inboundSchema).optional(),
12914
+ responseId: z.string().optional(),
11686
12915
  }).transform((v) => {
11687
12916
  return remap$(v, {
11688
12917
  "last_message": "lastMessage",
12918
+ "last_message_full": "lastMessageFull",
11689
12919
  "finish_reason": "finishReason",
11690
12920
  "pending_tool_calls": "pendingToolCalls",
11691
12921
  });
@@ -11693,8 +12923,11 @@ export const StreamRunAgentDataAgentsResponseData$inboundSchema: z.ZodType<
11693
12923
  /** @internal */
11694
12924
  export type StreamRunAgentDataAgentsResponseData$Outbound = {
11695
12925
  last_message: string;
12926
+ last_message_full?: LastMessageFull$Outbound | undefined;
11696
12927
  finish_reason: string;
11697
12928
  pending_tool_calls?: Array<PendingToolCalls$Outbound> | undefined;
12929
+ usage?: StreamRunAgentDataUsage$Outbound | undefined;
12930
+ responseId?: string | undefined;
11698
12931
  };
11699
12932
 
11700
12933
  /** @internal */
@@ -11704,12 +12937,16 @@ export const StreamRunAgentDataAgentsResponseData$outboundSchema: z.ZodType<
11704
12937
  StreamRunAgentDataAgentsResponseData
11705
12938
  > = z.object({
11706
12939
  lastMessage: z.string(),
12940
+ lastMessageFull: z.lazy(() => LastMessageFull$outboundSchema).optional(),
11707
12941
  finishReason: FinishReason$outboundSchema,
11708
12942
  pendingToolCalls: z.array(z.lazy(() => PendingToolCalls$outboundSchema))
11709
12943
  .optional(),
12944
+ usage: z.lazy(() => StreamRunAgentDataUsage$outboundSchema).optional(),
12945
+ responseId: z.string().optional(),
11710
12946
  }).transform((v) => {
11711
12947
  return remap$(v, {
11712
12948
  lastMessage: "last_message",
12949
+ lastMessageFull: "last_message_full",
11713
12950
  finishReason: "finish_reason",
11714
12951
  pendingToolCalls: "pending_tool_calls",
11715
12952
  });
@@ -12560,14 +13797,13 @@ export function dataToolCallsFromJSON(
12560
13797
  }
12561
13798
 
12562
13799
  /** @internal */
12563
- export const StreamRunAgentDataAgentsResponseRole$inboundSchema:
12564
- z.ZodNativeEnum<typeof StreamRunAgentDataAgentsResponseRole> = z.nativeEnum(
12565
- StreamRunAgentDataAgentsResponseRole,
12566
- );
13800
+ export const StreamRunAgentDataAgentsResponse200Role$inboundSchema:
13801
+ z.ZodNativeEnum<typeof StreamRunAgentDataAgentsResponse200Role> = z
13802
+ .nativeEnum(StreamRunAgentDataAgentsResponse200Role);
12567
13803
  /** @internal */
12568
- export const StreamRunAgentDataAgentsResponseRole$outboundSchema:
12569
- z.ZodNativeEnum<typeof StreamRunAgentDataAgentsResponseRole> =
12570
- StreamRunAgentDataAgentsResponseRole$inboundSchema;
13804
+ export const StreamRunAgentDataAgentsResponse200Role$outboundSchema:
13805
+ z.ZodNativeEnum<typeof StreamRunAgentDataAgentsResponse200Role> =
13806
+ StreamRunAgentDataAgentsResponse200Role$inboundSchema;
12571
13807
 
12572
13808
  /** @internal */
12573
13809
  export const DataAudio$inboundSchema: z.ZodType<
@@ -12630,7 +13866,7 @@ export const StreamRunAgentDataMessage$inboundSchema: z.ZodType<
12630
13866
  content: z.nullable(z.string()).optional(),
12631
13867
  refusal: z.nullable(z.string()).optional(),
12632
13868
  tool_calls: z.array(z.lazy(() => DataToolCalls$inboundSchema)).optional(),
12633
- role: StreamRunAgentDataAgentsResponseRole$inboundSchema.optional(),
13869
+ role: StreamRunAgentDataAgentsResponse200Role$inboundSchema.optional(),
12634
13870
  reasoning: z.nullable(z.string()).optional(),
12635
13871
  reasoning_signature: z.nullable(z.string()).optional(),
12636
13872
  redacted_reasoning: z.string().optional(),
@@ -12663,7 +13899,7 @@ export const StreamRunAgentDataMessage$outboundSchema: z.ZodType<
12663
13899
  content: z.nullable(z.string()).optional(),
12664
13900
  refusal: z.nullable(z.string()).optional(),
12665
13901
  toolCalls: z.array(z.lazy(() => DataToolCalls$outboundSchema)).optional(),
12666
- role: StreamRunAgentDataAgentsResponseRole$outboundSchema.optional(),
13902
+ role: StreamRunAgentDataAgentsResponse200Role$outboundSchema.optional(),
12667
13903
  reasoning: z.nullable(z.string()).optional(),
12668
13904
  reasoningSignature: z.nullable(z.string()).optional(),
12669
13905
  redactedReasoning: z.string().optional(),
@@ -12965,6 +14201,196 @@ export function choiceFromJSON(
12965
14201
  );
12966
14202
  }
12967
14203
 
14204
+ /** @internal */
14205
+ export const DataPromptTokensDetails$inboundSchema: z.ZodType<
14206
+ DataPromptTokensDetails,
14207
+ z.ZodTypeDef,
14208
+ unknown
14209
+ > = z.object({
14210
+ cached_tokens: z.nullable(z.number().int()).optional(),
14211
+ audio_tokens: z.nullable(z.number().int()).optional(),
14212
+ }).transform((v) => {
14213
+ return remap$(v, {
14214
+ "cached_tokens": "cachedTokens",
14215
+ "audio_tokens": "audioTokens",
14216
+ });
14217
+ });
14218
+ /** @internal */
14219
+ export type DataPromptTokensDetails$Outbound = {
14220
+ cached_tokens?: number | null | undefined;
14221
+ audio_tokens?: number | null | undefined;
14222
+ };
14223
+
14224
+ /** @internal */
14225
+ export const DataPromptTokensDetails$outboundSchema: z.ZodType<
14226
+ DataPromptTokensDetails$Outbound,
14227
+ z.ZodTypeDef,
14228
+ DataPromptTokensDetails
14229
+ > = z.object({
14230
+ cachedTokens: z.nullable(z.number().int()).optional(),
14231
+ audioTokens: z.nullable(z.number().int()).optional(),
14232
+ }).transform((v) => {
14233
+ return remap$(v, {
14234
+ cachedTokens: "cached_tokens",
14235
+ audioTokens: "audio_tokens",
14236
+ });
14237
+ });
14238
+
14239
+ export function dataPromptTokensDetailsToJSON(
14240
+ dataPromptTokensDetails: DataPromptTokensDetails,
14241
+ ): string {
14242
+ return JSON.stringify(
14243
+ DataPromptTokensDetails$outboundSchema.parse(dataPromptTokensDetails),
14244
+ );
14245
+ }
14246
+ export function dataPromptTokensDetailsFromJSON(
14247
+ jsonString: string,
14248
+ ): SafeParseResult<DataPromptTokensDetails, SDKValidationError> {
14249
+ return safeParse(
14250
+ jsonString,
14251
+ (x) => DataPromptTokensDetails$inboundSchema.parse(JSON.parse(x)),
14252
+ `Failed to parse 'DataPromptTokensDetails' from JSON`,
14253
+ );
14254
+ }
14255
+
14256
+ /** @internal */
14257
+ export const DataCompletionTokensDetails$inboundSchema: z.ZodType<
14258
+ DataCompletionTokensDetails,
14259
+ z.ZodTypeDef,
14260
+ unknown
14261
+ > = z.object({
14262
+ reasoning_tokens: z.nullable(z.number()).optional(),
14263
+ accepted_prediction_tokens: z.nullable(z.number()).optional(),
14264
+ rejected_prediction_tokens: z.nullable(z.number()).optional(),
14265
+ audio_tokens: z.nullable(z.number().int()).optional(),
14266
+ }).transform((v) => {
14267
+ return remap$(v, {
14268
+ "reasoning_tokens": "reasoningTokens",
14269
+ "accepted_prediction_tokens": "acceptedPredictionTokens",
14270
+ "rejected_prediction_tokens": "rejectedPredictionTokens",
14271
+ "audio_tokens": "audioTokens",
14272
+ });
14273
+ });
14274
+ /** @internal */
14275
+ export type DataCompletionTokensDetails$Outbound = {
14276
+ reasoning_tokens?: number | null | undefined;
14277
+ accepted_prediction_tokens?: number | null | undefined;
14278
+ rejected_prediction_tokens?: number | null | undefined;
14279
+ audio_tokens?: number | null | undefined;
14280
+ };
14281
+
14282
+ /** @internal */
14283
+ export const DataCompletionTokensDetails$outboundSchema: z.ZodType<
14284
+ DataCompletionTokensDetails$Outbound,
14285
+ z.ZodTypeDef,
14286
+ DataCompletionTokensDetails
14287
+ > = z.object({
14288
+ reasoningTokens: z.nullable(z.number()).optional(),
14289
+ acceptedPredictionTokens: z.nullable(z.number()).optional(),
14290
+ rejectedPredictionTokens: z.nullable(z.number()).optional(),
14291
+ audioTokens: z.nullable(z.number().int()).optional(),
14292
+ }).transform((v) => {
14293
+ return remap$(v, {
14294
+ reasoningTokens: "reasoning_tokens",
14295
+ acceptedPredictionTokens: "accepted_prediction_tokens",
14296
+ rejectedPredictionTokens: "rejected_prediction_tokens",
14297
+ audioTokens: "audio_tokens",
14298
+ });
14299
+ });
14300
+
14301
+ export function dataCompletionTokensDetailsToJSON(
14302
+ dataCompletionTokensDetails: DataCompletionTokensDetails,
14303
+ ): string {
14304
+ return JSON.stringify(
14305
+ DataCompletionTokensDetails$outboundSchema.parse(
14306
+ dataCompletionTokensDetails,
14307
+ ),
14308
+ );
14309
+ }
14310
+ export function dataCompletionTokensDetailsFromJSON(
14311
+ jsonString: string,
14312
+ ): SafeParseResult<DataCompletionTokensDetails, SDKValidationError> {
14313
+ return safeParse(
14314
+ jsonString,
14315
+ (x) => DataCompletionTokensDetails$inboundSchema.parse(JSON.parse(x)),
14316
+ `Failed to parse 'DataCompletionTokensDetails' from JSON`,
14317
+ );
14318
+ }
14319
+
14320
+ /** @internal */
14321
+ export const DataUsage$inboundSchema: z.ZodType<
14322
+ DataUsage,
14323
+ z.ZodTypeDef,
14324
+ unknown
14325
+ > = z.object({
14326
+ completion_tokens: z.number().optional(),
14327
+ prompt_tokens: z.number().optional(),
14328
+ total_tokens: z.number().optional(),
14329
+ prompt_tokens_details: z.nullable(
14330
+ z.lazy(() => DataPromptTokensDetails$inboundSchema),
14331
+ ).optional(),
14332
+ completion_tokens_details: z.nullable(
14333
+ z.lazy(() => DataCompletionTokensDetails$inboundSchema),
14334
+ ).optional(),
14335
+ }).transform((v) => {
14336
+ return remap$(v, {
14337
+ "completion_tokens": "completionTokens",
14338
+ "prompt_tokens": "promptTokens",
14339
+ "total_tokens": "totalTokens",
14340
+ "prompt_tokens_details": "promptTokensDetails",
14341
+ "completion_tokens_details": "completionTokensDetails",
14342
+ });
14343
+ });
14344
+ /** @internal */
14345
+ export type DataUsage$Outbound = {
14346
+ completion_tokens?: number | undefined;
14347
+ prompt_tokens?: number | undefined;
14348
+ total_tokens?: number | undefined;
14349
+ prompt_tokens_details?: DataPromptTokensDetails$Outbound | null | undefined;
14350
+ completion_tokens_details?:
14351
+ | DataCompletionTokensDetails$Outbound
14352
+ | null
14353
+ | undefined;
14354
+ };
14355
+
14356
+ /** @internal */
14357
+ export const DataUsage$outboundSchema: z.ZodType<
14358
+ DataUsage$Outbound,
14359
+ z.ZodTypeDef,
14360
+ DataUsage
14361
+ > = z.object({
14362
+ completionTokens: z.number().optional(),
14363
+ promptTokens: z.number().optional(),
14364
+ totalTokens: z.number().optional(),
14365
+ promptTokensDetails: z.nullable(
14366
+ z.lazy(() => DataPromptTokensDetails$outboundSchema),
14367
+ ).optional(),
14368
+ completionTokensDetails: z.nullable(
14369
+ z.lazy(() => DataCompletionTokensDetails$outboundSchema),
14370
+ ).optional(),
14371
+ }).transform((v) => {
14372
+ return remap$(v, {
14373
+ completionTokens: "completion_tokens",
14374
+ promptTokens: "prompt_tokens",
14375
+ totalTokens: "total_tokens",
14376
+ promptTokensDetails: "prompt_tokens_details",
14377
+ completionTokensDetails: "completion_tokens_details",
14378
+ });
14379
+ });
14380
+
14381
+ export function dataUsageToJSON(dataUsage: DataUsage): string {
14382
+ return JSON.stringify(DataUsage$outboundSchema.parse(dataUsage));
14383
+ }
14384
+ export function dataUsageFromJSON(
14385
+ jsonString: string,
14386
+ ): SafeParseResult<DataUsage, SDKValidationError> {
14387
+ return safeParse(
14388
+ jsonString,
14389
+ (x) => DataUsage$inboundSchema.parse(JSON.parse(x)),
14390
+ `Failed to parse 'DataUsage' from JSON`,
14391
+ );
14392
+ }
14393
+
12968
14394
  /** @internal */
12969
14395
  export const StreamRunAgentDataAgentsData$inboundSchema: z.ZodType<
12970
14396
  StreamRunAgentDataAgentsData,
@@ -12977,6 +14403,8 @@ export const StreamRunAgentDataAgentsData$inboundSchema: z.ZodType<
12977
14403
  choiceIndex: z.number().optional(),
12978
14404
  iteration: z.number(),
12979
14405
  accumulated_execution_time: z.number(),
14406
+ responseId: z.string().optional(),
14407
+ usage: z.lazy(() => DataUsage$inboundSchema).optional(),
12980
14408
  }).transform((v) => {
12981
14409
  return remap$(v, {
12982
14410
  "agent_id": "agentId",
@@ -12992,6 +14420,8 @@ export type StreamRunAgentDataAgentsData$Outbound = {
12992
14420
  choiceIndex?: number | undefined;
12993
14421
  iteration: number;
12994
14422
  accumulated_execution_time: number;
14423
+ responseId?: string | undefined;
14424
+ usage?: DataUsage$Outbound | undefined;
12995
14425
  };
12996
14426
 
12997
14427
  /** @internal */
@@ -13006,6 +14436,8 @@ export const StreamRunAgentDataAgentsData$outboundSchema: z.ZodType<
13006
14436
  choiceIndex: z.number().optional(),
13007
14437
  iteration: z.number(),
13008
14438
  accumulatedExecutionTime: z.number(),
14439
+ responseId: z.string().optional(),
14440
+ usage: z.lazy(() => DataUsage$outboundSchema).optional(),
13009
14441
  }).transform((v) => {
13010
14442
  return remap$(v, {
13011
14443
  agentId: "agent_id",
@@ -13918,7 +15350,7 @@ export const DataSettings$inboundSchema: z.ZodType<
13918
15350
  z.ZodTypeDef,
13919
15351
  unknown
13920
15352
  > = z.object({
13921
- max_iterations: z.number().int().default(15),
15353
+ max_iterations: z.number().int().default(100),
13922
15354
  max_execution_time: z.number().int().default(300),
13923
15355
  tool_approval_required: DataToolApprovalRequired$inboundSchema.default(
13924
15356
  "respect_tool",
@@ -13950,7 +15382,7 @@ export const DataSettings$outboundSchema: z.ZodType<
13950
15382
  z.ZodTypeDef,
13951
15383
  DataSettings
13952
15384
  > = z.object({
13953
- maxIterations: z.number().int().default(15),
15385
+ maxIterations: z.number().int().default(100),
13954
15386
  maxExecutionTime: z.number().int().default(300),
13955
15387
  toolApprovalRequired: DataToolApprovalRequired$outboundSchema.default(
13956
15388
  "respect_tool",
@@ -13998,6 +15430,7 @@ export const StreamRunAgentDataData$inboundSchema: z.ZodType<
13998
15430
  tool_execution_id: z.string().optional(),
13999
15431
  is_continuation: z.boolean().optional(),
14000
15432
  stream: z.boolean().optional(),
15433
+ responseId: z.string().optional(),
14001
15434
  }).transform((v) => {
14002
15435
  return remap$(v, {
14003
15436
  "integration_id": "integrationId",
@@ -14022,6 +15455,7 @@ export type StreamRunAgentDataData$Outbound = {
14022
15455
  tool_execution_id?: string | undefined;
14023
15456
  is_continuation?: boolean | undefined;
14024
15457
  stream?: boolean | undefined;
15458
+ responseId?: string | undefined;
14025
15459
  };
14026
15460
 
14027
15461
  /** @internal */
@@ -14042,6 +15476,7 @@ export const StreamRunAgentDataData$outboundSchema: z.ZodType<
14042
15476
  toolExecutionId: z.string().optional(),
14043
15477
  isContinuation: z.boolean().optional(),
14044
15478
  stream: z.boolean().optional(),
15479
+ responseId: z.string().optional(),
14045
15480
  }).transform((v) => {
14046
15481
  return remap$(v, {
14047
15482
  integrationId: "integration_id",