@orq-ai/node 3.12.16 → 3.12.19

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 (159) hide show
  1. package/bin/mcp-server.js +112 -112
  2. package/bin/mcp-server.js.map +30 -30
  3. package/examples/package-lock.json +1 -1
  4. package/jsr.json +1 -1
  5. package/lib/config.d.ts +3 -3
  6. package/lib/config.js +3 -3
  7. package/mcp-server/mcp-server.js +1 -1
  8. package/mcp-server/server.js +1 -1
  9. package/models/operations/createbudget.js +2 -2
  10. package/models/operations/createcontact.js +2 -2
  11. package/models/operations/createdataset.js +2 -2
  12. package/models/operations/createdatasetitem.js +2 -2
  13. package/models/operations/createdatasource.js +2 -2
  14. package/models/operations/createeval.js +16 -16
  15. package/models/operations/fileget.js +2 -2
  16. package/models/operations/filelist.js +2 -2
  17. package/models/operations/fileupload.js +2 -2
  18. package/models/operations/getbudget.js +2 -2
  19. package/models/operations/getevals.js +28 -28
  20. package/models/operations/listbudgets.js +2 -2
  21. package/models/operations/listcontacts.js +2 -2
  22. package/models/operations/listdatasetdatapoints.js +2 -2
  23. package/models/operations/listdatasets.js +2 -2
  24. package/models/operations/listdatasources.js +2 -2
  25. package/models/operations/retrievecontact.js +2 -2
  26. package/models/operations/retrievedatapoint.js +2 -2
  27. package/models/operations/retrievedataset.js +2 -2
  28. package/models/operations/retrievedatasource.js +2 -2
  29. package/models/operations/updatebudget.js +2 -2
  30. package/models/operations/updatecontact.js +2 -2
  31. package/models/operations/updatedatapoint.js +2 -2
  32. package/models/operations/updatedataset.js +2 -2
  33. package/models/operations/updatedatasource.js +2 -2
  34. package/models/operations/updateeval.js +16 -16
  35. package/package.json +1 -1
  36. package/packages/orq-rc/README.md +107 -90
  37. package/packages/orq-rc/docs/sdks/tools/README.md +488 -0
  38. package/packages/orq-rc/examples/package-lock.json +1 -1
  39. package/packages/orq-rc/jsr.json +1 -1
  40. package/packages/orq-rc/package-lock.json +2 -2
  41. package/packages/orq-rc/package.json +1 -1
  42. package/packages/orq-rc/src/funcs/toolsCreate.ts +163 -0
  43. package/packages/orq-rc/src/funcs/toolsDelete.ts +167 -0
  44. package/packages/orq-rc/src/funcs/toolsDuplicate.ts +175 -0
  45. package/packages/orq-rc/src/funcs/toolsList.ts +176 -0
  46. package/packages/orq-rc/src/funcs/toolsRetrieve.ts +166 -0
  47. package/packages/orq-rc/src/funcs/toolsUpdate.ts +176 -0
  48. package/packages/orq-rc/src/lib/config.ts +3 -3
  49. package/packages/orq-rc/src/mcp-server/mcp-server.ts +1 -1
  50. package/packages/orq-rc/src/mcp-server/server.ts +13 -1
  51. package/packages/orq-rc/src/mcp-server/tools/toolsCreate.ts +37 -0
  52. package/packages/orq-rc/src/mcp-server/tools/toolsDelete.ts +35 -0
  53. package/packages/orq-rc/src/mcp-server/tools/toolsDuplicate.ts +37 -0
  54. package/packages/orq-rc/src/mcp-server/tools/toolsList.ts +37 -0
  55. package/packages/orq-rc/src/mcp-server/tools/toolsRetrieve.ts +37 -0
  56. package/packages/orq-rc/src/mcp-server/tools/toolsUpdate.ts +37 -0
  57. package/packages/orq-rc/src/models/components/callsubagenttool.ts +109 -0
  58. package/packages/orq-rc/src/models/components/codeexecutiontool.ts +293 -0
  59. package/packages/orq-rc/src/models/components/currentdatetool.ts +107 -0
  60. package/packages/orq-rc/src/models/components/deployments.ts +52 -45
  61. package/packages/orq-rc/src/models/components/functiontool.ts +195 -0
  62. package/packages/orq-rc/src/models/components/googlesearchtool.ts +108 -0
  63. package/packages/orq-rc/src/models/components/httptool.ts +532 -0
  64. package/packages/orq-rc/src/models/components/index.ts +13 -0
  65. package/packages/orq-rc/src/models/components/queryknowledgebasetool.ts +111 -0
  66. package/packages/orq-rc/src/models/components/querymemorystoretool.ts +111 -0
  67. package/packages/orq-rc/src/models/components/retrieveagentstool.ts +109 -0
  68. package/packages/orq-rc/src/models/components/retrieveknowledgebasestool.ts +111 -0
  69. package/packages/orq-rc/src/models/components/retrievememorystorestool.ts +111 -0
  70. package/packages/orq-rc/src/models/components/webscrapertool.ts +105 -0
  71. package/packages/orq-rc/src/models/components/writememorystoretool.ts +111 -0
  72. package/packages/orq-rc/src/models/errors/duplicatetool.ts +91 -0
  73. package/packages/orq-rc/src/models/errors/index.ts +2 -0
  74. package/packages/orq-rc/src/models/errors/updatetool.ts +91 -0
  75. package/packages/orq-rc/src/models/operations/createbudget.ts +2 -2
  76. package/packages/orq-rc/src/models/operations/createcontact.ts +2 -2
  77. package/packages/orq-rc/src/models/operations/createdataset.ts +2 -2
  78. package/packages/orq-rc/src/models/operations/createdatasetitem.ts +10 -8
  79. package/packages/orq-rc/src/models/operations/createdatasource.ts +2 -2
  80. package/packages/orq-rc/src/models/operations/createeval.ts +60 -56
  81. package/packages/orq-rc/src/models/operations/createknowledge.ts +18 -0
  82. package/packages/orq-rc/src/models/operations/creatememorystore.ts +137 -136
  83. package/packages/orq-rc/src/models/operations/createprompt.ts +631 -314
  84. package/packages/orq-rc/src/models/operations/createtool.ts +4027 -0
  85. package/packages/orq-rc/src/models/operations/deletetool.ts +75 -0
  86. package/packages/orq-rc/src/models/operations/deploymentcreatemetric.ts +8 -6
  87. package/packages/orq-rc/src/models/operations/deploymentgetconfig.ts +362 -194
  88. package/packages/orq-rc/src/models/operations/deployments.ts +329 -160
  89. package/packages/orq-rc/src/models/operations/deploymentstream.ts +8 -6
  90. package/packages/orq-rc/src/models/operations/duplicatetool.ts +2311 -0
  91. package/packages/orq-rc/src/models/operations/fileget.ts +2 -2
  92. package/packages/orq-rc/src/models/operations/filelist.ts +2 -2
  93. package/packages/orq-rc/src/models/operations/fileupload.ts +2 -2
  94. package/packages/orq-rc/src/models/operations/getagent.ts +10 -10
  95. package/packages/orq-rc/src/models/operations/getallprompts.ts +333 -168
  96. package/packages/orq-rc/src/models/operations/getalltools.ts +2278 -0
  97. package/packages/orq-rc/src/models/operations/getbudget.ts +2 -2
  98. package/packages/orq-rc/src/models/operations/getevals.ts +28 -28
  99. package/packages/orq-rc/src/models/operations/getoneknowledge.ts +9 -0
  100. package/packages/orq-rc/src/models/operations/getoneprompt.ts +329 -167
  101. package/packages/orq-rc/src/models/operations/getpromptversion.ts +337 -168
  102. package/packages/orq-rc/src/models/operations/index.ts +6 -0
  103. package/packages/orq-rc/src/models/operations/listagents.ts +10 -10
  104. package/packages/orq-rc/src/models/operations/listbudgets.ts +2 -2
  105. package/packages/orq-rc/src/models/operations/listcontacts.ts +2 -2
  106. package/packages/orq-rc/src/models/operations/listdatasetdatapoints.ts +6 -5
  107. package/packages/orq-rc/src/models/operations/listdatasets.ts +2 -2
  108. package/packages/orq-rc/src/models/operations/listdatasources.ts +2 -2
  109. package/packages/orq-rc/src/models/operations/listknowledgebases.ts +9 -0
  110. package/packages/orq-rc/src/models/operations/listpromptversions.ts +354 -183
  111. package/packages/orq-rc/src/models/operations/parse.ts +20 -335
  112. package/packages/orq-rc/src/models/operations/retrievecontact.ts +2 -2
  113. package/packages/orq-rc/src/models/operations/retrievedatapoint.ts +6 -5
  114. package/packages/orq-rc/src/models/operations/retrievedataset.ts +2 -2
  115. package/packages/orq-rc/src/models/operations/retrievedatasource.ts +2 -2
  116. package/packages/orq-rc/src/models/operations/retrievetool.ts +2303 -0
  117. package/packages/orq-rc/src/models/operations/runagent.ts +412 -1375
  118. package/packages/orq-rc/src/models/operations/streamrunagent.ts +399 -1449
  119. package/packages/orq-rc/src/models/operations/updatebudget.ts +2 -2
  120. package/packages/orq-rc/src/models/operations/updatecontact.ts +2 -2
  121. package/packages/orq-rc/src/models/operations/updatedatapoint.ts +10 -8
  122. package/packages/orq-rc/src/models/operations/updatedataset.ts +2 -2
  123. package/packages/orq-rc/src/models/operations/updatedatasource.ts +2 -2
  124. package/packages/orq-rc/src/models/operations/updateeval.ts +57 -57
  125. package/packages/orq-rc/src/models/operations/updateknowledge.ts +18 -0
  126. package/packages/orq-rc/src/models/operations/updatememorystore.ts +136 -168
  127. package/packages/orq-rc/src/models/operations/updateprompt.ts +668 -335
  128. package/packages/orq-rc/src/models/operations/updatetool.ts +4231 -0
  129. package/packages/orq-rc/src/sdk/sdk.ts +6 -0
  130. package/packages/orq-rc/src/sdk/tools.ts +117 -0
  131. package/src/lib/config.ts +3 -3
  132. package/src/mcp-server/mcp-server.ts +1 -1
  133. package/src/mcp-server/server.ts +1 -1
  134. package/src/models/operations/createbudget.ts +2 -2
  135. package/src/models/operations/createcontact.ts +2 -2
  136. package/src/models/operations/createdataset.ts +2 -2
  137. package/src/models/operations/createdatasetitem.ts +2 -2
  138. package/src/models/operations/createdatasource.ts +2 -2
  139. package/src/models/operations/createeval.ts +16 -16
  140. package/src/models/operations/fileget.ts +2 -2
  141. package/src/models/operations/filelist.ts +2 -2
  142. package/src/models/operations/fileupload.ts +2 -2
  143. package/src/models/operations/getbudget.ts +2 -2
  144. package/src/models/operations/getevals.ts +28 -28
  145. package/src/models/operations/listbudgets.ts +2 -2
  146. package/src/models/operations/listcontacts.ts +2 -2
  147. package/src/models/operations/listdatasetdatapoints.ts +2 -2
  148. package/src/models/operations/listdatasets.ts +2 -2
  149. package/src/models/operations/listdatasources.ts +2 -2
  150. package/src/models/operations/retrievecontact.ts +2 -2
  151. package/src/models/operations/retrievedatapoint.ts +2 -2
  152. package/src/models/operations/retrievedataset.ts +2 -2
  153. package/src/models/operations/retrievedatasource.ts +2 -2
  154. package/src/models/operations/updatebudget.ts +2 -2
  155. package/src/models/operations/updatecontact.ts +2 -2
  156. package/src/models/operations/updatedatapoint.ts +2 -2
  157. package/src/models/operations/updatedataset.ts +2 -2
  158. package/src/models/operations/updatedatasource.ts +2 -2
  159. package/src/models/operations/updateeval.ts +16 -16
