@orq-ai/node 4.12.0-rc.50 → 4.12.0-rc.52

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 (131) hide show
  1. package/jsr.json +1 -1
  2. package/lib/config.d.ts +2 -2
  3. package/lib/config.js +2 -2
  4. package/models/components/agenttoolinputcrud.d.ts +413 -0
  5. package/models/components/agenttoolinputcrud.d.ts.map +1 -0
  6. package/models/components/agenttoolinputcrud.js +287 -0
  7. package/models/components/agenttoolinputcrud.js.map +1 -0
  8. package/models/components/codetoolinput.d.ts +38 -0
  9. package/models/components/codetoolinput.d.ts.map +1 -0
  10. package/models/components/codetoolinput.js +58 -0
  11. package/models/components/codetoolinput.js.map +1 -0
  12. package/models/components/evaluatorresponsefunction.js +2 -2
  13. package/models/components/evaluatorresponsehttp.js +2 -2
  14. package/models/components/evaluatorresponsejsonschema.js +2 -2
  15. package/models/components/evaluatorresponsellm.js +2 -2
  16. package/models/components/evaluatorresponsepython.js +2 -2
  17. package/models/components/evaluatorresponseragas.js +2 -2
  18. package/models/components/evaluatorresponsetypescript.js +2 -2
  19. package/models/components/functiontoolinput.d.ts +33 -0
  20. package/models/components/functiontoolinput.d.ts.map +1 -0
  21. package/models/components/functiontoolinput.js +57 -0
  22. package/models/components/functiontoolinput.js.map +1 -0
  23. package/models/components/httptoolinput.d.ts +38 -0
  24. package/models/components/httptoolinput.d.ts.map +1 -0
  25. package/models/components/httptoolinput.js +58 -0
  26. package/models/components/httptoolinput.js.map +1 -0
  27. package/models/components/index.d.ts +7 -0
  28. package/models/components/index.d.ts.map +1 -1
  29. package/models/components/index.js +7 -0
  30. package/models/components/index.js.map +1 -1
  31. package/models/components/jsonschematoolinput.d.ts +33 -0
  32. package/models/components/jsonschematoolinput.d.ts.map +1 -0
  33. package/models/components/jsonschematoolinput.js +57 -0
  34. package/models/components/jsonschematoolinput.js.map +1 -0
  35. package/models/components/mcptoolinput.d.ts +38 -0
  36. package/models/components/mcptoolinput.d.ts.map +1 -0
  37. package/models/components/mcptoolinput.js +59 -0
  38. package/models/components/mcptoolinput.js.map +1 -0
  39. package/models/components/providertoolinput.d.ts +47 -0
  40. package/models/components/providertoolinput.d.ts.map +1 -0
  41. package/models/components/providertoolinput.js +59 -0
  42. package/models/components/providertoolinput.js.map +1 -0
  43. package/models/components/reasoningpart.js +1 -1
  44. package/models/operations/createagentrequest.d.ts +2 -677
  45. package/models/operations/createagentrequest.d.ts.map +1 -1
  46. package/models/operations/createagentrequest.js +6 -421
  47. package/models/operations/createagentrequest.js.map +1 -1
  48. package/models/operations/createdataset.js +1 -1
  49. package/models/operations/createdatasetitem.js +5 -5
  50. package/models/operations/createdatasource.js +1 -1
  51. package/models/operations/createrouterresponse.d.ts +8 -8
  52. package/models/operations/createrouterresponse.d.ts.map +1 -1
  53. package/models/operations/createrouterresponse.js +7 -7
  54. package/models/operations/createrouterresponse.js.map +1 -1
  55. package/models/operations/createtool.d.ts +18 -18
  56. package/models/operations/createtool.d.ts.map +1 -1
  57. package/models/operations/createtool.js +28 -28
  58. package/models/operations/createtool.js.map +1 -1
  59. package/models/operations/getalltools.js +6 -6
  60. package/models/operations/getv2humanevalsets.js +2 -2
  61. package/models/operations/getv2humanevalsetsid.js +2 -2
  62. package/models/operations/listdatasetdatapoints.js +5 -5
  63. package/models/operations/listdatasets.js +1 -1
  64. package/models/operations/listdatasources.js +1 -1
  65. package/models/operations/patchv2humanevalsetsid.js +2 -2
  66. package/models/operations/postv2feedbackevaluation.js +4 -4
  67. package/models/operations/postv2humanevalsets.js +2 -2
  68. package/models/operations/retrievedatapoint.js +5 -5
  69. package/models/operations/retrievedataset.js +1 -1
  70. package/models/operations/retrievedatasource.js +1 -1
  71. package/models/operations/retrievetool.js +6 -6
  72. package/models/operations/runagent.d.ts +52 -52
  73. package/models/operations/runagent.d.ts.map +1 -1
  74. package/models/operations/runagent.js +75 -75
  75. package/models/operations/runagent.js.map +1 -1
  76. package/models/operations/streamrunagent.d.ts +52 -52
  77. package/models/operations/streamrunagent.d.ts.map +1 -1
  78. package/models/operations/streamrunagent.js +75 -78
  79. package/models/operations/streamrunagent.js.map +1 -1
  80. package/models/operations/updateagent.d.ts +2 -677
  81. package/models/operations/updateagent.d.ts.map +1 -1
  82. package/models/operations/updateagent.js +6 -421
  83. package/models/operations/updateagent.js.map +1 -1
  84. package/models/operations/updatedatapoint.js +5 -5
  85. package/models/operations/updatedataset.js +1 -1
  86. package/models/operations/updatedatasource.js +1 -1
  87. package/models/operations/updatetool.js +7 -7
  88. package/package.json +6 -6
  89. package/src/lib/config.ts +2 -2
  90. package/src/models/components/agenttoolinputcrud.ts +747 -0
  91. package/src/models/components/codetoolinput.ts +62 -0
  92. package/src/models/components/evaluatorresponsefunction.ts +2 -2
  93. package/src/models/components/evaluatorresponsehttp.ts +2 -2
  94. package/src/models/components/evaluatorresponsejsonschema.ts +2 -2
  95. package/src/models/components/evaluatorresponsellm.ts +2 -2
  96. package/src/models/components/evaluatorresponsepython.ts +2 -2
  97. package/src/models/components/evaluatorresponseragas.ts +2 -2
  98. package/src/models/components/evaluatorresponsetypescript.ts +2 -2
  99. package/src/models/components/functiontoolinput.ts +60 -0
  100. package/src/models/components/httptoolinput.ts +62 -0
  101. package/src/models/components/index.ts +7 -0
  102. package/src/models/components/jsonschematoolinput.ts +60 -0
  103. package/src/models/components/mcptoolinput.ts +63 -0
  104. package/src/models/components/providertoolinput.ts +72 -0
  105. package/src/models/components/reasoningpart.ts +1 -1
  106. package/src/models/operations/createagentrequest.ts +1606 -2947
  107. package/src/models/operations/createdataset.ts +1 -1
  108. package/src/models/operations/createdatasetitem.ts +5 -5
  109. package/src/models/operations/createdatasource.ts +1 -1
  110. package/src/models/operations/createrouterresponse.ts +13 -13
  111. package/src/models/operations/createtool.ts +47 -61
  112. package/src/models/operations/getalltools.ts +6 -6
  113. package/src/models/operations/getv2humanevalsets.ts +2 -2
  114. package/src/models/operations/getv2humanevalsetsid.ts +2 -2
  115. package/src/models/operations/listdatasetdatapoints.ts +5 -5
  116. package/src/models/operations/listdatasets.ts +1 -1
  117. package/src/models/operations/listdatasources.ts +1 -1
  118. package/src/models/operations/patchv2humanevalsetsid.ts +2 -2
  119. package/src/models/operations/postv2feedbackevaluation.ts +4 -4
  120. package/src/models/operations/postv2humanevalsets.ts +2 -2
  121. package/src/models/operations/retrievedatapoint.ts +5 -5
  122. package/src/models/operations/retrievedataset.ts +1 -1
  123. package/src/models/operations/retrievedatasource.ts +1 -1
  124. package/src/models/operations/retrievetool.ts +6 -6
  125. package/src/models/operations/runagent.ts +195 -232
  126. package/src/models/operations/streamrunagent.ts +273 -328
  127. package/src/models/operations/updateagent.ts +1819 -3223
  128. package/src/models/operations/updatedatapoint.ts +5 -5
  129. package/src/models/operations/updatedataset.ts +1 -1
  130. package/src/models/operations/updatedatasource.ts +1 -1
  131. package/src/models/operations/updatetool.ts +7 -7
