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

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 (182) hide show
  1. package/bin/mcp-server.js +37458 -38314
  2. package/bin/mcp-server.js.map +59 -54
  3. package/examples/package-lock.json +1 -1
  4. package/jsr.json +1 -1
  5. package/lib/config.d.ts +2 -2
  6. package/lib/config.js +2 -2
  7. package/mcp-server/mcp-server.js +1 -1
  8. package/mcp-server/server.js +1 -1
  9. package/models/components/datapart.d.ts +41 -0
  10. package/models/components/datapart.d.ts.map +1 -0
  11. package/models/components/datapart.js +69 -0
  12. package/models/components/datapart.js.map +1 -0
  13. package/models/components/filepart.d.ts +104 -0
  14. package/models/components/filepart.d.ts.map +1 -0
  15. package/models/components/filepart.js +134 -0
  16. package/models/components/filepart.js.map +1 -0
  17. package/models/components/index.d.ts +5 -0
  18. package/models/components/index.d.ts.map +1 -1
  19. package/models/components/index.js +5 -0
  20. package/models/components/index.js.map +1 -1
  21. package/models/components/invokedeploymentrequest.d.ts +8 -8
  22. package/models/components/invokedeploymentrequest.d.ts.map +1 -1
  23. package/models/components/invokedeploymentrequest.js +11 -12
  24. package/models/components/invokedeploymentrequest.js.map +1 -1
  25. package/models/components/textpart.d.ts +31 -0
  26. package/models/components/textpart.d.ts.map +1 -0
  27. package/models/components/textpart.js +67 -0
  28. package/models/components/textpart.js.map +1 -0
  29. package/models/components/toolcallpart.d.ts +45 -0
  30. package/models/components/toolcallpart.d.ts.map +1 -0
  31. package/models/components/toolcallpart.js +84 -0
  32. package/models/components/toolcallpart.js.map +1 -0
  33. package/models/components/toolresultpart.d.ts +39 -0
  34. package/models/components/toolresultpart.d.ts.map +1 -0
  35. package/models/components/toolresultpart.js +80 -0
  36. package/models/components/toolresultpart.js.map +1 -0
  37. package/models/operations/createagentresponserequest.d.ts +66 -42
  38. package/models/operations/createagentresponserequest.d.ts.map +1 -1
  39. package/models/operations/createagentresponserequest.js +90 -44
  40. package/models/operations/createagentresponserequest.js.map +1 -1
  41. package/models/operations/createbudget.js +2 -2
  42. package/models/operations/createcontact.js +2 -2
  43. package/models/operations/createdataset.js +2 -2
  44. package/models/operations/createdatasetitem.js +8 -8
  45. package/models/operations/createdatasource.js +2 -2
  46. package/models/operations/createeval.js +28 -28
  47. package/models/operations/createprompt.d.ts +9 -11
  48. package/models/operations/createprompt.d.ts.map +1 -1
  49. package/models/operations/createprompt.js +9 -11
  50. package/models/operations/createprompt.js.map +1 -1
  51. package/models/operations/createtool.js +12 -12
  52. package/models/operations/deploymentinvoke.d.ts +9 -11
  53. package/models/operations/deploymentinvoke.d.ts.map +1 -1
  54. package/models/operations/deploymentinvoke.js +9 -11
  55. package/models/operations/deploymentinvoke.js.map +1 -1
  56. package/models/operations/deployments.d.ts +9 -11
  57. package/models/operations/deployments.d.ts.map +1 -1
  58. package/models/operations/deployments.js +9 -11
  59. package/models/operations/deployments.js.map +1 -1
  60. package/models/operations/deploymentstream.d.ts +9 -11
  61. package/models/operations/deploymentstream.d.ts.map +1 -1
  62. package/models/operations/deploymentstream.js +9 -11
  63. package/models/operations/deploymentstream.js.map +1 -1
  64. package/models/operations/fileget.js +2 -2
  65. package/models/operations/filelist.js +2 -2
  66. package/models/operations/fileupload.js +2 -2
  67. package/models/operations/getallprompts.d.ts +9 -11
  68. package/models/operations/getallprompts.d.ts.map +1 -1
  69. package/models/operations/getallprompts.js +9 -11
  70. package/models/operations/getallprompts.js.map +1 -1
  71. package/models/operations/getalltools.js +12 -12
  72. package/models/operations/getbudget.js +2 -2
  73. package/models/operations/getevals.js +28 -28
  74. package/models/operations/getoneprompt.d.ts +9 -11
  75. package/models/operations/getoneprompt.d.ts.map +1 -1
  76. package/models/operations/getoneprompt.js +9 -11
  77. package/models/operations/getoneprompt.js.map +1 -1
  78. package/models/operations/getpromptversion.d.ts +9 -11
  79. package/models/operations/getpromptversion.d.ts.map +1 -1
  80. package/models/operations/getpromptversion.js +9 -11
  81. package/models/operations/getpromptversion.js.map +1 -1
  82. package/models/operations/invokeagent.d.ts +63 -283
  83. package/models/operations/invokeagent.d.ts.map +1 -1
  84. package/models/operations/invokeagent.js +73 -293
  85. package/models/operations/invokeagent.js.map +1 -1
  86. package/models/operations/listbudgets.js +2 -2
  87. package/models/operations/listcontacts.js +2 -2
  88. package/models/operations/listdatasetdatapoints.js +8 -8
  89. package/models/operations/listdatasets.js +2 -2
  90. package/models/operations/listdatasources.js +2 -2
  91. package/models/operations/listpromptversions.d.ts +9 -11
  92. package/models/operations/listpromptversions.d.ts.map +1 -1
  93. package/models/operations/listpromptversions.js +9 -11
  94. package/models/operations/listpromptversions.js.map +1 -1
  95. package/models/operations/retrievecontact.js +2 -2
  96. package/models/operations/retrievedatapoint.js +8 -8
  97. package/models/operations/retrievedataset.js +2 -2
  98. package/models/operations/retrievedatasource.js +2 -2
  99. package/models/operations/retrievetool.js +12 -12
  100. package/models/operations/runagent.d.ts +59 -279
  101. package/models/operations/runagent.d.ts.map +1 -1
  102. package/models/operations/runagent.js +72 -292
  103. package/models/operations/runagent.js.map +1 -1
  104. package/models/operations/streamagent.d.ts +212 -1003
  105. package/models/operations/streamagent.d.ts.map +1 -1
  106. package/models/operations/streamagent.js +227 -1017
  107. package/models/operations/streamagent.js.map +1 -1
  108. package/models/operations/streamrunagent.d.ts +215 -1006
  109. package/models/operations/streamrunagent.d.ts.map +1 -1
  110. package/models/operations/streamrunagent.js +236 -1026
  111. package/models/operations/streamrunagent.js.map +1 -1
  112. package/models/operations/updatebudget.js +2 -2
  113. package/models/operations/updatecontact.js +2 -2
  114. package/models/operations/updatedatapoint.js +8 -8
  115. package/models/operations/updatedataset.js +2 -2
  116. package/models/operations/updatedatasource.js +2 -2
  117. package/models/operations/updateeval.js +28 -28
  118. package/models/operations/updatememorystore.d.ts +9 -20
  119. package/models/operations/updatememorystore.d.ts.map +1 -1
  120. package/models/operations/updatememorystore.js +9 -14
  121. package/models/operations/updatememorystore.js.map +1 -1
  122. package/models/operations/updateprompt.d.ts +18 -22
  123. package/models/operations/updateprompt.d.ts.map +1 -1
  124. package/models/operations/updateprompt.js +18 -22
  125. package/models/operations/updateprompt.js.map +1 -1
  126. package/models/operations/updatetool.js +14 -14
  127. package/package.json +1 -1
  128. package/src/lib/config.ts +2 -2
  129. package/src/mcp-server/mcp-server.ts +1 -1
  130. package/src/mcp-server/server.ts +1 -1
  131. package/src/models/components/datapart.ts +71 -0
  132. package/src/models/components/filepart.ts +231 -0
  133. package/src/models/components/index.ts +5 -0
  134. package/src/models/components/invokedeploymentrequest.ts +34 -25
  135. package/src/models/components/textpart.ts +68 -0
  136. package/src/models/components/toolcallpart.ts +92 -0
  137. package/src/models/components/toolresultpart.ts +86 -0
  138. package/src/models/operations/createagentresponserequest.ts +188 -95
  139. package/src/models/operations/createbudget.ts +2 -2
  140. package/src/models/operations/createcontact.ts +2 -2
  141. package/src/models/operations/createdataset.ts +2 -2
  142. package/src/models/operations/createdatasetitem.ts +8 -8
  143. package/src/models/operations/createdatasource.ts +2 -2
  144. package/src/models/operations/createeval.ts +28 -28
  145. package/src/models/operations/createprompt.ts +9 -11
  146. package/src/models/operations/createtool.ts +12 -12
  147. package/src/models/operations/deploymentinvoke.ts +9 -11
  148. package/src/models/operations/deployments.ts +9 -11
  149. package/src/models/operations/deploymentstream.ts +9 -11
  150. package/src/models/operations/fileget.ts +2 -2
  151. package/src/models/operations/filelist.ts +2 -2
  152. package/src/models/operations/fileupload.ts +2 -2
  153. package/src/models/operations/getallprompts.ts +9 -11
  154. package/src/models/operations/getalltools.ts +12 -12
  155. package/src/models/operations/getbudget.ts +2 -2
  156. package/src/models/operations/getevals.ts +28 -28
  157. package/src/models/operations/getoneprompt.ts +9 -11
  158. package/src/models/operations/getpromptversion.ts +9 -11
  159. package/src/models/operations/invokeagent.ts +158 -682
  160. package/src/models/operations/listbudgets.ts +2 -2
  161. package/src/models/operations/listcontacts.ts +2 -2
  162. package/src/models/operations/listdatasetdatapoints.ts +8 -8
  163. package/src/models/operations/listdatasets.ts +2 -2
  164. package/src/models/operations/listdatasources.ts +2 -2
  165. package/src/models/operations/listpromptversions.ts +9 -11
  166. package/src/models/operations/retrievecontact.ts +2 -2
  167. package/src/models/operations/retrievedatapoint.ts +8 -8
  168. package/src/models/operations/retrievedataset.ts +2 -2
  169. package/src/models/operations/retrievedatasource.ts +2 -2
  170. package/src/models/operations/retrievetool.ts +12 -12
  171. package/src/models/operations/runagent.ts +143 -697
  172. package/src/models/operations/streamagent.ts +2222 -4559
  173. package/src/models/operations/streamrunagent.ts +2189 -4615
  174. package/src/models/operations/updatebudget.ts +2 -2
  175. package/src/models/operations/updatecontact.ts +2 -2
  176. package/src/models/operations/updatedatapoint.ts +8 -8
  177. package/src/models/operations/updatedataset.ts +2 -2
  178. package/src/models/operations/updatedatasource.ts +2 -2
  179. package/src/models/operations/updateeval.ts +28 -28
  180. package/src/models/operations/updatememorystore.ts +9 -20
  181. package/src/models/operations/updateprompt.ts +18 -22
  182. package/src/models/operations/updatetool.ts +14 -14
