@orq-ai/node 4.0.9 → 4.0.11

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 (220) hide show
  1. package/bin/mcp-server.js +37004 -37979
  2. package/bin/mcp-server.js.map +49 -44
  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/lib/config.js.map +1 -1
  8. package/mcp-server/mcp-server.js +1 -1
  9. package/mcp-server/mcp-server.js.map +1 -1
  10. package/mcp-server/server.js +1 -1
  11. package/mcp-server/server.js.map +1 -1
  12. package/models/components/datapart.d.ts +41 -0
  13. package/models/components/datapart.d.ts.map +1 -0
  14. package/models/components/datapart.js +69 -0
  15. package/models/components/datapart.js.map +1 -0
  16. package/models/components/filepart.d.ts +104 -0
  17. package/models/components/filepart.d.ts.map +1 -0
  18. package/models/components/filepart.js +134 -0
  19. package/models/components/filepart.js.map +1 -0
  20. package/models/components/index.d.ts +5 -0
  21. package/models/components/index.d.ts.map +1 -1
  22. package/models/components/index.js +5 -0
  23. package/models/components/index.js.map +1 -1
  24. package/models/components/invokedeploymentrequest.d.ts +8 -8
  25. package/models/components/invokedeploymentrequest.d.ts.map +1 -1
  26. package/models/components/invokedeploymentrequest.js +11 -12
  27. package/models/components/invokedeploymentrequest.js.map +1 -1
  28. package/models/components/textpart.d.ts +31 -0
  29. package/models/components/textpart.d.ts.map +1 -0
  30. package/models/components/textpart.js +67 -0
  31. package/models/components/textpart.js.map +1 -0
  32. package/models/components/toolcallpart.d.ts +45 -0
  33. package/models/components/toolcallpart.d.ts.map +1 -0
  34. package/models/components/toolcallpart.js +84 -0
  35. package/models/components/toolcallpart.js.map +1 -0
  36. package/models/components/toolresultpart.d.ts +39 -0
  37. package/models/components/toolresultpart.d.ts.map +1 -0
  38. package/models/components/toolresultpart.js +80 -0
  39. package/models/components/toolresultpart.js.map +1 -0
  40. package/models/operations/createagentresponserequest.d.ts +66 -42
  41. package/models/operations/createagentresponserequest.d.ts.map +1 -1
  42. package/models/operations/createagentresponserequest.js +90 -44
  43. package/models/operations/createagentresponserequest.js.map +1 -1
  44. package/models/operations/createbudget.js +2 -2
  45. package/models/operations/createcontact.js +2 -2
  46. package/models/operations/createdataset.js +2 -2
  47. package/models/operations/createdatasetitem.js +8 -8
  48. package/models/operations/createdatasource.js +2 -2
  49. package/models/operations/createeval.d.ts +14 -79
  50. package/models/operations/createeval.d.ts.map +1 -1
  51. package/models/operations/createeval.js +51 -134
  52. package/models/operations/createeval.js.map +1 -1
  53. package/models/operations/createtool.js +12 -12
  54. package/models/operations/fileget.js +2 -2
  55. package/models/operations/filelist.js +2 -2
  56. package/models/operations/fileupload.js +2 -2
  57. package/models/operations/getalltools.js +12 -12
  58. package/models/operations/getbudget.js +2 -2
  59. package/models/operations/getevals.d.ts +14 -79
  60. package/models/operations/getevals.d.ts.map +1 -1
  61. package/models/operations/getevals.js +49 -132
  62. package/models/operations/getevals.js.map +1 -1
  63. package/models/operations/invokeagent.d.ts +63 -283
  64. package/models/operations/invokeagent.d.ts.map +1 -1
  65. package/models/operations/invokeagent.js +73 -293
  66. package/models/operations/invokeagent.js.map +1 -1
  67. package/models/operations/listbudgets.js +2 -2
  68. package/models/operations/listcontacts.js +2 -2
  69. package/models/operations/listdatasetdatapoints.js +8 -8
  70. package/models/operations/listdatasets.js +2 -2
  71. package/models/operations/listdatasources.js +2 -2
  72. package/models/operations/retrievecontact.js +2 -2
  73. package/models/operations/retrievedatapoint.js +8 -8
  74. package/models/operations/retrievedataset.js +2 -2
  75. package/models/operations/retrievedatasource.js +2 -2
  76. package/models/operations/retrievetool.js +12 -12
  77. package/models/operations/runagent.d.ts +59 -279
  78. package/models/operations/runagent.d.ts.map +1 -1
  79. package/models/operations/runagent.js +72 -292
  80. package/models/operations/runagent.js.map +1 -1
  81. package/models/operations/streamagent.d.ts +212 -1003
  82. package/models/operations/streamagent.d.ts.map +1 -1
  83. package/models/operations/streamagent.js +227 -1017
  84. package/models/operations/streamagent.js.map +1 -1
  85. package/models/operations/streamrunagent.d.ts +215 -1006
  86. package/models/operations/streamrunagent.d.ts.map +1 -1
  87. package/models/operations/streamrunagent.js +236 -1026
  88. package/models/operations/streamrunagent.js.map +1 -1
  89. package/models/operations/updatebudget.js +2 -2
  90. package/models/operations/updatecontact.js +2 -2
  91. package/models/operations/updatedatapoint.js +8 -8
  92. package/models/operations/updatedataset.js +2 -2
  93. package/models/operations/updatedatasource.js +2 -2
  94. package/models/operations/updateeval.d.ts +14 -79
  95. package/models/operations/updateeval.d.ts.map +1 -1
  96. package/models/operations/updateeval.js +51 -134
  97. package/models/operations/updateeval.js.map +1 -1
  98. package/models/operations/updatetool.js +14 -14
  99. package/package.json +1 -1
  100. package/packages/orq-rc/docs/sdks/agents/README.md +10 -10
  101. package/packages/orq-rc/docs/sdks/responses/README.md +5 -5
  102. package/packages/orq-rc/examples/package-lock.json +1 -1
  103. package/packages/orq-rc/jsr.json +1 -1
  104. package/packages/orq-rc/package-lock.json +2 -2
  105. package/packages/orq-rc/package.json +1 -1
  106. package/packages/orq-rc/src/funcs/agentsCreate.ts +4 -8
  107. package/packages/orq-rc/src/funcs/agentsResponsesCreate.ts +4 -4
  108. package/packages/orq-rc/src/funcs/agentsRun.ts +4 -7
  109. package/packages/orq-rc/src/funcs/agentsStream.ts +4 -4
  110. package/packages/orq-rc/src/funcs/agentsStreamRun.ts +4 -9
  111. package/packages/orq-rc/src/funcs/agentsUpdate.ts +4 -4
  112. package/packages/orq-rc/src/lib/config.ts +2 -2
  113. package/packages/orq-rc/src/mcp-server/mcp-server.ts +1 -1
  114. package/packages/orq-rc/src/mcp-server/server.ts +1 -1
  115. package/packages/orq-rc/src/mcp-server/tools/agentsCreate.ts +1 -1
  116. package/packages/orq-rc/src/mcp-server/tools/agentsResponsesCreate.ts +2 -3
  117. package/packages/orq-rc/src/mcp-server/tools/agentsRun.ts +1 -1
  118. package/packages/orq-rc/src/mcp-server/tools/agentsStream.ts +2 -2
  119. package/packages/orq-rc/src/mcp-server/tools/agentsStreamRun.ts +1 -1
  120. package/packages/orq-rc/src/mcp-server/tools/agentsUpdate.ts +2 -3
  121. package/packages/orq-rc/src/models/components/datapart.ts +71 -0
  122. package/packages/orq-rc/src/models/components/filepart.ts +231 -0
  123. package/packages/orq-rc/src/models/components/index.ts +5 -0
  124. package/packages/orq-rc/src/models/components/invokedeploymentrequest.ts +34 -25
  125. package/packages/orq-rc/src/models/components/textpart.ts +68 -0
  126. package/packages/orq-rc/src/models/components/toolcallpart.ts +92 -0
  127. package/packages/orq-rc/src/models/components/toolresultpart.ts +86 -0
  128. package/packages/orq-rc/src/models/operations/createagentresponserequest.ts +194 -100
  129. package/packages/orq-rc/src/models/operations/createbudget.ts +2 -2
  130. package/packages/orq-rc/src/models/operations/createcontact.ts +2 -2
  131. package/packages/orq-rc/src/models/operations/createdataset.ts +2 -2
  132. package/packages/orq-rc/src/models/operations/createdatasetitem.ts +8 -8
  133. package/packages/orq-rc/src/models/operations/createdatasource.ts +2 -2
  134. package/packages/orq-rc/src/models/operations/createeval.ts +28 -28
  135. package/packages/orq-rc/src/models/operations/createprompt.ts +9 -11
  136. package/packages/orq-rc/src/models/operations/createtool.ts +12 -12
  137. package/packages/orq-rc/src/models/operations/deploymentinvoke.ts +9 -11
  138. package/packages/orq-rc/src/models/operations/deployments.ts +9 -11
  139. package/packages/orq-rc/src/models/operations/deploymentstream.ts +9 -11
  140. package/packages/orq-rc/src/models/operations/fileget.ts +2 -2
  141. package/packages/orq-rc/src/models/operations/filelist.ts +2 -2
  142. package/packages/orq-rc/src/models/operations/fileupload.ts +2 -2
  143. package/packages/orq-rc/src/models/operations/getallprompts.ts +9 -11
  144. package/packages/orq-rc/src/models/operations/getalltools.ts +12 -12
  145. package/packages/orq-rc/src/models/operations/getbudget.ts +2 -2
  146. package/packages/orq-rc/src/models/operations/getevals.ts +28 -28
  147. package/packages/orq-rc/src/models/operations/getoneprompt.ts +9 -11
  148. package/packages/orq-rc/src/models/operations/getpromptversion.ts +9 -11
  149. package/packages/orq-rc/src/models/operations/invokeagent.ts +158 -682
  150. package/packages/orq-rc/src/models/operations/listbudgets.ts +2 -2
  151. package/packages/orq-rc/src/models/operations/listcontacts.ts +2 -2
  152. package/packages/orq-rc/src/models/operations/listdatasetdatapoints.ts +8 -8
  153. package/packages/orq-rc/src/models/operations/listdatasets.ts +2 -2
  154. package/packages/orq-rc/src/models/operations/listdatasources.ts +2 -2
  155. package/packages/orq-rc/src/models/operations/listpromptversions.ts +9 -11
  156. package/packages/orq-rc/src/models/operations/retrievecontact.ts +2 -2
  157. package/packages/orq-rc/src/models/operations/retrievedatapoint.ts +8 -8
  158. package/packages/orq-rc/src/models/operations/retrievedataset.ts +2 -2
  159. package/packages/orq-rc/src/models/operations/retrievedatasource.ts +2 -2
  160. package/packages/orq-rc/src/models/operations/retrievetool.ts +12 -12
  161. package/packages/orq-rc/src/models/operations/runagent.ts +143 -697
  162. package/packages/orq-rc/src/models/operations/streamagent.ts +2226 -4563
  163. package/packages/orq-rc/src/models/operations/streamrunagent.ts +2189 -4615
  164. package/packages/orq-rc/src/models/operations/updateagent.ts +4 -6
  165. package/packages/orq-rc/src/models/operations/updatebudget.ts +2 -2
  166. package/packages/orq-rc/src/models/operations/updatecontact.ts +2 -2
  167. package/packages/orq-rc/src/models/operations/updatedatapoint.ts +8 -8
  168. package/packages/orq-rc/src/models/operations/updatedataset.ts +2 -2
  169. package/packages/orq-rc/src/models/operations/updatedatasource.ts +2 -2
  170. package/packages/orq-rc/src/models/operations/updateeval.ts +28 -28
  171. package/packages/orq-rc/src/models/operations/updatememorystore.ts +9 -20
  172. package/packages/orq-rc/src/models/operations/updateprompt.ts +18 -22
  173. package/packages/orq-rc/src/models/operations/updatetool.ts +14 -14
  174. package/packages/orq-rc/src/sdk/agents.ts +7 -7
  175. package/packages/orq-rc/src/sdk/responses.ts +2 -2
  176. package/src/lib/config.ts +2 -2
  177. package/src/mcp-server/mcp-server.ts +1 -1
  178. package/src/mcp-server/server.ts +1 -1
  179. package/src/models/components/datapart.ts +71 -0
  180. package/src/models/components/filepart.ts +231 -0
  181. package/src/models/components/index.ts +5 -0
  182. package/src/models/components/invokedeploymentrequest.ts +34 -25
  183. package/src/models/components/textpart.ts +68 -0
  184. package/src/models/components/toolcallpart.ts +92 -0
  185. package/src/models/components/toolresultpart.ts +86 -0
  186. package/src/models/operations/createagentresponserequest.ts +188 -95
  187. package/src/models/operations/createbudget.ts +2 -2
  188. package/src/models/operations/createcontact.ts +2 -2
  189. package/src/models/operations/createdataset.ts +2 -2
  190. package/src/models/operations/createdatasetitem.ts +8 -8
  191. package/src/models/operations/createdatasource.ts +2 -2
  192. package/src/models/operations/createeval.ts +52 -275
  193. package/src/models/operations/createtool.ts +12 -12
  194. package/src/models/operations/fileget.ts +2 -2
  195. package/src/models/operations/filelist.ts +2 -2
  196. package/src/models/operations/fileupload.ts +2 -2
  197. package/src/models/operations/getalltools.ts +12 -12
  198. package/src/models/operations/getbudget.ts +2 -2
  199. package/src/models/operations/getevals.ts +52 -287
  200. package/src/models/operations/invokeagent.ts +158 -682
  201. package/src/models/operations/listbudgets.ts +2 -2
  202. package/src/models/operations/listcontacts.ts +2 -2
  203. package/src/models/operations/listdatasetdatapoints.ts +8 -8
  204. package/src/models/operations/listdatasets.ts +2 -2
  205. package/src/models/operations/listdatasources.ts +2 -2
  206. package/src/models/operations/retrievecontact.ts +2 -2
  207. package/src/models/operations/retrievedatapoint.ts +8 -8
  208. package/src/models/operations/retrievedataset.ts +2 -2
  209. package/src/models/operations/retrievedatasource.ts +2 -2
  210. package/src/models/operations/retrievetool.ts +12 -12
  211. package/src/models/operations/runagent.ts +143 -697
  212. package/src/models/operations/streamagent.ts +2222 -4559
  213. package/src/models/operations/streamrunagent.ts +2189 -4615
  214. package/src/models/operations/updatebudget.ts +2 -2
  215. package/src/models/operations/updatecontact.ts +2 -2
  216. package/src/models/operations/updatedatapoint.ts +8 -8
  217. package/src/models/operations/updatedataset.ts +2 -2
  218. package/src/models/operations/updatedatasource.ts +2 -2
  219. package/src/models/operations/updateeval.ts +52 -287
  220. package/src/models/operations/updatetool.ts +14 -14