@@ -0,0 +1,62 @@
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
+
8
+ /**
9
+ * Executes code snippets in a sandboxed environment. Must reference a pre-created code tool by key or id.
10
+ */
11
+ export type CodeToolInput = {
12
+ /**
13
+ * Code execution tool type
14
+ */
15
+ type: "code";
16
+ /**
17
+ * The key of the pre-created code tool
18
+ */
19
+ key?: string | undefined;
20
+ /**
21
+ * The ID of the pre-created code tool
22
+ */
23
+ id?: string | undefined;
24
+ /**
25
+ * Whether this tool requires approval before execution
26
+ */
27
+ requiresApproval?: boolean | undefined;
28
+ /**
29
+ * Tool execution timeout in seconds for this agent (max: 2 minutes, the code sandbox cap). Overrides the timeout configured on the tool definition.
30
+ */
31
+ timeout?: number | undefined;
32
+ };
33
+
34
+ /** @internal */
35
+ export type CodeToolInput$Outbound = {
36
+ type: "code";
37
+ key?: string | undefined;
38
+ id?: string | undefined;
39
+ requires_approval: boolean;
40
+ timeout?: number | undefined;
41
+ };
42
+
43
+ /** @internal */
44
+ export const CodeToolInput$outboundSchema: z.ZodType<
45
+ CodeToolInput$Outbound,
46
+ z.ZodTypeDef,
47
+ CodeToolInput
48
+ > = z.object({
49
+ type: z.literal("code"),
50
+ key: z.string().optional(),
51
+ id: z.string().optional(),
52
+ requiresApproval: z.boolean().default(false),
53
+ timeout: z.number().optional(),
54
+ }).transform((v) => {
55
+ return remap$(v, {
56
+ requiresApproval: "requires_approval",
57
+ });
58
+ });
59
+
60
+ export function codeToolInputToJSON(codeToolInput: CodeToolInput): string {
61
+ return JSON.stringify(CodeToolInput$outboundSchema.parse(codeToolInput));
62
+ }
@@ -856,8 +856,8 @@ export const EvaluatorResponseFunction$inboundSchema: z.ZodType<
856
856
  > = z.object({
857
857
  _id: z.string(),
858
858
  description: z.string(),
859
- created: z.string().default("2026-07-22T02:07:57.897Z"),
860
- updated: z.string().default("2026-07-22T02:07:57.897Z"),
859
+ created: z.string().default("2026-07-22T10:01:41.367Z"),
860
+ updated: z.string().default("2026-07-22T10:01:41.367Z"),
861
861
  updated_by_id: z.nullable(z.string()).optional(),
862
862
  guardrail_config: z.any().optional(),
863
863
  type: z.literal("function_eval"),
@@ -42,8 +42,8 @@ export const EvaluatorResponseHttp$inboundSchema: z.ZodType<
42
42
  > = z.object({
43
43
  _id: z.string(),
44
44
  description: z.string(),
45
- created: z.string().default("2026-07-22T02:07:57.897Z"),
46
- updated: z.string().default("2026-07-22T02:07:57.897Z"),
45
+ created: z.string().default("2026-07-22T10:01:41.367Z"),
46
+ updated: z.string().default("2026-07-22T10:01:41.367Z"),
47
47
  updated_by_id: z.nullable(z.string()).optional(),
48
48
  guardrail_config: z.any().optional(),
49
49
  type: z.literal("http_eval"),
@@ -28,8 +28,8 @@ export const EvaluatorResponseJsonSchema$inboundSchema: z.ZodType<
28
28
  > = z.object({
29
29
  _id: z.string(),
30
30
  description: z.string(),
31
- created: z.string().default("2026-07-22T02:07:57.897Z"),
32
- updated: z.string().default("2026-07-22T02:07:57.897Z"),
31
+ created: z.string().default("2026-07-22T10:01:41.367Z"),
32
+ updated: z.string().default("2026-07-22T10:01:41.367Z"),
33
33
  updated_by_id: z.nullable(z.string()).optional(),
34
34
  guardrail_config: z.any().optional(),
35
35
  type: z.literal("json_schema"),
@@ -267,8 +267,8 @@ export const EvaluatorResponseLlm$inboundSchema: z.ZodType<
267
267
  > = z.object({
268
268
  _id: z.string(),
269
269
  description: z.string(),
270
- created: z.string().default("2026-07-22T02:07:57.897Z"),
271
- updated: z.string().default("2026-07-22T02:07:57.897Z"),
270
+ created: z.string().default("2026-07-22T10:01:41.367Z"),
271
+ updated: z.string().default("2026-07-22T10:01:41.367Z"),
272
272
  updated_by_id: z.nullable(z.string()).optional(),
273
273
  guardrail_config: z.any().optional(),
274
274
  type: z.literal("llm_eval"),
@@ -28,8 +28,8 @@ export const EvaluatorResponsePython$inboundSchema: z.ZodType<
28
28
  > = z.object({
29
29
  _id: z.string(),
30
30
  description: z.string(),
31
- created: z.string().default("2026-07-22T02:07:57.897Z"),
32
- updated: z.string().default("2026-07-22T02:07:57.897Z"),
31
+ created: z.string().default("2026-07-22T10:01:41.367Z"),
32
+ updated: z.string().default("2026-07-22T10:01:41.367Z"),
33
33
  updated_by_id: z.nullable(z.string()).optional(),
34
34
  guardrail_config: z.any().optional(),
35
35
  code: z.string(),
@@ -50,8 +50,8 @@ export const EvaluatorResponseRagas$inboundSchema: z.ZodType<
50
50
  > = z.object({
51
51
  _id: z.string(),
52
52
  description: z.string(),
53
- created: z.string().default("2026-07-22T02:07:57.897Z"),
54
- updated: z.string().default("2026-07-22T02:07:57.897Z"),
53
+ created: z.string().default("2026-07-22T10:01:41.367Z"),
54
+ updated: z.string().default("2026-07-22T10:01:41.367Z"),
55
55
  updated_by_id: z.nullable(z.string()).optional(),
56
56
  guardrail_config: z.any().optional(),
57
57
  type: z.literal("ragas"),
@@ -28,8 +28,8 @@ export const EvaluatorResponseTypescript$inboundSchema: z.ZodType<
28
28
  > = z.object({
29
29
  _id: z.string(),
30
30
  description: z.string(),
31
- created: z.string().default("2026-07-22T02:07:57.897Z"),
32
- updated: z.string().default("2026-07-22T02:07:57.897Z"),
31
+ created: z.string().default("2026-07-22T10:01:41.367Z"),
32
+ updated: z.string().default("2026-07-22T10:01:41.367Z"),
33
33
  updated_by_id: z.nullable(z.string()).optional(),
34
34
  guardrail_config: z.any().optional(),
35
35
  code: z.string(),
@@ -0,0 +1,60 @@
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
+
8
+ /**
9
+ * Calls custom function tools defined in the agent configuration. Must reference a pre-created function tool by key or id.
10
+ */
11
+ export type FunctionToolInput = {
12
+ /**
13
+ * Function tool type
14
+ */
15
+ type: "function";
16
+ /**
17
+ * The key of the pre-created function tool
18
+ */
19
+ key?: string | undefined;
20
+ /**
21
+ * The ID of the pre-created function tool
22
+ */
23
+ id?: string | undefined;
24
+ /**
25
+ * Whether this tool requires approval before execution
26
+ */
27
+ requiresApproval?: boolean | undefined;
28
+ };
29
+
30
+ /** @internal */
31
+ export type FunctionToolInput$Outbound = {
32
+ type: "function";
33
+ key?: string | undefined;
34
+ id?: string | undefined;
35
+ requires_approval: boolean;
36
+ };
37
+
38
+ /** @internal */
39
+ export const FunctionToolInput$outboundSchema: z.ZodType<
40
+ FunctionToolInput$Outbound,
41
+ z.ZodTypeDef,
42
+ FunctionToolInput
43
+ > = z.object({
44
+ type: z.literal("function"),
45
+ key: z.string().optional(),
46
+ id: z.string().optional(),
47
+ requiresApproval: z.boolean().default(false),
48
+ }).transform((v) => {
49
+ return remap$(v, {
50
+ requiresApproval: "requires_approval",
51
+ });
52
+ });
53
+
54
+ export function functionToolInputToJSON(
55
+ functionToolInput: FunctionToolInput,
56
+ ): string {
57
+ return JSON.stringify(
58
+ FunctionToolInput$outboundSchema.parse(functionToolInput),
59
+ );
60
+ }
@@ -0,0 +1,62 @@
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
+
8
+ /**
9
+ * Executes HTTP requests to interact with external APIs and web services. Must reference a pre-created HTTP tool by key or id.
10
+ */
11
+ export type HttpToolInput = {
12
+ /**
13
+ * HTTP tool type
14
+ */
15
+ type: "http";
16
+ /**
17
+ * The key of the pre-created HTTP tool
18
+ */
19
+ key?: string | undefined;
20
+ /**
21
+ * The ID of the pre-created HTTP tool
22
+ */
23
+ id?: string | undefined;
24
+ /**
25
+ * Whether this tool requires approval before execution
26
+ */
27
+ requiresApproval?: boolean | undefined;
28
+ /**
29
+ * Tool execution timeout in seconds for this agent (max: 10 minutes). Overrides the timeout configured on the tool definition.
30
+ */
31
+ timeout?: number | undefined;
32
+ };
33
+
34
+ /** @internal */
35
+ export type HttpToolInput$Outbound = {
36
+ type: "http";
37
+ key?: string | undefined;
38
+ id?: string | undefined;
39
+ requires_approval: boolean;
40
+ timeout?: number | undefined;
41
+ };
42
+
43
+ /** @internal */
44
+ export const HttpToolInput$outboundSchema: z.ZodType<
45
+ HttpToolInput$Outbound,
46
+ z.ZodTypeDef,
47
+ HttpToolInput
48
+ > = z.object({
49
+ type: z.literal("http"),
50
+ key: z.string().optional(),
51
+ id: z.string().optional(),
52
+ requiresApproval: z.boolean().default(false),
53
+ timeout: z.number().optional(),
54
+ }).transform((v) => {
55
+ return remap$(v, {
56
+ requiresApproval: "requires_approval",
57
+ });
58
+ });
59
+
60
+ export function httpToolInputToJSON(httpToolInput: HttpToolInput): string {
61
+ return JSON.stringify(HttpToolInput$outboundSchema.parse(httpToolInput));
62
+ }
@@ -13,6 +13,7 @@ export * from "./agentresponsemessage.js";
13
13
  export * from "./agentresponserequest.js";
14
14
  export * from "./agentstartedstreamingevent.js";
15
15
  export * from "./agentthoughtstreamingevent.js";
16
+ export * from "./agenttoolinputcrud.js";
16
17
  export * from "./aggregatetracesrequest.js";
17
18
  export * from "./aggregatetracesresponse.js";
18
19
  export * from "./allprojects.js";
@@ -37,6 +38,7 @@ export * from "./budgetscope.js";
37
38
  export * from "./budgetscopekind.js";
38
39
  export * from "./budgetsortfield.js";
39
40
  export * from "./budgetusage.js";
41
+ export * from "./codetoolinput.js";
40
42
  export * from "./config.js";
41
43
  export * from "./conversationparam.js";
42
44
  export * from "./countwebhooksresponse.js";
@@ -102,6 +104,7 @@ export * from "./filecontentpartschema.js";
102
104
  export * from "./filepart.js";
103
105
  export * from "./filepurpose.js";
104
106
  export * from "./filter.js";
107
+ export * from "./functiontoolinput.js";
105
108
  export * from "./generatewebhooksecretresponse.js";
106
109
  export * from "./getagentresponse.js";
107
110
  export * from "./getapikeyresponse.js";
@@ -117,6 +120,7 @@ export * from "./gettraceresponse.js";
117
120
  export * from "./gettracespanresponse.js";
118
121
  export * from "./guardrailref.js";
119
122
  export * from "./guardrailrule.js";
123
+ export * from "./httptoolinput.js";
120
124
  export * from "./identity.js";
121
125
  export * from "./identitybudgetscope.js";
122
126
  export * from "./identitymetrics.js";
@@ -125,6 +129,7 @@ export * from "./imagecontentpartschema.js";
125
129
  export * from "./incompletedetails.js";
126
130
  export * from "./inputtokensdetails.js";
127
131
  export * from "./invokedeploymentrequest.js";
132
+ export * from "./jsonschematoolinput.js";
128
133
  export * from "./legacytokenfamily.js";
129
134
  export * from "./limits.js";
130
135
  export * from "./listapikeysresponse.js";
@@ -148,6 +153,7 @@ export * from "./litellmparams.js";
148
153
  export * from "./managementkey.js";
149
154
  export * from "./managementkeystatus.js";
150
155
  export * from "./managementpermissionmode.js";
156
+ export * from "./mcptoolinput.js";
151
157
  export * from "./memoryparam.js";
152
158
  export * from "./modelbudgetscope.js";
153
159
  export * from "./modelconfigurationresponse.js";
@@ -178,6 +184,7 @@ export * from "./project.js";
178
184
  export * from "./projectbudgetscope.js";
179
185
  export * from "./projectscope.js";
180
186
  export * from "./providerbudgetscope.js";
187
+ export * from "./providertoolinput.js";
181
188
  export * from "./publiccontact.js";
182
189
  export * from "./publicembeddingdata.js";
183
190
  export * from "./publicembeddingusage.js";
@@ -0,0 +1,60 @@
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
+
8
+ /**
9
+ * Enforces structured output format using JSON Schema. Must reference a pre-created JSON Schema tool by key or id.
10
+ */
11
+ export type JsonSchemaToolInput = {
12
+ /**
13
+ * JSON Schema tool type
14
+ */
15
+ type: "json_schema";
16
+ /**
17
+ * The key of the pre-created JSON Schema tool
18
+ */
19
+ key?: string | undefined;
20
+ /**
21
+ * The ID of the pre-created JSON Schema tool
22
+ */
23
+ id?: string | undefined;
24
+ /**
25
+ * Whether this tool requires approval before execution
26
+ */
27
+ requiresApproval?: boolean | undefined;
28
+ };
29
+
30
+ /** @internal */
31
+ export type JsonSchemaToolInput$Outbound = {
32
+ type: "json_schema";
33
+ key?: string | undefined;
34
+ id?: string | undefined;
35
+ requires_approval: boolean;
36
+ };
37
+
38
+ /** @internal */
39
+ export const JsonSchemaToolInput$outboundSchema: z.ZodType<
40
+ JsonSchemaToolInput$Outbound,
41
+ z.ZodTypeDef,
42
+ JsonSchemaToolInput
43
+ > = z.object({
44
+ type: z.literal("json_schema"),
45
+ key: z.string().optional(),
46
+ id: z.string().optional(),
47
+ requiresApproval: z.boolean().default(false),
48
+ }).transform((v) => {
49
+ return remap$(v, {
50
+ requiresApproval: "requires_approval",
51
+ });
52
+ });
53
+
54
+ export function jsonSchemaToolInputToJSON(
55
+ jsonSchemaToolInput: JsonSchemaToolInput,
56
+ ): string {
57
+ return JSON.stringify(
58
+ JsonSchemaToolInput$outboundSchema.parse(jsonSchemaToolInput),
59
+ );
60
+ }
@@ -0,0 +1,63 @@
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
+
8
+ /**
9
+ * Executes tools from Model Context Protocol (MCP) servers. Specify the parent MCP tool using "key" or "id", and the specific nested tool using "tool_id".
10
+ */
11
+ export type McpToolInput = {
12
+ /**
13
+ * MCP tool type
14
+ */
15
+ type: "mcp";
16
+ /**
17
+ * The key of the parent MCP tool
18
+ */
19
+ key?: string | undefined;
20
+ /**
21
+ * The ID of the parent MCP tool
22
+ */
23
+ id?: string | undefined;
24
+ /**
25
+ * The ID of the specific nested tool within the MCP server
26
+ */
27
+ toolId: string;
28
+ /**
29
+ * Whether this tool requires approval before execution
30
+ */
31
+ requiresApproval?: boolean | undefined;
32
+ };
33
+
34
+ /** @internal */
35
+ export type McpToolInput$Outbound = {
36
+ type: "mcp";
37
+ key?: string | undefined;
38
+ id?: string | undefined;
39
+ tool_id: string;
40
+ requires_approval: boolean;
41
+ };
42
+
43
+ /** @internal */
44
+ export const McpToolInput$outboundSchema: z.ZodType<
45
+ McpToolInput$Outbound,
46
+ z.ZodTypeDef,
47
+ McpToolInput
48
+ > = z.object({
49
+ type: z.literal("mcp"),
50
+ key: z.string().optional(),
51
+ id: z.string().optional(),
52
+ toolId: z.string(),
53
+ requiresApproval: z.boolean().default(false),
54
+ }).transform((v) => {
55
+ return remap$(v, {
56
+ toolId: "tool_id",
57
+ requiresApproval: "requires_approval",
58
+ });
59
+ });
60
+
61
+ export function mcpToolInputToJSON(mcpToolInput: McpToolInput): string {
62
+ return JSON.stringify(McpToolInput$outboundSchema.parse(mcpToolInput));
63
+ }
@@ -0,0 +1,72 @@
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
+
8
+ /**
9
+ * Provider-specific built-in tools that are passed through to the provider. Must be prefixed with the provider name (e.g., openai:web_search, anthropic:web_search_20250305, google:google_search).
10
+ */
11
+ export type ProviderToolInput = {
12
+ /**
13
+ * Provider-prefixed tool type
14
+ */
15
+ type: string;
16
+ /**
17
+ * The key of a pre-created tool
18
+ */
19
+ key?: string | undefined;
20
+ /**
21
+ * The ID of a pre-created tool
22
+ */
23
+ id?: string | undefined;
24
+ /**
25
+ * Tool execution timeout in seconds for this agent (max: 10 minutes). Overrides the timeout configured on the tool definition.
26
+ */
27
+ timeout?: number | undefined;
28
+ /**
29
+ * Whether this tool requires approval before execution
30
+ */
31
+ requiresApproval?: boolean | undefined;
32
+ /**
33
+ * Static tool configuration set at design time. Merged over LLM-provided arguments at execution time.
34
+ */
35
+ configuration?: { [k: string]: any } | undefined;
36
+ };
37
+
38
+ /** @internal */
39
+ export type ProviderToolInput$Outbound = {
40
+ type: string;
41
+ key?: string | undefined;
42
+ id?: string | undefined;
43
+ timeout?: number | undefined;
44
+ requires_approval?: boolean | undefined;
45
+ configuration?: { [k: string]: any } | undefined;
46
+ };
47
+
48
+ /** @internal */
49
+ export const ProviderToolInput$outboundSchema: z.ZodType<
50
+ ProviderToolInput$Outbound,
51
+ z.ZodTypeDef,
52
+ ProviderToolInput
53
+ > = z.object({
54
+ type: z.string(),
55
+ key: z.string().optional(),
56
+ id: z.string().optional(),
57
+ timeout: z.number().optional(),
58
+ requiresApproval: z.boolean().optional(),
59
+ configuration: z.record(z.any()).optional(),
60
+ }).transform((v) => {
61
+ return remap$(v, {
62
+ requiresApproval: "requires_approval",
63
+ });
64
+ });
65
+
66
+ export function providerToolInputToJSON(
67
+ providerToolInput: ProviderToolInput,
68
+ ): string {
69
+ return JSON.stringify(
70
+ ProviderToolInput$outboundSchema.parse(providerToolInput),
71
+ );
72
+ }
@@ -40,7 +40,7 @@ export const ReasoningPart$inboundSchema: z.ZodType<
40
40
  z.ZodTypeDef,
41
41
  unknown
42
42
  > = z.object({
43
- _id: z.string().default("reasoning_01ky3s9nv5va091qvgv294kecq"),
43
+ _id: z.string().default("reasoning_01ky4mctxaxsf4cs89a6bfvyy9"),
44
44
  metadata: z.record(z.any()).optional(),
45
45
  kind: z.literal("reasoning"),
46
46
  reasoning: z.string(),