@@ -0,0 +1,532 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
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
+ /**
13
+ * The status of the tool. `Live` is the latest version of the tool. `Draft` is a version that is not yet published. `Pending` is a version that is pending approval. `Published` is a version that was live and has been replaced by a new version.
14
+ */
15
+ export const Status = {
16
+ Live: "live",
17
+ Draft: "draft",
18
+ Pending: "pending",
19
+ Published: "published",
20
+ } as const;
21
+ /**
22
+ * The status of the tool. `Live` is the latest version of the tool. `Draft` is a version that is not yet published. `Pending` is a version that is pending approval. `Published` is a version that was live and has been replaced by a new version.
23
+ */
24
+ export type Status = ClosedEnum<typeof Status>;
25
+
26
+ export const HttpToolType = {
27
+ Http: "http",
28
+ } as const;
29
+ export type HttpToolType = ClosedEnum<typeof HttpToolType>;
30
+
31
+ /**
32
+ * The HTTP method to use.
33
+ */
34
+ export const Method = {
35
+ Get: "GET",
36
+ Post: "POST",
37
+ Put: "PUT",
38
+ Delete: "DELETE",
39
+ } as const;
40
+ /**
41
+ * The HTTP method to use.
42
+ */
43
+ export type Method = ClosedEnum<typeof Method>;
44
+
45
+ /**
46
+ * The blueprint for the HTTP request. The `arguments` field will be used to replace the placeholders in the `url`, `headers`, `body`, and `arguments` fields.
47
+ */
48
+ export type Blueprint = {
49
+ /**
50
+ * The URL to send the request to.
51
+ */
52
+ url: string;
53
+ /**
54
+ * The HTTP method to use.
55
+ */
56
+ method: Method;
57
+ /**
58
+ * The headers to send with the request.
59
+ */
60
+ headers?: { [k: string]: string } | undefined;
61
+ /**
62
+ * The body to send with the request.
63
+ */
64
+ body?: { [k: string]: any } | undefined;
65
+ };
66
+
67
+ /**
68
+ * The type of the argument.
69
+ */
70
+ export const HttpToolHttpType = {
71
+ String: "string",
72
+ Number: "number",
73
+ Boolean: "boolean",
74
+ } as const;
75
+ /**
76
+ * The type of the argument.
77
+ */
78
+ export type HttpToolHttpType = ClosedEnum<typeof HttpToolHttpType>;
79
+
80
+ /**
81
+ * The default value of the argument.
82
+ */
83
+ export type DefaultValue = string | number | boolean;
84
+
85
+ export type Arguments = {
86
+ /**
87
+ * The type of the argument.
88
+ */
89
+ type: HttpToolHttpType;
90
+ /**
91
+ * A description of the argument.
92
+ */
93
+ description: string;
94
+ /**
95
+ * Whether to send the argument to the model. If set to false, the argument will not be sent to the model and needs to be provided by the user or it will be left blank.
96
+ */
97
+ sendToModel?: boolean | undefined;
98
+ /**
99
+ * The default value of the argument.
100
+ */
101
+ defaultValue?: string | number | boolean | undefined;
102
+ };
103
+
104
+ export type Http = {
105
+ /**
106
+ * The blueprint for the HTTP request. The `arguments` field will be used to replace the placeholders in the `url`, `headers`, `body`, and `arguments` fields.
107
+ */
108
+ blueprint: Blueprint;
109
+ /**
110
+ * The arguments to send with the request. The keys will be used to replace the placeholders in the `blueprint` field.
111
+ */
112
+ arguments?: { [k: string]: Arguments } | undefined;
113
+ };
114
+
115
+ /**
116
+ * Makes HTTP requests to external APIs
117
+ */
118
+ export type HttpTool = {
119
+ id?: string | undefined;
120
+ /**
121
+ * The path where the entity is stored in the project structure. The first element of the path always represents the project name. Any subsequent path element after the project will be created as a folder in the project if it does not exists.
122
+ */
123
+ path: string;
124
+ /**
125
+ * Unique key of the tool as it will be displayed in the UI
126
+ */
127
+ key: string;
128
+ /**
129
+ * The name of the tool as it will be displayed in the UI. This is optional and if not provided, the `key` will be used.
130
+ */
131
+ displayName: string;
132
+ /**
133
+ * A description of the tool, used by the model to choose when and how to call the tool. We do recommend using the `description` field as accurate as possible to give enough context to the model to make the right decision.
134
+ */
135
+ description: string;
136
+ /**
137
+ * The status of the tool. `Live` is the latest version of the tool. `Draft` is a version that is not yet published. `Pending` is a version that is pending approval. `Published` is a version that was live and has been replaced by a new version.
138
+ */
139
+ status?: Status | undefined;
140
+ versionHash?: string | undefined;
141
+ type: HttpToolType;
142
+ http: Http;
143
+ requiresApproval?: boolean | undefined;
144
+ };
145
+
146
+ /** @internal */
147
+ export const Status$inboundSchema: z.ZodNativeEnum<typeof Status> = z
148
+ .nativeEnum(Status);
149
+
150
+ /** @internal */
151
+ export const Status$outboundSchema: z.ZodNativeEnum<typeof Status> =
152
+ Status$inboundSchema;
153
+
154
+ /**
155
+ * @internal
156
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
157
+ */
158
+ export namespace Status$ {
159
+ /** @deprecated use `Status$inboundSchema` instead. */
160
+ export const inboundSchema = Status$inboundSchema;
161
+ /** @deprecated use `Status$outboundSchema` instead. */
162
+ export const outboundSchema = Status$outboundSchema;
163
+ }
164
+
165
+ /** @internal */
166
+ export const HttpToolType$inboundSchema: z.ZodNativeEnum<typeof HttpToolType> =
167
+ z.nativeEnum(HttpToolType);
168
+
169
+ /** @internal */
170
+ export const HttpToolType$outboundSchema: z.ZodNativeEnum<typeof HttpToolType> =
171
+ HttpToolType$inboundSchema;
172
+
173
+ /**
174
+ * @internal
175
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
176
+ */
177
+ export namespace HttpToolType$ {
178
+ /** @deprecated use `HttpToolType$inboundSchema` instead. */
179
+ export const inboundSchema = HttpToolType$inboundSchema;
180
+ /** @deprecated use `HttpToolType$outboundSchema` instead. */
181
+ export const outboundSchema = HttpToolType$outboundSchema;
182
+ }
183
+
184
+ /** @internal */
185
+ export const Method$inboundSchema: z.ZodNativeEnum<typeof Method> = z
186
+ .nativeEnum(Method);
187
+
188
+ /** @internal */
189
+ export const Method$outboundSchema: z.ZodNativeEnum<typeof Method> =
190
+ Method$inboundSchema;
191
+
192
+ /**
193
+ * @internal
194
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
195
+ */
196
+ export namespace Method$ {
197
+ /** @deprecated use `Method$inboundSchema` instead. */
198
+ export const inboundSchema = Method$inboundSchema;
199
+ /** @deprecated use `Method$outboundSchema` instead. */
200
+ export const outboundSchema = Method$outboundSchema;
201
+ }
202
+
203
+ /** @internal */
204
+ export const Blueprint$inboundSchema: z.ZodType<
205
+ Blueprint,
206
+ z.ZodTypeDef,
207
+ unknown
208
+ > = z.object({
209
+ url: z.string(),
210
+ method: Method$inboundSchema,
211
+ headers: z.record(z.string()).optional(),
212
+ body: z.record(z.any()).optional(),
213
+ });
214
+
215
+ /** @internal */
216
+ export type Blueprint$Outbound = {
217
+ url: string;
218
+ method: string;
219
+ headers?: { [k: string]: string } | undefined;
220
+ body?: { [k: string]: any } | undefined;
221
+ };
222
+
223
+ /** @internal */
224
+ export const Blueprint$outboundSchema: z.ZodType<
225
+ Blueprint$Outbound,
226
+ z.ZodTypeDef,
227
+ Blueprint
228
+ > = z.object({
229
+ url: z.string(),
230
+ method: Method$outboundSchema,
231
+ headers: z.record(z.string()).optional(),
232
+ body: z.record(z.any()).optional(),
233
+ });
234
+
235
+ /**
236
+ * @internal
237
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
238
+ */
239
+ export namespace Blueprint$ {
240
+ /** @deprecated use `Blueprint$inboundSchema` instead. */
241
+ export const inboundSchema = Blueprint$inboundSchema;
242
+ /** @deprecated use `Blueprint$outboundSchema` instead. */
243
+ export const outboundSchema = Blueprint$outboundSchema;
244
+ /** @deprecated use `Blueprint$Outbound` instead. */
245
+ export type Outbound = Blueprint$Outbound;
246
+ }
247
+
248
+ export function blueprintToJSON(blueprint: Blueprint): string {
249
+ return JSON.stringify(Blueprint$outboundSchema.parse(blueprint));
250
+ }
251
+
252
+ export function blueprintFromJSON(
253
+ jsonString: string,
254
+ ): SafeParseResult<Blueprint, SDKValidationError> {
255
+ return safeParse(
256
+ jsonString,
257
+ (x) => Blueprint$inboundSchema.parse(JSON.parse(x)),
258
+ `Failed to parse 'Blueprint' from JSON`,
259
+ );
260
+ }
261
+
262
+ /** @internal */
263
+ export const HttpToolHttpType$inboundSchema: z.ZodNativeEnum<
264
+ typeof HttpToolHttpType
265
+ > = z.nativeEnum(HttpToolHttpType);
266
+
267
+ /** @internal */
268
+ export const HttpToolHttpType$outboundSchema: z.ZodNativeEnum<
269
+ typeof HttpToolHttpType
270
+ > = HttpToolHttpType$inboundSchema;
271
+
272
+ /**
273
+ * @internal
274
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
275
+ */
276
+ export namespace HttpToolHttpType$ {
277
+ /** @deprecated use `HttpToolHttpType$inboundSchema` instead. */
278
+ export const inboundSchema = HttpToolHttpType$inboundSchema;
279
+ /** @deprecated use `HttpToolHttpType$outboundSchema` instead. */
280
+ export const outboundSchema = HttpToolHttpType$outboundSchema;
281
+ }
282
+
283
+ /** @internal */
284
+ export const DefaultValue$inboundSchema: z.ZodType<
285
+ DefaultValue,
286
+ z.ZodTypeDef,
287
+ unknown
288
+ > = z.union([z.string(), z.number(), z.boolean()]);
289
+
290
+ /** @internal */
291
+ export type DefaultValue$Outbound = string | number | boolean;
292
+
293
+ /** @internal */
294
+ export const DefaultValue$outboundSchema: z.ZodType<
295
+ DefaultValue$Outbound,
296
+ z.ZodTypeDef,
297
+ DefaultValue
298
+ > = z.union([z.string(), z.number(), z.boolean()]);
299
+
300
+ /**
301
+ * @internal
302
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
303
+ */
304
+ export namespace DefaultValue$ {
305
+ /** @deprecated use `DefaultValue$inboundSchema` instead. */
306
+ export const inboundSchema = DefaultValue$inboundSchema;
307
+ /** @deprecated use `DefaultValue$outboundSchema` instead. */
308
+ export const outboundSchema = DefaultValue$outboundSchema;
309
+ /** @deprecated use `DefaultValue$Outbound` instead. */
310
+ export type Outbound = DefaultValue$Outbound;
311
+ }
312
+
313
+ export function defaultValueToJSON(defaultValue: DefaultValue): string {
314
+ return JSON.stringify(DefaultValue$outboundSchema.parse(defaultValue));
315
+ }
316
+
317
+ export function defaultValueFromJSON(
318
+ jsonString: string,
319
+ ): SafeParseResult<DefaultValue, SDKValidationError> {
320
+ return safeParse(
321
+ jsonString,
322
+ (x) => DefaultValue$inboundSchema.parse(JSON.parse(x)),
323
+ `Failed to parse 'DefaultValue' from JSON`,
324
+ );
325
+ }
326
+
327
+ /** @internal */
328
+ export const Arguments$inboundSchema: z.ZodType<
329
+ Arguments,
330
+ z.ZodTypeDef,
331
+ unknown
332
+ > = z.object({
333
+ type: HttpToolHttpType$inboundSchema,
334
+ description: z.string(),
335
+ send_to_model: z.boolean().default(true),
336
+ default_value: z.union([z.string(), z.number(), z.boolean()]).optional(),
337
+ }).transform((v) => {
338
+ return remap$(v, {
339
+ "send_to_model": "sendToModel",
340
+ "default_value": "defaultValue",
341
+ });
342
+ });
343
+
344
+ /** @internal */
345
+ export type Arguments$Outbound = {
346
+ type: string;
347
+ description: string;
348
+ send_to_model: boolean;
349
+ default_value?: string | number | boolean | undefined;
350
+ };
351
+
352
+ /** @internal */
353
+ export const Arguments$outboundSchema: z.ZodType<
354
+ Arguments$Outbound,
355
+ z.ZodTypeDef,
356
+ Arguments
357
+ > = z.object({
358
+ type: HttpToolHttpType$outboundSchema,
359
+ description: z.string(),
360
+ sendToModel: z.boolean().default(true),
361
+ defaultValue: z.union([z.string(), z.number(), z.boolean()]).optional(),
362
+ }).transform((v) => {
363
+ return remap$(v, {
364
+ sendToModel: "send_to_model",
365
+ defaultValue: "default_value",
366
+ });
367
+ });
368
+
369
+ /**
370
+ * @internal
371
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
372
+ */
373
+ export namespace Arguments$ {
374
+ /** @deprecated use `Arguments$inboundSchema` instead. */
375
+ export const inboundSchema = Arguments$inboundSchema;
376
+ /** @deprecated use `Arguments$outboundSchema` instead. */
377
+ export const outboundSchema = Arguments$outboundSchema;
378
+ /** @deprecated use `Arguments$Outbound` instead. */
379
+ export type Outbound = Arguments$Outbound;
380
+ }
381
+
382
+ export function argumentsToJSON(value: Arguments): string {
383
+ return JSON.stringify(Arguments$outboundSchema.parse(value));
384
+ }
385
+
386
+ export function argumentsFromJSON(
387
+ jsonString: string,
388
+ ): SafeParseResult<Arguments, SDKValidationError> {
389
+ return safeParse(
390
+ jsonString,
391
+ (x) => Arguments$inboundSchema.parse(JSON.parse(x)),
392
+ `Failed to parse 'Arguments' from JSON`,
393
+ );
394
+ }
395
+
396
+ /** @internal */
397
+ export const Http$inboundSchema: z.ZodType<Http, z.ZodTypeDef, unknown> = z
398
+ .object({
399
+ blueprint: z.lazy(() => Blueprint$inboundSchema),
400
+ arguments: z.record(z.lazy(() => Arguments$inboundSchema)).optional(),
401
+ });
402
+
403
+ /** @internal */
404
+ export type Http$Outbound = {
405
+ blueprint: Blueprint$Outbound;
406
+ arguments?: { [k: string]: Arguments$Outbound } | undefined;
407
+ };
408
+
409
+ /** @internal */
410
+ export const Http$outboundSchema: z.ZodType<Http$Outbound, z.ZodTypeDef, Http> =
411
+ z.object({
412
+ blueprint: z.lazy(() => Blueprint$outboundSchema),
413
+ arguments: z.record(z.lazy(() => Arguments$outboundSchema)).optional(),
414
+ });
415
+
416
+ /**
417
+ * @internal
418
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
419
+ */
420
+ export namespace Http$ {
421
+ /** @deprecated use `Http$inboundSchema` instead. */
422
+ export const inboundSchema = Http$inboundSchema;
423
+ /** @deprecated use `Http$outboundSchema` instead. */
424
+ export const outboundSchema = Http$outboundSchema;
425
+ /** @deprecated use `Http$Outbound` instead. */
426
+ export type Outbound = Http$Outbound;
427
+ }
428
+
429
+ export function httpToJSON(http: Http): string {
430
+ return JSON.stringify(Http$outboundSchema.parse(http));
431
+ }
432
+
433
+ export function httpFromJSON(
434
+ jsonString: string,
435
+ ): SafeParseResult<Http, SDKValidationError> {
436
+ return safeParse(
437
+ jsonString,
438
+ (x) => Http$inboundSchema.parse(JSON.parse(x)),
439
+ `Failed to parse 'Http' from JSON`,
440
+ );
441
+ }
442
+
443
+ /** @internal */
444
+ export const HttpTool$inboundSchema: z.ZodType<
445
+ HttpTool,
446
+ z.ZodTypeDef,
447
+ unknown
448
+ > = z.object({
449
+ _id: z.string().default("01K60CGPWFAB7ZDDQT1K4MRS6G"),
450
+ path: z.string(),
451
+ key: z.string(),
452
+ display_name: z.string(),
453
+ description: z.string(),
454
+ status: Status$inboundSchema.default("live"),
455
+ version_hash: z.string().optional(),
456
+ type: HttpToolType$inboundSchema,
457
+ http: z.lazy(() => Http$inboundSchema),
458
+ requires_approval: z.boolean().default(false),
459
+ }).transform((v) => {
460
+ return remap$(v, {
461
+ "_id": "id",
462
+ "display_name": "displayName",
463
+ "version_hash": "versionHash",
464
+ "requires_approval": "requiresApproval",
465
+ });
466
+ });
467
+
468
+ /** @internal */
469
+ export type HttpTool$Outbound = {
470
+ _id: string;
471
+ path: string;
472
+ key: string;
473
+ display_name: string;
474
+ description: string;
475
+ status: string;
476
+ version_hash?: string | undefined;
477
+ type: string;
478
+ http: Http$Outbound;
479
+ requires_approval: boolean;
480
+ };
481
+
482
+ /** @internal */
483
+ export const HttpTool$outboundSchema: z.ZodType<
484
+ HttpTool$Outbound,
485
+ z.ZodTypeDef,
486
+ HttpTool
487
+ > = z.object({
488
+ id: z.string().default("01K60CGPWFAB7ZDDQT1K4MRS6G"),
489
+ path: z.string(),
490
+ key: z.string(),
491
+ displayName: z.string(),
492
+ description: z.string(),
493
+ status: Status$outboundSchema.default("live"),
494
+ versionHash: z.string().optional(),
495
+ type: HttpToolType$outboundSchema,
496
+ http: z.lazy(() => Http$outboundSchema),
497
+ requiresApproval: z.boolean().default(false),
498
+ }).transform((v) => {
499
+ return remap$(v, {
500
+ id: "_id",
501
+ displayName: "display_name",
502
+ versionHash: "version_hash",
503
+ requiresApproval: "requires_approval",
504
+ });
505
+ });
506
+
507
+ /**
508
+ * @internal
509
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
510
+ */
511
+ export namespace HttpTool$ {
512
+ /** @deprecated use `HttpTool$inboundSchema` instead. */
513
+ export const inboundSchema = HttpTool$inboundSchema;
514
+ /** @deprecated use `HttpTool$outboundSchema` instead. */
515
+ export const outboundSchema = HttpTool$outboundSchema;
516
+ /** @deprecated use `HttpTool$Outbound` instead. */
517
+ export type Outbound = HttpTool$Outbound;
518
+ }
519
+
520
+ export function httpToolToJSON(httpTool: HttpTool): string {
521
+ return JSON.stringify(HttpTool$outboundSchema.parse(httpTool));
522
+ }
523
+
524
+ export function httpToolFromJSON(
525
+ jsonString: string,
526
+ ): SafeParseResult<HttpTool, SDKValidationError> {
527
+ return safeParse(
528
+ jsonString,
529
+ (x) => HttpTool$inboundSchema.parse(JSON.parse(x)),
530
+ `Failed to parse 'HttpTool' from JSON`,
531
+ );
532
+ }
@@ -2,5 +2,18 @@
2
2
  * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