@@ -15,14 +15,14 @@ export class Responses extends ClientSDK {
15
15
  * Initiates an agent conversation and returns a complete response. This endpoint manages the full lifecycle of an agent interaction, from receiving the initial message through all processing steps until completion. Supports synchronous execution (waits for completion) and asynchronous execution (returns immediately with task ID). The response includes all messages exchanged, tool calls made, and token usage statistics. Ideal for request-response patterns where you need the complete interaction result.
16
16
  */
17
17
  async create(
18
+ requestBody: operations.CreateAgentResponseRequestRequestBody,
18
19
  agentKey: string,
19
- requestBody?: operations.CreateAgentResponseRequestRequestBody | undefined,
20
20
  options?: RequestOptions,
21
21
  ): Promise<operations.CreateAgentResponseRequestResponseBody> {
22
22
  return unwrapAsync(agentsResponsesCreate(
23
23
  this,
24
- agentKey,
25
24
  requestBody,
25
+ agentKey,
26
26
  options,
27
27
  ));
28
28
  }
package/src/lib/config.ts CHANGED
@@ -68,7 +68,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
68
68
  export const SDK_METADATA = {
69
69
  language: "typescript",
70
70
  openapiDocVersion: "2.0",
71
- sdkVersion: "4.0.9",
71
+ sdkVersion: "4.0.11",
72
72
  genVersion: "2.760.2",
73
- userAgent: "speakeasy-sdk/typescript 4.0.9 2.760.2 2.0 @orq-ai/node",
73
+ userAgent: "speakeasy-sdk/typescript 4.0.11 2.760.2 2.0 @orq-ai/node",
74
74
  } as const;
@@ -19,7 +19,7 @@ const routes = buildRouteMap({
19
19
  export const app = buildApplication(routes, {
20
20
  name: "mcp",
21
21
  versionInfo: {
22
- currentVersion: "4.0.9",
22
+ currentVersion: "4.0.11",
23
23
  },
24
24
  });
25
25
 
@@ -120,7 +120,7 @@ export function createMCPServer(deps: {
120
120
  }) {
121
121
  const server = new McpServer({
122
122
  name: "Orq",
123
- version: "4.0.9",
123
+ version: "4.0.11",
124
124
  });
125
125
 
126
126
  const client = new OrqCore({
@@ -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
+ }