@orq-ai/node 3.12.19 → 3.12.21

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 (127) 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/lib/config.js.map +1 -1
  8. package/mcp-server/mcp-server.js +1 -1
  9. package/mcp-server/server.js +1 -1
  10. package/models/operations/createbudget.js +2 -2
  11. package/models/operations/createcontact.js +2 -2
  12. package/models/operations/createdataset.js +2 -2
  13. package/models/operations/createdatasetitem.js +2 -2
  14. package/models/operations/createdatasource.js +2 -2
  15. package/models/operations/createeval.js +16 -16
  16. package/models/operations/fileget.js +2 -2
  17. package/models/operations/filelist.js +2 -2
  18. package/models/operations/fileupload.js +2 -2
  19. package/models/operations/getbudget.js +2 -2
  20. package/models/operations/getevals.js +28 -28
  21. package/models/operations/listbudgets.js +2 -2
  22. package/models/operations/listcontacts.js +2 -2
  23. package/models/operations/listdatasetdatapoints.js +2 -2
  24. package/models/operations/listdatasets.js +2 -2
  25. package/models/operations/listdatasources.js +2 -2
  26. package/models/operations/retrievecontact.js +2 -2
  27. package/models/operations/retrievedatapoint.js +2 -2
  28. package/models/operations/retrievedataset.js +2 -2
  29. package/models/operations/retrievedatasource.js +2 -2
  30. package/models/operations/updatebudget.js +2 -2
  31. package/models/operations/updatecontact.js +2 -2
  32. package/models/operations/updatedatapoint.js +2 -2
  33. package/models/operations/updatedataset.js +2 -2
  34. package/models/operations/updatedatasource.js +2 -2
  35. package/models/operations/updateeval.js +16 -16
  36. package/package.json +1 -1
  37. package/packages/orq-rc/examples/package-lock.json +1 -1
  38. package/packages/orq-rc/jsr.json +1 -1
  39. package/packages/orq-rc/package-lock.json +2 -2
  40. package/packages/orq-rc/package.json +1 -1
  41. package/packages/orq-rc/src/lib/config.ts +3 -3
  42. package/packages/orq-rc/src/mcp-server/mcp-server.ts +1 -1
  43. package/packages/orq-rc/src/mcp-server/server.ts +1 -1
  44. package/packages/orq-rc/src/models/components/deployments.ts +39 -44
  45. package/packages/orq-rc/src/models/components/index.ts +0 -13
  46. package/packages/orq-rc/src/models/operations/createbudget.ts +2 -2
  47. package/packages/orq-rc/src/models/operations/createcontact.ts +2 -2
  48. package/packages/orq-rc/src/models/operations/createdataset.ts +2 -2
  49. package/packages/orq-rc/src/models/operations/createdatasetitem.ts +2 -2
  50. package/packages/orq-rc/src/models/operations/createdatasource.ts +2 -2
  51. package/packages/orq-rc/src/models/operations/createeval.ts +56 -60
  52. package/packages/orq-rc/src/models/operations/creatememorystore.ts +18 -17
  53. package/packages/orq-rc/src/models/operations/createprompt.ts +34 -30
  54. package/packages/orq-rc/src/models/operations/createtool.ts +42 -68
  55. package/packages/orq-rc/src/models/operations/deploymentgetconfig.ts +27 -36
  56. package/packages/orq-rc/src/models/operations/duplicatetool.ts +10 -10
  57. package/packages/orq-rc/src/models/operations/fileget.ts +2 -2
  58. package/packages/orq-rc/src/models/operations/filelist.ts +2 -2
  59. package/packages/orq-rc/src/models/operations/fileupload.ts +2 -2
  60. package/packages/orq-rc/src/models/operations/getagent.ts +203 -141
  61. package/packages/orq-rc/src/models/operations/getalltools.ts +10 -10
  62. package/packages/orq-rc/src/models/operations/getbudget.ts +2 -2
  63. package/packages/orq-rc/src/models/operations/getevals.ts +28 -28
  64. package/packages/orq-rc/src/models/operations/listagents.ts +202 -141
  65. package/packages/orq-rc/src/models/operations/listbudgets.ts +2 -2
  66. package/packages/orq-rc/src/models/operations/listchunks.ts +21 -21
  67. package/packages/orq-rc/src/models/operations/listcontacts.ts +2 -2
  68. package/packages/orq-rc/src/models/operations/listdatasetdatapoints.ts +2 -2
  69. package/packages/orq-rc/src/models/operations/listdatasets.ts +2 -2
  70. package/packages/orq-rc/src/models/operations/listdatasources.ts +22 -29
  71. package/packages/orq-rc/src/models/operations/retrievecontact.ts +2 -2
  72. package/packages/orq-rc/src/models/operations/retrievedatapoint.ts +2 -2
  73. package/packages/orq-rc/src/models/operations/retrievedataset.ts +2 -2
  74. package/packages/orq-rc/src/models/operations/retrievedatasource.ts +2 -2
  75. package/packages/orq-rc/src/models/operations/retrievetool.ts +10 -10
  76. package/packages/orq-rc/src/models/operations/runagent.ts +2292 -1130
  77. package/packages/orq-rc/src/models/operations/streamrunagent.ts +2590 -1252
  78. package/packages/orq-rc/src/models/operations/updatebudget.ts +2 -2
  79. package/packages/orq-rc/src/models/operations/updatecontact.ts +2 -2
  80. package/packages/orq-rc/src/models/operations/updatedatapoint.ts +2 -2
  81. package/packages/orq-rc/src/models/operations/updatedataset.ts +2 -2
  82. package/packages/orq-rc/src/models/operations/updatedatasource.ts +2 -2
  83. package/packages/orq-rc/src/models/operations/updateeval.ts +57 -57
  84. package/packages/orq-rc/src/models/operations/updatememorystore.ts +17 -21
  85. package/packages/orq-rc/src/models/operations/updatetool.ts +43 -69
  86. package/src/lib/config.ts +3 -3
  87. package/src/mcp-server/mcp-server.ts +1 -1
  88. package/src/mcp-server/server.ts +1 -1
  89. package/src/models/operations/createbudget.ts +2 -2
  90. package/src/models/operations/createcontact.ts +2 -2
  91. package/src/models/operations/createdataset.ts +2 -2
  92. package/src/models/operations/createdatasetitem.ts +2 -2
  93. package/src/models/operations/createdatasource.ts +2 -2
  94. package/src/models/operations/createeval.ts +16 -16
  95. package/src/models/operations/fileget.ts +2 -2
  96. package/src/models/operations/filelist.ts +2 -2
  97. package/src/models/operations/fileupload.ts +2 -2
  98. package/src/models/operations/getbudget.ts +2 -2
  99. package/src/models/operations/getevals.ts +28 -28
  100. package/src/models/operations/listbudgets.ts +2 -2
  101. package/src/models/operations/listcontacts.ts +2 -2
  102. package/src/models/operations/listdatasetdatapoints.ts +2 -2
  103. package/src/models/operations/listdatasets.ts +2 -2
  104. package/src/models/operations/listdatasources.ts +2 -2
  105. package/src/models/operations/retrievecontact.ts +2 -2
  106. package/src/models/operations/retrievedatapoint.ts +2 -2
  107. package/src/models/operations/retrievedataset.ts +2 -2
  108. package/src/models/operations/retrievedatasource.ts +2 -2
  109. package/src/models/operations/updatebudget.ts +2 -2
  110. package/src/models/operations/updatecontact.ts +2 -2
  111. package/src/models/operations/updatedatapoint.ts +2 -2
  112. package/src/models/operations/updatedataset.ts +2 -2
  113. package/src/models/operations/updatedatasource.ts +2 -2
  114. package/src/models/operations/updateeval.ts +16 -16
  115. package/packages/orq-rc/src/models/components/callsubagenttool.ts +0 -109
  116. package/packages/orq-rc/src/models/components/codeexecutiontool.ts +0 -293
  117. package/packages/orq-rc/src/models/components/currentdatetool.ts +0 -107
  118. package/packages/orq-rc/src/models/components/functiontool.ts +0 -195
  119. package/packages/orq-rc/src/models/components/googlesearchtool.ts +0 -108
  120. package/packages/orq-rc/src/models/components/httptool.ts +0 -532
  121. package/packages/orq-rc/src/models/components/queryknowledgebasetool.ts +0 -111
  122. package/packages/orq-rc/src/models/components/querymemorystoretool.ts +0 -111
  123. package/packages/orq-rc/src/models/components/retrieveagentstool.ts +0 -109
  124. package/packages/orq-rc/src/models/components/retrieveknowledgebasestool.ts +0 -111
  125. package/packages/orq-rc/src/models/components/retrievememorystorestool.ts +0 -111
  126. package/packages/orq-rc/src/models/components/webscrapertool.ts +0 -105
  127. package/packages/orq-rc/src/models/components/writememorystoretool.ts +0 -111