3
  */
4
4
 
5
+ export * from "./callsubagenttool.js";
6
+ export * from "./codeexecutiontool.js";
7
+ export * from "./currentdatetool.js";
5
8
  export * from "./deployments.js";
9
+ export * from "./functiontool.js";
10
+ export * from "./googlesearchtool.js";
11
+ export * from "./httptool.js";
12
+ export * from "./queryknowledgebasetool.js";
13
+ export * from "./querymemorystoretool.js";
14
+ export * from "./retrieveagentstool.js";
15
+ export * from "./retrieveknowledgebasestool.js";
16
+ export * from "./retrievememorystorestool.js";
6
17
  export * from "./security.js";
18
+ export * from "./webscrapertool.js";
19
+ export * from "./writememorystoretool.js";
@@ -0,0 +1,111 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
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 QueryKnowledgeBaseToolType = {
13
+ QueryKnowledgeBase: "query_knowledge_base",
14
+ } as const;
15
+ export type QueryKnowledgeBaseToolType = ClosedEnum<
16
+ typeof QueryKnowledgeBaseToolType
17
+ >;
18
+
19
+ /**
20
+ * Queries knowledge bases for information
21
+ */
22
+ export type QueryKnowledgeBaseTool = {
23
+ type: QueryKnowledgeBaseToolType;
24
+ requiresApproval?: boolean | undefined;
25
+ };
26
+
27
+ /** @internal */
28
+ export const QueryKnowledgeBaseToolType$inboundSchema: z.ZodNativeEnum<
29
+ typeof QueryKnowledgeBaseToolType
30
+ > = z.nativeEnum(QueryKnowledgeBaseToolType);
31
+
32
+ /** @internal */
33
+ export const QueryKnowledgeBaseToolType$outboundSchema: z.ZodNativeEnum<
34
+ typeof QueryKnowledgeBaseToolType
35
+ > = QueryKnowledgeBaseToolType$inboundSchema;
36
+
37
+ /**
38
+ * @internal
39
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
40
+ */
41
+ export namespace QueryKnowledgeBaseToolType$ {
42
+ /** @deprecated use `QueryKnowledgeBaseToolType$inboundSchema` instead. */
43
+ export const inboundSchema = QueryKnowledgeBaseToolType$inboundSchema;
44
+ /** @deprecated use `QueryKnowledgeBaseToolType$outboundSchema` instead. */
45
+ export const outboundSchema = QueryKnowledgeBaseToolType$outboundSchema;
46
+ }
47
+
48
+ /** @internal */
49
+ export const QueryKnowledgeBaseTool$inboundSchema: z.ZodType<
50
+ QueryKnowledgeBaseTool,
51
+ z.ZodTypeDef,
52
+ unknown
53
+ > = z.object({
54
+ type: QueryKnowledgeBaseToolType$inboundSchema,
55
+ requires_approval: z.boolean().default(false),
56
+ }).transform((v) => {
57
+ return remap$(v, {
58
+ "requires_approval": "requiresApproval",
59
+ });
60
+ });
61
+
62
+ /** @internal */
63
+ export type QueryKnowledgeBaseTool$Outbound = {
64
+ type: string;
65
+ requires_approval: boolean;
66
+ };
67
+
68
+ /** @internal */
69
+ export const QueryKnowledgeBaseTool$outboundSchema: z.ZodType<
70
+ QueryKnowledgeBaseTool$Outbound,
71
+ z.ZodTypeDef,
72
+ QueryKnowledgeBaseTool
73
+ > = z.object({
74
+ type: QueryKnowledgeBaseToolType$outboundSchema,
75
+ requiresApproval: z.boolean().default(false),
76
+ }).transform((v) => {
77
+ return remap$(v, {
78
+ requiresApproval: "requires_approval",
79
+ });
80
+ });
81
+
82
+ /**
83
+ * @internal
84
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
85
+ */
86
+ export namespace QueryKnowledgeBaseTool$ {
87
+ /** @deprecated use `QueryKnowledgeBaseTool$inboundSchema` instead. */
88
+ export const inboundSchema = QueryKnowledgeBaseTool$inboundSchema;
89
+ /** @deprecated use `QueryKnowledgeBaseTool$outboundSchema` instead. */
90
+ export const outboundSchema = QueryKnowledgeBaseTool$outboundSchema;
91
+ /** @deprecated use `QueryKnowledgeBaseTool$Outbound` instead. */
92
+ export type Outbound = QueryKnowledgeBaseTool$Outbound;
93
+ }
94
+
95
+ export function queryKnowledgeBaseToolToJSON(
96
+ queryKnowledgeBaseTool: QueryKnowledgeBaseTool,
97
+ ): string {
98
+ return JSON.stringify(
99
+ QueryKnowledgeBaseTool$outboundSchema.parse(queryKnowledgeBaseTool),
100
+ );
101
+ }
102
+
103
+ export function queryKnowledgeBaseToolFromJSON(
104
+ jsonString: string,
105
+ ): SafeParseResult<QueryKnowledgeBaseTool, SDKValidationError> {
106
+ return safeParse(
107
+ jsonString,
108
+ (x) => QueryKnowledgeBaseTool$inboundSchema.parse(JSON.parse(x)),
109
+ `Failed to parse 'QueryKnowledgeBaseTool' from JSON`,
110
+ );
111
+ }