@@ -0,0 +1,71 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import { safeParse } from "../../lib/schemas.js";
7
+ import { ClosedEnum } from "../../types/enums.js";
8
+ import { Result as SafeParseResult } from "../../types/fp.js";
9
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
+
11
+ export const DataPartKind = {
12
+ Data: "data",
13
+ } as const;
14
+ export type DataPartKind = ClosedEnum<typeof DataPartKind>;
15
+
16
+ /**
17
+ * A structured data part containing JSON-serializable key-value pairs. Used for passing structured information between agents and tools.
18
+ */
19
+ export type DataPart = {
20
+ kind: DataPartKind;
21
+ data: { [k: string]: any };
22
+ metadata?: { [k: string]: any } | undefined;
23
+ };
24
+
25
+ /** @internal */
26
+ export const DataPartKind$inboundSchema: z.ZodNativeEnum<typeof DataPartKind> =
27
+ z.nativeEnum(DataPartKind);
28
+ /** @internal */
29
+ export const DataPartKind$outboundSchema: z.ZodNativeEnum<typeof DataPartKind> =
30
+ DataPartKind$inboundSchema;
31
+
32
+ /** @internal */
33
+ export const DataPart$inboundSchema: z.ZodType<
34
+ DataPart,
35
+ z.ZodTypeDef,
36
+ unknown
37
+ > = z.object({
38
+ kind: DataPartKind$inboundSchema,
39
+ data: z.record(z.any()),
40
+ metadata: z.record(z.any()).optional(),
41
+ });
42
+ /** @internal */
43
+ export type DataPart$Outbound = {
44
+ kind: string;
45
+ data: { [k: string]: any };
46
+ metadata?: { [k: string]: any } | undefined;
47
+ };
48
+
49
+ /** @internal */
50
+ export const DataPart$outboundSchema: z.ZodType<
51
+ DataPart$Outbound,
52
+ z.ZodTypeDef,
53
+ DataPart
54
+ > = z.object({
55
+ kind: DataPartKind$outboundSchema,
56
+ data: z.record(z.any()),
57
+ metadata: z.record(z.any()).optional(),
58
+ });
59
+
60
+ export function dataPartToJSON(dataPart: DataPart): string {
61
+ return JSON.stringify(DataPart$outboundSchema.parse(dataPart));
62
+ }
63
+ export function dataPartFromJSON(
64
+ jsonString: string,
65
+ ): SafeParseResult<DataPart, SDKValidationError> {
66
+ return safeParse(
67
+ jsonString,
68
+ (x) => DataPart$inboundSchema.parse(JSON.parse(x)),
69
+ `Failed to parse 'DataPart' from JSON`,
70
+ );
71
+ }
@@ -0,0 +1,231 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import { safeParse } from "../../lib/schemas.js";
7
+ import { ClosedEnum } from "../../types/enums.js";
8
+ import { Result as SafeParseResult } from "../../types/fp.js";
9
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
+
11
+ export const FilePartKind = {
12
+ File: "file",
13
+ } as const;
14
+ export type FilePartKind = ClosedEnum<typeof FilePartKind>;
15
+
16
+ /**
17
+ * File in URI format. Check in the model's documentation for the supported mime types for the URI format
18
+ */
19
+ export type FileInURIFormat = {
20
+ /**
21
+ * URL for the File content
22
+ */
23
+ uri: string;
24
+ /**
25
+ * Optional mimeType for the file
26
+ */
27
+ mimeType?: string | undefined;
28
+ /**
29
+ * Optional name for the file
30
+ */
31
+ name?: string | undefined;
32
+ };
33
+
34
+ /**
35
+ * Binary in base64 format. Check in the model's documentation for the supported mime types for the binary format.
36
+ */
37
+ export type BinaryFormat = {
38
+ /**
39
+ * base64 encoded content of the file
40
+ */
41
+ bytes: string;
42
+ /**
43
+ * Optional mimeType for the file
44
+ */
45
+ mimeType?: string | undefined;
46
+ /**
47
+ * Optional name for the file
48
+ */
49
+ name?: string | undefined;
50
+ };
51
+
52
+ export type FileT = BinaryFormat | FileInURIFormat;
53
+
54
+ /**
55
+ * 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.
56
+ */
57
+ export type FilePart = {
58
+ kind: FilePartKind;
59
+ file: BinaryFormat | FileInURIFormat;
60
+ metadata?: { [k: string]: any } | undefined;
61
+ };
62
+
63
+ /** @internal */
64
+ export const FilePartKind$inboundSchema: z.ZodNativeEnum<typeof FilePartKind> =
65
+ z.nativeEnum(FilePartKind);
66
+ /** @internal */
67
+ export const FilePartKind$outboundSchema: z.ZodNativeEnum<typeof FilePartKind> =
68
+ FilePartKind$inboundSchema;
69
+
70
+ /** @internal */
71
+ export const FileInURIFormat$inboundSchema: z.ZodType<
72
+ FileInURIFormat,
73
+ z.ZodTypeDef,
74
+ unknown
75
+ > = z.object({
76
+ uri: z.string(),
77
+ mimeType: z.string().optional(),
78
+ name: z.string().optional(),
79
+ });
80
+ /** @internal */
81
+ export type FileInURIFormat$Outbound = {
82
+ uri: string;
83
+ mimeType?: string | undefined;
84
+ name?: string | undefined;
85
+ };
86
+
87
+ /** @internal */
88
+ export const FileInURIFormat$outboundSchema: z.ZodType<
89
+ FileInURIFormat$Outbound,
90
+ z.ZodTypeDef,
91
+ FileInURIFormat
92
+ > = z.object({
93
+ uri: z.string(),
94
+ mimeType: z.string().optional(),
95
+ name: z.string().optional(),
96
+ });
97
+
98
+ export function fileInURIFormatToJSON(
99
+ fileInURIFormat: FileInURIFormat,
100
+ ): string {
101
+ return JSON.stringify(FileInURIFormat$outboundSchema.parse(fileInURIFormat));
102
+ }
103
+ export function fileInURIFormatFromJSON(
104
+ jsonString: string,
105
+ ): SafeParseResult<FileInURIFormat, SDKValidationError> {
106
+ return safeParse(
107
+ jsonString,
108
+ (x) => FileInURIFormat$inboundSchema.parse(JSON.parse(x)),
109
+ `Failed to parse 'FileInURIFormat' from JSON`,
110
+ );
111
+ }
112
+
113
+ /** @internal */
114
+ export const BinaryFormat$inboundSchema: z.ZodType<
115
+ BinaryFormat,
116
+ z.ZodTypeDef,
117
+ unknown
118
+ > = z.object({
119
+ bytes: z.string(),
120
+ mimeType: z.string().optional(),
121
+ name: z.string().optional(),
122
+ });
123
+ /** @internal */
124
+ export type BinaryFormat$Outbound = {
125
+ bytes: string;
126
+ mimeType?: string | undefined;
127
+ name?: string | undefined;
128
+ };
129
+
130
+ /** @internal */
131
+ export const BinaryFormat$outboundSchema: z.ZodType<
132
+ BinaryFormat$Outbound,
133
+ z.ZodTypeDef,
134
+ BinaryFormat
135
+ > = z.object({
136
+ bytes: z.string(),
137
+ mimeType: z.string().optional(),
138
+ name: z.string().optional(),
139
+ });
140
+
141
+ export function binaryFormatToJSON(binaryFormat: BinaryFormat): string {
142
+ return JSON.stringify(BinaryFormat$outboundSchema.parse(binaryFormat));
143
+ }
144
+ export function binaryFormatFromJSON(
145
+ jsonString: string,
146
+ ): SafeParseResult<BinaryFormat, SDKValidationError> {
147
+ return safeParse(
148
+ jsonString,
149
+ (x) => BinaryFormat$inboundSchema.parse(JSON.parse(x)),
150
+ `Failed to parse 'BinaryFormat' from JSON`,
151
+ );
152
+ }
153
+
154
+ /** @internal */
155
+ export const FileT$inboundSchema: z.ZodType<FileT, z.ZodTypeDef, unknown> = z
156
+ .union([
157
+ z.lazy(() => BinaryFormat$inboundSchema),
158
+ z.lazy(() => FileInURIFormat$inboundSchema),
159
+ ]);
160
+ /** @internal */
161
+ export type FileT$Outbound = BinaryFormat$Outbound | FileInURIFormat$Outbound;
162
+
163
+ /** @internal */
164
+ export const FileT$outboundSchema: z.ZodType<
165
+ FileT$Outbound,
166
+ z.ZodTypeDef,
167
+ FileT
168
+ > = z.union([
169
+ z.lazy(() => BinaryFormat$outboundSchema),
170
+ z.lazy(() => FileInURIFormat$outboundSchema),
171
+ ]);
172
+
173
+ export function fileToJSON(fileT: FileT): string {
174
+ return JSON.stringify(FileT$outboundSchema.parse(fileT));
175
+ }
176
+ export function fileFromJSON(
177
+ jsonString: string,
178
+ ): SafeParseResult<FileT, SDKValidationError> {
179
+ return safeParse(
180
+ jsonString,
181
+ (x) => FileT$inboundSchema.parse(JSON.parse(x)),
182
+ `Failed to parse 'FileT' from JSON`,
183
+ );
184
+ }
185
+
186
+ /** @internal */
187
+ export const FilePart$inboundSchema: z.ZodType<
188
+ FilePart,
189
+ z.ZodTypeDef,
190
+ unknown
191
+ > = z.object({
192
+ kind: FilePartKind$inboundSchema,
193
+ file: z.union([
194
+ z.lazy(() => BinaryFormat$inboundSchema),
195
+ z.lazy(() => FileInURIFormat$inboundSchema),
196
+ ]),
197
+ metadata: z.record(z.any()).optional(),
198
+ });
199
+ /** @internal */
200
+ export type FilePart$Outbound = {
201
+ kind: string;
202
+ file: BinaryFormat$Outbound | FileInURIFormat$Outbound;
203
+ metadata?: { [k: string]: any } | undefined;
204
+ };
205
+
206
+ /** @internal */
207
+ export const FilePart$outboundSchema: z.ZodType<
208
+ FilePart$Outbound,
209
+ z.ZodTypeDef,
210
+ FilePart
211
+ > = z.object({
212
+ kind: FilePartKind$outboundSchema,
213
+ file: z.union([
214
+ z.lazy(() => BinaryFormat$outboundSchema),
215
+ z.lazy(() => FileInURIFormat$outboundSchema),
216
+ ]),
217
+ metadata: z.record(z.any()).optional(),
218
+ });
219
+
220
+ export function filePartToJSON(filePart: FilePart): string {
221
+ return JSON.stringify(FilePart$outboundSchema.parse(filePart));
222
+ }
223
+ export function filePartFromJSON(
224
+ jsonString: string,
225
+ ): SafeParseResult<FilePart, SDKValidationError> {
226
+ return safeParse(
227
+ jsonString,
228
+ (x) => FilePart$inboundSchema.parse(JSON.parse(x)),
229
+ `Failed to parse 'FilePart' from JSON`,
230
+ );
231
+ }
@@ -2,5 +2,10 @@
2
2
  * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