@@ -1,109 +0,0 @@
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 CallSubAgentToolType = {
13
- CallSubAgent: "call_sub_agent",
14
- } as const;
15
- export type CallSubAgentToolType = ClosedEnum<typeof CallSubAgentToolType>;
16
-
17
- /**
18
- * Delegates tasks to specialized sub-agents
19
- */
20
- export type CallSubAgentTool = {
21
- type: CallSubAgentToolType;
22
- requiresApproval?: boolean | undefined;
23
- };
24
-
25
- /** @internal */
26
- export const CallSubAgentToolType$inboundSchema: z.ZodNativeEnum<
27
- typeof CallSubAgentToolType
28
- > = z.nativeEnum(CallSubAgentToolType);
29
-
30
- /** @internal */
31
- export const CallSubAgentToolType$outboundSchema: z.ZodNativeEnum<
32
- typeof CallSubAgentToolType
33
- > = CallSubAgentToolType$inboundSchema;
34
-
35
- /**
36
- * @internal
37
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
38
- */
39
- export namespace CallSubAgentToolType$ {
40
- /** @deprecated use `CallSubAgentToolType$inboundSchema` instead. */
41
- export const inboundSchema = CallSubAgentToolType$inboundSchema;
42
- /** @deprecated use `CallSubAgentToolType$outboundSchema` instead. */
43
- export const outboundSchema = CallSubAgentToolType$outboundSchema;
44
- }
45
-
46
- /** @internal */
47
- export const CallSubAgentTool$inboundSchema: z.ZodType<
48
- CallSubAgentTool,
49
- z.ZodTypeDef,
50
- unknown
51
- > = z.object({
52
- type: CallSubAgentToolType$inboundSchema,
53
- requires_approval: z.boolean().default(false),
54
- }).transform((v) => {
55
- return remap$(v, {
56
- "requires_approval": "requiresApproval",
57
- });
58
- });
59
-
60
- /** @internal */
61
- export type CallSubAgentTool$Outbound = {
62
- type: string;
63
- requires_approval: boolean;
64
- };
65
-
66
- /** @internal */
67
- export const CallSubAgentTool$outboundSchema: z.ZodType<
68
- CallSubAgentTool$Outbound,
69
- z.ZodTypeDef,
70
- CallSubAgentTool
71
- > = z.object({
72
- type: CallSubAgentToolType$outboundSchema,
73
- requiresApproval: z.boolean().default(false),
74
- }).transform((v) => {
75
- return remap$(v, {
76
- requiresApproval: "requires_approval",
77
- });
78
- });
79
-
80
- /**
81
- * @internal
82
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
83
- */
84
- export namespace CallSubAgentTool$ {
85
- /** @deprecated use `CallSubAgentTool$inboundSchema` instead. */
86
- export const inboundSchema = CallSubAgentTool$inboundSchema;
87
- /** @deprecated use `CallSubAgentTool$outboundSchema` instead. */
88
- export const outboundSchema = CallSubAgentTool$outboundSchema;
89
- /** @deprecated use `CallSubAgentTool$Outbound` instead. */
90
- export type Outbound = CallSubAgentTool$Outbound;
91
- }
92
-
93
- export function callSubAgentToolToJSON(
94
- callSubAgentTool: CallSubAgentTool,
95
- ): string {
96
- return JSON.stringify(
97
- CallSubAgentTool$outboundSchema.parse(callSubAgentTool),
98
- );
99
- }
100
-
101
- export function callSubAgentToolFromJSON(
102
- jsonString: string,
103
- ): SafeParseResult<CallSubAgentTool, SDKValidationError> {
104
- return safeParse(
105
- jsonString,
106
- (x) => CallSubAgentTool$inboundSchema.parse(JSON.parse(x)),
107
- `Failed to parse 'CallSubAgentTool' from JSON`,
108
- );
109
- }
@@ -1,293 +0,0 @@
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 CodeExecutionToolStatus = {
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 CodeExecutionToolStatus = ClosedEnum<
25
- typeof CodeExecutionToolStatus
26
- >;
27
-
28
- export const CodeExecutionToolType = {
29
- Code: "code",
30
- } as const;
31
- export type CodeExecutionToolType = ClosedEnum<typeof CodeExecutionToolType>;
32
-
33
- export const Language = {
34
- Python: "python",
35
- } as const;
36
- export type Language = ClosedEnum<typeof Language>;
37
-
38
- export type CodeTool = {
39
- /**
40
- * The parameters the functions accepts, described as a JSON Schema object. See the `OpenAI` [guide](https://platform.openai.com/docs/guides/function-calling) for examples, and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for documentation about the format.
41
- */
42
- parameters?: { [k: string]: any } | undefined;
43
- language: Language;
44
- /**
45
- * The code to execute.
46
- */
47
- code: string;
48
- };
49
-
50
- /**
51
- * Executes code in a secure sandbox environment
52
- */
53
- export type CodeExecutionTool = {
54
- /**
55
- * 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.
56
- */
57
- path: string;
58
- /**
59
- * Unique key of the tool as it will be displayed in the UI
60
- */
61
- key: string;
62
- /**
63
- * 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.
64
- */
65
- displayName: string;
66
- /**
67
- * 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.
68
- */
69
- description: string;
70
- /**
71
- * 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.
72
- */
73
- status?: CodeExecutionToolStatus | undefined;
74
- versionHash?: string | undefined;
75
- type: CodeExecutionToolType;
76
- codeTool: CodeTool;
77
- id?: string | undefined;
78
- requiresApproval?: boolean | undefined;
79
- };
80
-
81
- /** @internal */
82
- export const CodeExecutionToolStatus$inboundSchema: z.ZodNativeEnum<
83
- typeof CodeExecutionToolStatus
84
- > = z.nativeEnum(CodeExecutionToolStatus);
85
-
86
- /** @internal */
87
- export const CodeExecutionToolStatus$outboundSchema: z.ZodNativeEnum<
88
- typeof CodeExecutionToolStatus
89
- > = CodeExecutionToolStatus$inboundSchema;
90
-
91
- /**
92
- * @internal
93
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
94
- */
95
- export namespace CodeExecutionToolStatus$ {
96
- /** @deprecated use `CodeExecutionToolStatus$inboundSchema` instead. */
97
- export const inboundSchema = CodeExecutionToolStatus$inboundSchema;
98
- /** @deprecated use `CodeExecutionToolStatus$outboundSchema` instead. */
99
- export const outboundSchema = CodeExecutionToolStatus$outboundSchema;
100
- }
101
-
102
- /** @internal */
103
- export const CodeExecutionToolType$inboundSchema: z.ZodNativeEnum<
104
- typeof CodeExecutionToolType
105
- > = z.nativeEnum(CodeExecutionToolType);
106
-
107
- /** @internal */
108
- export const CodeExecutionToolType$outboundSchema: z.ZodNativeEnum<
109
- typeof CodeExecutionToolType
110
- > = CodeExecutionToolType$inboundSchema;
111
-
112
- /**
113
- * @internal
114
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
115
- */
116
- export namespace CodeExecutionToolType$ {
117
- /** @deprecated use `CodeExecutionToolType$inboundSchema` instead. */
118
- export const inboundSchema = CodeExecutionToolType$inboundSchema;
119
- /** @deprecated use `CodeExecutionToolType$outboundSchema` instead. */
120
- export const outboundSchema = CodeExecutionToolType$outboundSchema;
121
- }
122
-
123
- /** @internal */
124
- export const Language$inboundSchema: z.ZodNativeEnum<typeof Language> = z
125
- .nativeEnum(Language);
126
-
127
- /** @internal */
128
- export const Language$outboundSchema: z.ZodNativeEnum<typeof Language> =
129
- Language$inboundSchema;
130
-
131
- /**
132
- * @internal
133
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
134
- */
135
- export namespace Language$ {
136
- /** @deprecated use `Language$inboundSchema` instead. */
137
- export const inboundSchema = Language$inboundSchema;
138
- /** @deprecated use `Language$outboundSchema` instead. */
139
- export const outboundSchema = Language$outboundSchema;
140
- }
141
-
142
- /** @internal */
143
- export const CodeTool$inboundSchema: z.ZodType<
144
- CodeTool,
145
- z.ZodTypeDef,
146
- unknown
147
- > = z.object({
148
- parameters: z.record(z.any()).optional(),
149
- language: Language$inboundSchema,
150
- code: z.string(),
151
- });
152
-
153
- /** @internal */
154
- export type CodeTool$Outbound = {
155
- parameters?: { [k: string]: any } | undefined;
156
- language: string;
157
- code: string;
158
- };
159
-
160
- /** @internal */
161
- export const CodeTool$outboundSchema: z.ZodType<
162
- CodeTool$Outbound,
163
- z.ZodTypeDef,
164
- CodeTool
165
- > = z.object({
166
- parameters: z.record(z.any()).optional(),
167
- language: Language$outboundSchema,
168
- code: z.string(),
169
- });
170
-
171
- /**
172
- * @internal
173
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
174
- */
175
- export namespace CodeTool$ {
176
- /** @deprecated use `CodeTool$inboundSchema` instead. */
177
- export const inboundSchema = CodeTool$inboundSchema;
178
- /** @deprecated use `CodeTool$outboundSchema` instead. */
179
- export const outboundSchema = CodeTool$outboundSchema;
180
- /** @deprecated use `CodeTool$Outbound` instead. */
181
- export type Outbound = CodeTool$Outbound;
182
- }
183
-
184
- export function codeToolToJSON(codeTool: CodeTool): string {
185
- return JSON.stringify(CodeTool$outboundSchema.parse(codeTool));
186
- }
187
-
188
- export function codeToolFromJSON(
189
- jsonString: string,
190
- ): SafeParseResult<CodeTool, SDKValidationError> {
191
- return safeParse(
192
- jsonString,
193
- (x) => CodeTool$inboundSchema.parse(JSON.parse(x)),
194
- `Failed to parse 'CodeTool' from JSON`,
195
- );
196
- }
197
-
198
- /** @internal */
199
- export const CodeExecutionTool$inboundSchema: z.ZodType<
200
- CodeExecutionTool,
201
- z.ZodTypeDef,
202
- unknown
203
- > = z.object({
204
- path: z.string(),
205
- key: z.string(),
206
- display_name: z.string(),
207
- description: z.string(),
208
- status: CodeExecutionToolStatus$inboundSchema.default("live"),
209
- version_hash: z.string().optional(),
210
- type: CodeExecutionToolType$inboundSchema,
211
- code_tool: z.lazy(() => CodeTool$inboundSchema),
212
- _id: z.string().optional(),
213
- requires_approval: z.boolean().default(false),
214
- }).transform((v) => {
215
- return remap$(v, {
216
- "display_name": "displayName",
217
- "version_hash": "versionHash",
218
- "code_tool": "codeTool",
219
- "_id": "id",
220
- "requires_approval": "requiresApproval",
221
- });
222
- });
223
-
224
- /** @internal */
225
- export type CodeExecutionTool$Outbound = {
226
- path: string;
227
- key: string;
228
- display_name: string;
229
- description: string;
230
- status: string;
231
- version_hash?: string | undefined;
232
- type: string;
233
- code_tool: CodeTool$Outbound;
234
- _id?: string | undefined;
235
- requires_approval: boolean;
236
- };
237
-
238
- /** @internal */
239
- export const CodeExecutionTool$outboundSchema: z.ZodType<
240
- CodeExecutionTool$Outbound,
241
- z.ZodTypeDef,
242
- CodeExecutionTool
243
- > = z.object({
244
- path: z.string(),
245
- key: z.string(),
246
- displayName: z.string(),
247
- description: z.string(),
248
- status: CodeExecutionToolStatus$outboundSchema.default("live"),
249
- versionHash: z.string().optional(),
250
- type: CodeExecutionToolType$outboundSchema,
251
- codeTool: z.lazy(() => CodeTool$outboundSchema),
252
- id: z.string().optional(),
253
- requiresApproval: z.boolean().default(false),
254
- }).transform((v) => {
255
- return remap$(v, {
256
- displayName: "display_name",
257
- versionHash: "version_hash",
258
- codeTool: "code_tool",
259
- id: "_id",
260
- requiresApproval: "requires_approval",
261
- });
262
- });
263
-
264
- /**
265
- * @internal
266
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
267
- */
268
- export namespace CodeExecutionTool$ {
269
- /** @deprecated use `CodeExecutionTool$inboundSchema` instead. */
270
- export const inboundSchema = CodeExecutionTool$inboundSchema;
271
- /** @deprecated use `CodeExecutionTool$outboundSchema` instead. */
272
- export const outboundSchema = CodeExecutionTool$outboundSchema;
273
- /** @deprecated use `CodeExecutionTool$Outbound` instead. */
274
- export type Outbound = CodeExecutionTool$Outbound;
275
- }
276
-
277
- export function codeExecutionToolToJSON(
278
- codeExecutionTool: CodeExecutionTool,
279
- ): string {
280
- return JSON.stringify(
281
- CodeExecutionTool$outboundSchema.parse(codeExecutionTool),
282
- );
283
- }
284
-
285
- export function codeExecutionToolFromJSON(
286
- jsonString: string,
287
- ): SafeParseResult<CodeExecutionTool, SDKValidationError> {
288
- return safeParse(
289
- jsonString,
290
- (x) => CodeExecutionTool$inboundSchema.parse(JSON.parse(x)),
291
- `Failed to parse 'CodeExecutionTool' from JSON`,
292
- );
293
- }
@@ -1,107 +0,0 @@
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 CurrentDateToolType = {
13
- CurrentDate: "current_date",
14
- } as const;
15
- export type CurrentDateToolType = ClosedEnum<typeof CurrentDateToolType>;
16
-
17
- /**
18
- * Provides the current date and time
19
- */
20
- export type CurrentDateTool = {
21
- type: CurrentDateToolType;
22
- requiresApproval?: boolean | undefined;
23
- };
24
-
25
- /** @internal */
26
- export const CurrentDateToolType$inboundSchema: z.ZodNativeEnum<
27
- typeof CurrentDateToolType
28
- > = z.nativeEnum(CurrentDateToolType);
29
-
30
- /** @internal */
31
- export const CurrentDateToolType$outboundSchema: z.ZodNativeEnum<
32
- typeof CurrentDateToolType
33
- > = CurrentDateToolType$inboundSchema;
34
-
35
- /**
36
- * @internal
37
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
38
- */
39
- export namespace CurrentDateToolType$ {
40
- /** @deprecated use `CurrentDateToolType$inboundSchema` instead. */
41
- export const inboundSchema = CurrentDateToolType$inboundSchema;
42
- /** @deprecated use `CurrentDateToolType$outboundSchema` instead. */
43
- export const outboundSchema = CurrentDateToolType$outboundSchema;
44
- }
45
-
46
- /** @internal */
47
- export const CurrentDateTool$inboundSchema: z.ZodType<
48
- CurrentDateTool,
49
- z.ZodTypeDef,
50
- unknown
51
- > = z.object({
52
- type: CurrentDateToolType$inboundSchema,
53
- requires_approval: z.boolean().default(false),
54
- }).transform((v) => {
55
- return remap$(v, {
56
- "requires_approval": "requiresApproval",
57
- });
58
- });
59
-
60
- /** @internal */
61
- export type CurrentDateTool$Outbound = {
62
- type: string;
63
- requires_approval: boolean;
64
- };
65
-
66
- /** @internal */
67
- export const CurrentDateTool$outboundSchema: z.ZodType<
68
- CurrentDateTool$Outbound,
69
- z.ZodTypeDef,
70
- CurrentDateTool
71
- > = z.object({
72
- type: CurrentDateToolType$outboundSchema,
73
- requiresApproval: z.boolean().default(false),
74
- }).transform((v) => {
75
- return remap$(v, {
76
- requiresApproval: "requires_approval",
77
- });
78
- });
79
-
80
- /**
81
- * @internal
82
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
83
- */
84
- export namespace CurrentDateTool$ {
85
- /** @deprecated use `CurrentDateTool$inboundSchema` instead. */
86
- export const inboundSchema = CurrentDateTool$inboundSchema;
87
- /** @deprecated use `CurrentDateTool$outboundSchema` instead. */
88
- export const outboundSchema = CurrentDateTool$outboundSchema;
89
- /** @deprecated use `CurrentDateTool$Outbound` instead. */
90
- export type Outbound = CurrentDateTool$Outbound;
91
- }
92
-
93
- export function currentDateToolToJSON(
94
- currentDateTool: CurrentDateTool,
95
- ): string {
96
- return JSON.stringify(CurrentDateTool$outboundSchema.parse(currentDateTool));
97
- }
98
-
99
- export function currentDateToolFromJSON(
100
- jsonString: string,
101
- ): SafeParseResult<CurrentDateTool, SDKValidationError> {
102
- return safeParse(
103
- jsonString,
104
- (x) => CurrentDateTool$inboundSchema.parse(JSON.parse(x)),
105
- `Failed to parse 'CurrentDateTool' from JSON`,
106
- );
107
- }
@@ -1,195 +0,0 @@
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 FunctionToolType = {
13
- Function: "function",
14
- } as const;
15
- export type FunctionToolType = ClosedEnum<typeof FunctionToolType>;
16
-
17
- export type FunctionT = {
18
- name: string;
19
- description?: string | undefined;
20
- strict?: boolean | undefined;
21
- parameters?: { [k: string]: any } | undefined;
22
- };
23
-
24
- /**
25
- * Custom function tool with configurable parameters
26
- */
27
- export type FunctionTool = {
28
- type: FunctionToolType;
29
- id?: string | undefined;
30
- key: string;
31
- displayName?: string | undefined;
32
- description?: string | undefined;
33
- requiresApproval?: boolean | undefined;
34
- function: FunctionT;
35
- };
36
-
37
- /** @internal */
38
- export const FunctionToolType$inboundSchema: z.ZodNativeEnum<
39
- typeof FunctionToolType
40
- > = z.nativeEnum(FunctionToolType);
41
-
42
- /** @internal */
43
- export const FunctionToolType$outboundSchema: z.ZodNativeEnum<
44
- typeof FunctionToolType
45
- > = FunctionToolType$inboundSchema;
46
-
47
- /**
48
- * @internal
49
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
50
- */
51
- export namespace FunctionToolType$ {
52
- /** @deprecated use `FunctionToolType$inboundSchema` instead. */
53
- export const inboundSchema = FunctionToolType$inboundSchema;
54
- /** @deprecated use `FunctionToolType$outboundSchema` instead. */
55
- export const outboundSchema = FunctionToolType$outboundSchema;
56
- }
57
-
58
- /** @internal */
59
- export const FunctionT$inboundSchema: z.ZodType<
60
- FunctionT,
61
- z.ZodTypeDef,
62
- unknown
63
- > = z.object({
64
- name: z.string(),
65
- description: z.string().optional(),
66
- strict: z.boolean().optional(),
67
- parameters: z.record(z.any()).optional(),
68
- });
69
-
70
- /** @internal */
71
- export type FunctionT$Outbound = {
72
- name: string;
73
- description?: string | undefined;
74
- strict?: boolean | undefined;
75
- parameters?: { [k: string]: any } | undefined;
76
- };
77
-
78
- /** @internal */
79
- export const FunctionT$outboundSchema: z.ZodType<
80
- FunctionT$Outbound,
81
- z.ZodTypeDef,
82
- FunctionT
83
- > = z.object({
84
- name: z.string(),
85
- description: z.string().optional(),
86
- strict: z.boolean().optional(),
87
- parameters: z.record(z.any()).optional(),
88
- });
89
-
90
- /**
91
- * @internal
92
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
93
- */
94
- export namespace FunctionT$ {
95
- /** @deprecated use `FunctionT$inboundSchema` instead. */
96
- export const inboundSchema = FunctionT$inboundSchema;
97
- /** @deprecated use `FunctionT$outboundSchema` instead. */
98
- export const outboundSchema = FunctionT$outboundSchema;
99
- /** @deprecated use `FunctionT$Outbound` instead. */
100
- export type Outbound = FunctionT$Outbound;
101
- }
102
-
103
- export function functionToJSON(functionT: FunctionT): string {
104
- return JSON.stringify(FunctionT$outboundSchema.parse(functionT));
105
- }
106
-
107
- export function functionFromJSON(
108
- jsonString: string,
109
- ): SafeParseResult<FunctionT, SDKValidationError> {
110
- return safeParse(
111
- jsonString,
112
- (x) => FunctionT$inboundSchema.parse(JSON.parse(x)),
113
- `Failed to parse 'FunctionT' from JSON`,
114
- );
115
- }
116
-
117
- /** @internal */
118
- export const FunctionTool$inboundSchema: z.ZodType<
119
- FunctionTool,
120
- z.ZodTypeDef,
121
- unknown
122
- > = z.object({
123
- type: FunctionToolType$inboundSchema,
124
- _id: z.string().optional(),
125
- key: z.string(),
126
- display_name: z.string().optional(),
127
- description: z.string().optional(),
128
- requires_approval: z.boolean().default(false),
129
- function: z.lazy(() => FunctionT$inboundSchema),
130
- }).transform((v) => {
131
- return remap$(v, {
132
- "_id": "id",
133
- "display_name": "displayName",
134
- "requires_approval": "requiresApproval",
135
- });
136
- });
137
-
138
- /** @internal */
139
- export type FunctionTool$Outbound = {
140
- type: string;
141
- _id?: string | undefined;
142
- key: string;
143
- display_name?: string | undefined;
144
- description?: string | undefined;
145
- requires_approval: boolean;
146
- function: FunctionT$Outbound;
147
- };
148
-
149
- /** @internal */
150
- export const FunctionTool$outboundSchema: z.ZodType<
151
- FunctionTool$Outbound,
152
- z.ZodTypeDef,
153
- FunctionTool
154
- > = z.object({
155
- type: FunctionToolType$outboundSchema,
156
- id: z.string().optional(),
157
- key: z.string(),
158
- displayName: z.string().optional(),
159
- description: z.string().optional(),
160
- requiresApproval: z.boolean().default(false),
161
- function: z.lazy(() => FunctionT$outboundSchema),
162
- }).transform((v) => {
163
- return remap$(v, {
164
- id: "_id",
165
- displayName: "display_name",
166
- requiresApproval: "requires_approval",
167
- });
168
- });
169
-
170
- /**
171
- * @internal
172
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
173
- */
174
- export namespace FunctionTool$ {
175
- /** @deprecated use `FunctionTool$inboundSchema` instead. */
176
- export const inboundSchema = FunctionTool$inboundSchema;
177
- /** @deprecated use `FunctionTool$outboundSchema` instead. */
178
- export const outboundSchema = FunctionTool$outboundSchema;
179
- /** @deprecated use `FunctionTool$Outbound` instead. */
180
- export type Outbound = FunctionTool$Outbound;
181
- }
182
-
183
- export function functionToolToJSON(functionTool: FunctionTool): string {
184
- return JSON.stringify(FunctionTool$outboundSchema.parse(functionTool));
185
- }
186
-
187
- export function functionToolFromJSON(
188
- jsonString: string,
189
- ): SafeParseResult<FunctionTool, SDKValidationError> {
190
- return safeParse(
191
- jsonString,
192
- (x) => FunctionTool$inboundSchema.parse(JSON.parse(x)),
193
- `Failed to parse 'FunctionTool' from JSON`,
194
- );
195
- }