3
  */
4
4
 
5
+ export * from "./datapart.js";
6
+ export * from "./filepart.js";
5
7
  export * from "./invokedeploymentrequest.js";
6
8
  export * from "./security.js";
9
+ export * from "./textpart.js";
10
+ export * from "./toolcallpart.js";
11
+ export * from "./toolresultpart.js";
@@ -273,7 +273,7 @@ export type InvokeDeploymentRequest2PrefixMessagesType = ClosedEnum<
273
273
  /**
274
274
  * File data for the content part. Must contain either file_data or uri, but not both.
275
275
  */
276
- export type FileT = {
276
+ export type InvokeDeploymentRequest2File = {
277
277
  /**
278
278
  * The file data as a data URI string in the format 'data:<mime-type>;base64,<base64-encoded-data>'. Example: 'data:image/png;base64,iVBORw0KGgoAAAANS...'
279
279
  */
@@ -300,7 +300,7 @@ export type Four = {
300
300
  /**
301
301
  * File data for the content part. Must contain either file_data or uri, but not both.
302
302
  */
303
- file: FileT;
303
+ file: InvokeDeploymentRequest2File;
304
304
  };
305
305
 
306
306
  export const InvokeDeploymentRequest2Type = {
@@ -2156,19 +2156,22 @@ export const InvokeDeploymentRequest2PrefixMessagesType$outboundSchema:
2156
2156
  InvokeDeploymentRequest2PrefixMessagesType$inboundSchema;
2157
2157
 
2158
2158
  /** @internal */
2159
- export const FileT$inboundSchema: z.ZodType<FileT, z.ZodTypeDef, unknown> = z
2160
- .object({
2161
- file_data: z.string().optional(),
2162
- uri: z.string().optional(),
2163
- mimeType: z.string().optional(),
2164
- filename: z.string().optional(),
2165
- }).transform((v) => {
2166
- return remap$(v, {
2167
- "file_data": "fileData",
2168
- });
2159
+ export const InvokeDeploymentRequest2File$inboundSchema: z.ZodType<
2160
+ InvokeDeploymentRequest2File,
2161
+ z.ZodTypeDef,
2162
+ unknown
2163
+ > = z.object({
2164
+ file_data: z.string().optional(),
2165
+ uri: z.string().optional(),
2166
+ mimeType: z.string().optional(),
2167
+ filename: z.string().optional(),
2168
+ }).transform((v) => {
2169
+ return remap$(v, {
2170
+ "file_data": "fileData",
2169
2171
  });
2172
+ });
2170
2173
  /** @internal */
2171
- export type FileT$Outbound = {
2174
+ export type InvokeDeploymentRequest2File$Outbound = {
2172
2175
  file_data?: string | undefined;
2173
2176
  uri?: string | undefined;
2174
2177
  mimeType?: string | undefined;
@@ -2176,10 +2179,10 @@ export type FileT$Outbound = {
2176
2179
  };
2177
2180
 
2178
2181
  /** @internal */
2179
- export const FileT$outboundSchema: z.ZodType<
2180
- FileT$Outbound,
2182
+ export const InvokeDeploymentRequest2File$outboundSchema: z.ZodType<
2183
+ InvokeDeploymentRequest2File$Outbound,
2181
2184
  z.ZodTypeDef,
2182
- FileT
2185
+ InvokeDeploymentRequest2File
2183
2186
  > = z.object({
2184
2187
  fileData: z.string().optional(),
2185
2188
  uri: z.string().optional(),
@@ -2191,16 +2194,22 @@ export const FileT$outboundSchema: z.ZodType<
2191
2194
  });
2192
2195
  });
2193
2196
 
2194
- export function fileToJSON(fileT: FileT): string {
2195
- return JSON.stringify(FileT$outboundSchema.parse(fileT));
2197
+ export function invokeDeploymentRequest2FileToJSON(
2198
+ invokeDeploymentRequest2File: InvokeDeploymentRequest2File,
2199
+ ): string {
2200
+ return JSON.stringify(
2201
+ InvokeDeploymentRequest2File$outboundSchema.parse(
2202
+ invokeDeploymentRequest2File,
2203
+ ),
2204
+ );
2196
2205
  }
2197
- export function fileFromJSON(
2206
+ export function invokeDeploymentRequest2FileFromJSON(
2198
2207
  jsonString: string,
2199
- ): SafeParseResult<FileT, SDKValidationError> {
2208
+ ): SafeParseResult<InvokeDeploymentRequest2File, SDKValidationError> {
2200
2209
  return safeParse(
2201
2210
  jsonString,
2202
- (x) => FileT$inboundSchema.parse(JSON.parse(x)),
2203
- `Failed to parse 'FileT' from JSON`,
2211
+ (x) => InvokeDeploymentRequest2File$inboundSchema.parse(JSON.parse(x)),
2212
+ `Failed to parse 'InvokeDeploymentRequest2File' from JSON`,
2204
2213
  );
2205
2214
  }
2206
2215
 
@@ -2208,19 +2217,19 @@ export function fileFromJSON(
2208
2217
  export const Four$inboundSchema: z.ZodType<Four, z.ZodTypeDef, unknown> = z
2209
2218
  .object({
2210
2219
  type: InvokeDeploymentRequest2PrefixMessagesType$inboundSchema,
2211
- file: z.lazy(() => FileT$inboundSchema),
2220
+ file: z.lazy(() => InvokeDeploymentRequest2File$inboundSchema),
2212
2221
  });
2213
2222
  /** @internal */
2214
2223
  export type Four$Outbound = {
2215
2224
  type: string;
2216
- file: FileT$Outbound;
2225
+ file: InvokeDeploymentRequest2File$Outbound;
2217
2226
  };
2218
2227
 
2219
2228
  /** @internal */
2220
2229
  export const Four$outboundSchema: z.ZodType<Four$Outbound, z.ZodTypeDef, Four> =
2221
2230
  z.object({
2222
2231
  type: InvokeDeploymentRequest2PrefixMessagesType$outboundSchema,
2223
- file: z.lazy(() => FileT$outboundSchema),
2232
+ file: z.lazy(() => InvokeDeploymentRequest2File$outboundSchema),
2224
2233
  });
2225
2234
 
2226
2235
  export function fourToJSON(four: Four): string {
@@ -0,0 +1,68 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import { safeParse } from "../../lib/schemas.js";
7
+ import { ClosedEnum } from "../../types/enums.js";
8
+ import { Result as SafeParseResult } from "../../types/fp.js";
9
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
+
11
+ export const Kind = {
12
+ Text: "text",
13
+ } as const;
14
+ export type Kind = ClosedEnum<typeof Kind>;
15
+
16
+ /**
17
+ * Text content part. Use this to send text messages to the agent.
18
+ */
19
+ export type TextPart = {
20
+ kind: Kind;
21
+ text: string;
22
+ };
23
+
24
+ /** @internal */
25
+ export const Kind$inboundSchema: z.ZodNativeEnum<typeof Kind> = z.nativeEnum(
26
+ Kind,
27
+ );
28
+ /** @internal */
29
+ export const Kind$outboundSchema: z.ZodNativeEnum<typeof Kind> =
30
+ Kind$inboundSchema;
31
+
32
+ /** @internal */
33
+ export const TextPart$inboundSchema: z.ZodType<
34
+ TextPart,
35
+ z.ZodTypeDef,
36
+ unknown
37
+ > = z.object({
38
+ kind: Kind$inboundSchema,
39
+ text: z.string(),
40
+ });
41
+ /** @internal */
42
+ export type TextPart$Outbound = {
43
+ kind: string;
44
+ text: string;
45
+ };
46
+
47
+ /** @internal */
48
+ export const TextPart$outboundSchema: z.ZodType<
49
+ TextPart$Outbound,
50
+ z.ZodTypeDef,
51
+ TextPart
52
+ > = z.object({
53
+ kind: Kind$outboundSchema,
54
+ text: z.string(),
55
+ });
56
+
57
+ export function textPartToJSON(textPart: TextPart): string {
58
+ return JSON.stringify(TextPart$outboundSchema.parse(textPart));
59
+ }
60
+ export function textPartFromJSON(
61
+ jsonString: string,
62
+ ): SafeParseResult<TextPart, SDKValidationError> {
63
+ return safeParse(
64
+ jsonString,
65
+ (x) => TextPart$inboundSchema.parse(JSON.parse(x)),
66
+ `Failed to parse 'TextPart' from JSON`,
67
+ );
68
+ }
@@ -0,0 +1,92 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import { remap as remap$ } from "../../lib/primitives.js";
7
+ import { safeParse } from "../../lib/schemas.js";
8
+ import { ClosedEnum } from "../../types/enums.js";
9
+ import { Result as SafeParseResult } from "../../types/fp.js";
10
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
11
+
12
+ export const ToolCallPartKind = {
13
+ ToolCall: "tool_call",
14
+ } as const;
15
+ export type ToolCallPartKind = ClosedEnum<typeof ToolCallPartKind>;
16
+
17
+ /**
18
+ * A tool invocation request from an agent. Contains the tool name, unique call ID, and arguments for the tool execution.
19
+ */
20
+ export type ToolCallPart = {
21
+ kind: ToolCallPartKind;
22
+ toolName: string;
23
+ toolCallId: string;
24
+ arguments: { [k: string]: any };
25
+ metadata?: { [k: string]: any } | undefined;
26
+ };
27
+
28
+ /** @internal */
29
+ export const ToolCallPartKind$inboundSchema: z.ZodNativeEnum<
30
+ typeof ToolCallPartKind
31
+ > = z.nativeEnum(ToolCallPartKind);
32
+ /** @internal */
33
+ export const ToolCallPartKind$outboundSchema: z.ZodNativeEnum<
34
+ typeof ToolCallPartKind
35
+ > = ToolCallPartKind$inboundSchema;
36
+
37
+ /** @internal */
38
+ export const ToolCallPart$inboundSchema: z.ZodType<
39
+ ToolCallPart,
40
+ z.ZodTypeDef,
41
+ unknown
42
+ > = z.object({
43
+ kind: ToolCallPartKind$inboundSchema,
44
+ tool_name: z.string(),
45
+ tool_call_id: z.string(),
46
+ arguments: z.record(z.any()),
47
+ metadata: z.record(z.any()).optional(),
48
+ }).transform((v) => {
49
+ return remap$(v, {
50
+ "tool_name": "toolName",
51
+ "tool_call_id": "toolCallId",
52
+ });
53
+ });
54
+ /** @internal */
55
+ export type ToolCallPart$Outbound = {
56
+ kind: string;
57
+ tool_name: string;
58
+ tool_call_id: string;
59
+ arguments: { [k: string]: any };
60
+ metadata?: { [k: string]: any } | undefined;
61
+ };
62
+
63
+ /** @internal */
64
+ export const ToolCallPart$outboundSchema: z.ZodType<
65
+ ToolCallPart$Outbound,
66
+ z.ZodTypeDef,
67
+ ToolCallPart
68
+ > = z.object({
69
+ kind: ToolCallPartKind$outboundSchema,
70
+ toolName: z.string(),
71
+ toolCallId: z.string(),
72
+ arguments: z.record(z.any()),
73
+ metadata: z.record(z.any()).optional(),
74
+ }).transform((v) => {
75
+ return remap$(v, {
76
+ toolName: "tool_name",
77
+ toolCallId: "tool_call_id",
78
+ });
79
+ });
80
+
81
+ export function toolCallPartToJSON(toolCallPart: ToolCallPart): string {
82
+ return JSON.stringify(ToolCallPart$outboundSchema.parse(toolCallPart));
83
+ }
84
+ export function toolCallPartFromJSON(
85
+ jsonString: string,
86
+ ): SafeParseResult<ToolCallPart, SDKValidationError> {
87
+ return safeParse(
88
+ jsonString,
89
+ (x) => ToolCallPart$inboundSchema.parse(JSON.parse(x)),
90
+ `Failed to parse 'ToolCallPart' from JSON`,
91
+ );
92
+ }
@@ -0,0 +1,86 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import { remap as remap$ } from "../../lib/primitives.js";
7
+ import { safeParse } from "../../lib/schemas.js";
8
+ import { ClosedEnum } from "../../types/enums.js";
9
+ import { Result as SafeParseResult } from "../../types/fp.js";
10
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
11
+
12
+ export const ToolResultPartKind = {
13
+ ToolResult: "tool_result",
14
+ } as const;
15
+ export type ToolResultPartKind = ClosedEnum<typeof ToolResultPartKind>;
16
+
17
+ /**
18
+ * The result of a tool execution. Contains the tool call ID for correlation and the result data from the tool invocation.
19
+ */
20
+ export type ToolResultPart = {
21
+ kind: ToolResultPartKind;
22
+ toolCallId: string;
23
+ result?: any | undefined;
24
+ metadata?: { [k: string]: any } | undefined;
25
+ };
26
+
27
+ /** @internal */
28
+ export const ToolResultPartKind$inboundSchema: z.ZodNativeEnum<
29
+ typeof ToolResultPartKind
30
+ > = z.nativeEnum(ToolResultPartKind);
31
+ /** @internal */
32
+ export const ToolResultPartKind$outboundSchema: z.ZodNativeEnum<
33
+ typeof ToolResultPartKind
34
+ > = ToolResultPartKind$inboundSchema;
35
+
36
+ /** @internal */
37
+ export const ToolResultPart$inboundSchema: z.ZodType<
38
+ ToolResultPart,
39
+ z.ZodTypeDef,
40
+ unknown
41
+ > = z.object({
42
+ kind: ToolResultPartKind$inboundSchema,
43
+ tool_call_id: z.string(),
44
+ result: z.any().optional(),
45
+ metadata: z.record(z.any()).optional(),
46
+ }).transform((v) => {
47
+ return remap$(v, {
48
+ "tool_call_id": "toolCallId",
49
+ });
50
+ });
51
+ /** @internal */
52
+ export type ToolResultPart$Outbound = {
53
+ kind: string;
54
+ tool_call_id: string;
55
+ result?: any | undefined;
56
+ metadata?: { [k: string]: any } | undefined;
57
+ };
58
+
59
+ /** @internal */
60
+ export const ToolResultPart$outboundSchema: z.ZodType<
61
+ ToolResultPart$Outbound,
62
+ z.ZodTypeDef,
63
+ ToolResultPart
64
+ > = z.object({
65
+ kind: ToolResultPartKind$outboundSchema,
66
+ toolCallId: z.string(),
67
+ result: z.any().optional(),
68
+ metadata: z.record(z.any()).optional(),
69
+ }).transform((v) => {
70
+ return remap$(v, {
71
+ toolCallId: "tool_call_id",
72
+ });
73
+ });
74
+
75
+ export function toolResultPartToJSON(toolResultPart: ToolResultPart): string {
76
+ return JSON.stringify(ToolResultPart$outboundSchema.parse(toolResultPart));
77
+ }
78
+ export function toolResultPartFromJSON(
79
+ jsonString: string,
80
+ ): SafeParseResult<ToolResultPart, SDKValidationError> {
81
+ return safeParse(
82
+ jsonString,
83
+ (x) => ToolResultPart$inboundSchema.parse(JSON.parse(x)),
84
+ `Failed to parse 'ToolResultPart' from JSON`,
85
+ );
86
+ }