@orq-ai/node 4.2.0-rc.27 → 4.2.0-rc.29
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.
- package/bin/mcp-server.js +458 -268
- package/bin/mcp-server.js.map +43 -43
- package/examples/package-lock.json +1 -1
- package/jsr.json +1 -1
- package/lib/config.d.ts +2 -2
- package/lib/config.js +2 -2
- package/mcp-server/mcp-server.js +1 -1
- package/mcp-server/server.js +1 -1
- package/models/components/conversationresponse.js +2 -2
- package/models/components/conversationwithmessagesresponse.js +2 -2
- package/models/components/partdoneevent.js +2 -2
- package/models/components/reasoningpart.js +2 -2
- package/models/operations/createagentrequest.d.ts +58 -10
- package/models/operations/createagentrequest.d.ts.map +1 -1
- package/models/operations/createagentrequest.js +59 -13
- package/models/operations/createagentrequest.js.map +1 -1
- package/models/operations/createcontact.js +2 -2
- package/models/operations/createconversation.js +2 -2
- package/models/operations/createconversationresponse.js +4 -4
- package/models/operations/createdataset.js +2 -2
- package/models/operations/createdatasetitem.js +8 -8
- package/models/operations/createdatasource.js +2 -2
- package/models/operations/createeval.js +28 -28
- package/models/operations/createtool.d.ts +8 -8
- package/models/operations/createtool.d.ts.map +1 -1
- package/models/operations/createtool.js +23 -23
- package/models/operations/createtool.js.map +1 -1
- package/models/operations/fileget.js +2 -2
- package/models/operations/filelist.js +2 -2
- package/models/operations/fileupload.js +2 -2
- package/models/operations/generateconversationname.js +2 -2
- package/models/operations/getalltools.js +12 -12
- package/models/operations/getevals.js +28 -28
- package/models/operations/listcontacts.js +2 -2
- package/models/operations/listdatasetdatapoints.js +8 -8
- package/models/operations/listdatasets.js +2 -2
- package/models/operations/listdatasources.js +2 -2
- package/models/operations/retrievecontact.js +2 -2
- package/models/operations/retrievedatapoint.js +8 -8
- package/models/operations/retrievedataset.js +2 -2
- package/models/operations/retrievedatasource.js +2 -2
- package/models/operations/retrievetool.js +12 -12
- package/models/operations/runagent.d.ts +120 -18
- package/models/operations/runagent.d.ts.map +1 -1
- package/models/operations/runagent.js +117 -22
- package/models/operations/runagent.js.map +1 -1
- package/models/operations/streamrunagent.d.ts +120 -18
- package/models/operations/streamrunagent.d.ts.map +1 -1
- package/models/operations/streamrunagent.js +117 -20
- package/models/operations/streamrunagent.js.map +1 -1
- package/models/operations/updateagent.d.ts +58 -10
- package/models/operations/updateagent.d.ts.map +1 -1
- package/models/operations/updateagent.js +59 -13
- package/models/operations/updateagent.js.map +1 -1
- package/models/operations/updatecontact.js +2 -2
- package/models/operations/updateconversation.js +2 -2
- package/models/operations/updatedatapoint.js +8 -8
- package/models/operations/updatedataset.js +2 -2
- package/models/operations/updatedatasource.js +2 -2
- package/models/operations/updateeval.js +28 -28
- package/models/operations/updatetool.js +14 -14
- package/package.json +1 -1
- package/src/lib/config.ts +2 -2
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +1 -1
- package/src/models/components/conversationresponse.ts +2 -2
- package/src/models/components/conversationwithmessagesresponse.ts +2 -2
- package/src/models/components/partdoneevent.ts +2 -2
- package/src/models/components/reasoningpart.ts +2 -2
- package/src/models/operations/createagentrequest.ts +132 -15
- package/src/models/operations/createcontact.ts +2 -2
- package/src/models/operations/createconversation.ts +2 -2
- package/src/models/operations/createconversationresponse.ts +4 -4
- package/src/models/operations/createdataset.ts +2 -2
- package/src/models/operations/createdatasetitem.ts +8 -8
- package/src/models/operations/createdatasource.ts +2 -2
- package/src/models/operations/createeval.ts +28 -28
- package/src/models/operations/createtool.ts +33 -29
- package/src/models/operations/fileget.ts +2 -2
- package/src/models/operations/filelist.ts +2 -2
- package/src/models/operations/fileupload.ts +2 -2
- package/src/models/operations/generateconversationname.ts +2 -2
- package/src/models/operations/getalltools.ts +12 -12
- package/src/models/operations/getevals.ts +28 -28
- package/src/models/operations/listcontacts.ts +2 -2
- package/src/models/operations/listdatasetdatapoints.ts +8 -8
- package/src/models/operations/listdatasets.ts +2 -2
- package/src/models/operations/listdatasources.ts +2 -2
- package/src/models/operations/retrievecontact.ts +2 -2
- package/src/models/operations/retrievedatapoint.ts +8 -8
- package/src/models/operations/retrievedataset.ts +2 -2
- package/src/models/operations/retrievedatasource.ts +2 -2
- package/src/models/operations/retrievetool.ts +12 -12
- package/src/models/operations/runagent.ts +280 -36
- package/src/models/operations/streamrunagent.ts +323 -46
- package/src/models/operations/updateagent.ts +138 -15
- package/src/models/operations/updatecontact.ts +2 -2
- package/src/models/operations/updateconversation.ts +2 -2
- package/src/models/operations/updatedatapoint.ts +8 -8
- package/src/models/operations/updatedataset.ts +2 -2
- package/src/models/operations/updatedatasource.ts +2 -2
- package/src/models/operations/updateeval.ts +28 -28
- package/src/models/operations/updatetool.ts +14 -14
|
@@ -988,17 +988,17 @@ export type AgentToolInputRunHeaders = {
|
|
|
988
988
|
encrypted?: boolean | undefined;
|
|
989
989
|
};
|
|
990
990
|
|
|
991
|
-
export const
|
|
991
|
+
export const RunAgentAgentToolInputRunAgentsRequestRequestBodySettingsTools16McpType =
|
|
992
992
|
{
|
|
993
993
|
Object: "object",
|
|
994
994
|
} as const;
|
|
995
|
-
export type
|
|
995
|
+
export type RunAgentAgentToolInputRunAgentsRequestRequestBodySettingsTools16McpType =
|
|
996
996
|
ClosedEnum<
|
|
997
|
-
typeof
|
|
997
|
+
typeof RunAgentAgentToolInputRunAgentsRequestRequestBodySettingsTools16McpType
|
|
998
998
|
>;
|
|
999
999
|
|
|
1000
|
-
export type
|
|
1001
|
-
type:
|
|
1000
|
+
export type AgentToolInputRunSchema = {
|
|
1001
|
+
type: RunAgentAgentToolInputRunAgentsRequestRequestBodySettingsTools16McpType;
|
|
1002
1002
|
properties?: { [k: string]: any } | undefined;
|
|
1003
1003
|
required?: Array<string> | undefined;
|
|
1004
1004
|
};
|
|
@@ -1007,7 +1007,7 @@ export type Tools = {
|
|
|
1007
1007
|
id?: string | undefined;
|
|
1008
1008
|
name: string;
|
|
1009
1009
|
description?: string | undefined;
|
|
1010
|
-
schema:
|
|
1010
|
+
schema: AgentToolInputRunSchema;
|
|
1011
1011
|
};
|
|
1012
1012
|
|
|
1013
1013
|
/**
|
|
@@ -1060,6 +1060,63 @@ export type MCPToolRun = {
|
|
|
1060
1060
|
requiresApproval?: boolean | undefined;
|
|
1061
1061
|
};
|
|
1062
1062
|
|
|
1063
|
+
/**
|
|
1064
|
+
* The schema for the response format, described as a JSON Schema object. See the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for documentation about the format.
|
|
1065
|
+
*/
|
|
1066
|
+
export type Schema = {
|
|
1067
|
+
/**
|
|
1068
|
+
* The JSON Schema type
|
|
1069
|
+
*/
|
|
1070
|
+
type: string;
|
|
1071
|
+
/**
|
|
1072
|
+
* The properties of the JSON Schema object
|
|
1073
|
+
*/
|
|
1074
|
+
properties: { [k: string]: any };
|
|
1075
|
+
/**
|
|
1076
|
+
* Array of required property names
|
|
1077
|
+
*/
|
|
1078
|
+
required: Array<string>;
|
|
1079
|
+
additionalProperties?: { [k: string]: any } | undefined;
|
|
1080
|
+
};
|
|
1081
|
+
|
|
1082
|
+
export type AgentToolInputRunJsonSchema = {
|
|
1083
|
+
/**
|
|
1084
|
+
* The name of the response format. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.
|
|
1085
|
+
*/
|
|
1086
|
+
name: string;
|
|
1087
|
+
/**
|
|
1088
|
+
* A description of what the response format is for. This will be shown to the user.
|
|
1089
|
+
*/
|
|
1090
|
+
description: string;
|
|
1091
|
+
/**
|
|
1092
|
+
* The schema for the response format, described as a JSON Schema object. See the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for documentation about the format.
|
|
1093
|
+
*/
|
|
1094
|
+
schema: Schema;
|
|
1095
|
+
/**
|
|
1096
|
+
* Whether to enable strict schema adherence when generating the output. If set to true, the model will always follow the exact schema defined in the `schema` field. Only a subset of JSON Schema is supported when `strict` is `true`. Only compatible with `OpenAI` models.
|
|
1097
|
+
*/
|
|
1098
|
+
strict?: boolean | undefined;
|
|
1099
|
+
};
|
|
1100
|
+
|
|
1101
|
+
/**
|
|
1102
|
+
* JSON Schema tool with inline definition for on-the-fly creation in run endpoint
|
|
1103
|
+
*/
|
|
1104
|
+
export type JSONSchemaToolRun = {
|
|
1105
|
+
type: "json_schema";
|
|
1106
|
+
/**
|
|
1107
|
+
* Unique key of the tool as it will be displayed in the UI
|
|
1108
|
+
*/
|
|
1109
|
+
key: string;
|
|
1110
|
+
id?: string | undefined;
|
|
1111
|
+
displayName?: string | undefined;
|
|
1112
|
+
/**
|
|
1113
|
+
* 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.
|
|
1114
|
+
*/
|
|
1115
|
+
description: string;
|
|
1116
|
+
jsonSchema: AgentToolInputRunJsonSchema;
|
|
1117
|
+
requiresApproval?: boolean | undefined;
|
|
1118
|
+
};
|
|
1119
|
+
|
|
1063
1120
|
/**
|
|
1064
1121
|
* The type must be "object"
|
|
1065
1122
|
*/
|
|
@@ -1438,7 +1495,7 @@ export type AgentToolInputRunGoogleSearchTool = {
|
|
|
1438
1495
|
};
|
|
1439
1496
|
|
|
1440
1497
|
/**
|
|
1441
|
-
* Tool configuration for agent run operations. Built-in tools only require a type and requires_approval, while custom tools (HTTP, Code, Function, MCP) support full inline definitions for on-the-fly creation.
|
|
1498
|
+
* Tool configuration for agent run operations. Built-in tools only require a type and requires_approval, while custom tools (HTTP, Code, Function, JSON Schema, MCP) support full inline definitions for on-the-fly creation.
|
|
1442
1499
|
*/
|
|
1443
1500
|
export type AgentToolInputRun =
|
|
1444
1501
|
| AgentToolInputRunGoogleSearchTool
|
|
@@ -1455,6 +1512,7 @@ export type AgentToolInputRun =
|
|
|
1455
1512
|
| HTTPToolRun
|
|
1456
1513
|
| CodeToolRun
|
|
1457
1514
|
| FunctionToolRun
|
|
1515
|
+
| JSONSchemaToolRun
|
|
1458
1516
|
| MCPToolRun;
|
|
1459
1517
|
|
|
1460
1518
|
/**
|
|
@@ -1548,6 +1606,7 @@ export type RunAgentSettings = {
|
|
|
1548
1606
|
| HTTPToolRun
|
|
1549
1607
|
| CodeToolRun
|
|
1550
1608
|
| FunctionToolRun
|
|
1609
|
+
| JSONSchemaToolRun
|
|
1551
1610
|
| MCPToolRun
|
|
1552
1611
|
>
|
|
1553
1612
|
| undefined;
|
|
@@ -4447,73 +4506,80 @@ export function agentToolInputRunHeadersFromJSON(
|
|
|
4447
4506
|
}
|
|
4448
4507
|
|
|
4449
4508
|
/** @internal */
|
|
4450
|
-
export const
|
|
4509
|
+
export const RunAgentAgentToolInputRunAgentsRequestRequestBodySettingsTools16McpType$inboundSchema:
|
|
4451
4510
|
z.ZodNativeEnum<
|
|
4452
|
-
typeof
|
|
4511
|
+
typeof RunAgentAgentToolInputRunAgentsRequestRequestBodySettingsTools16McpType
|
|
4453
4512
|
> = z.nativeEnum(
|
|
4454
|
-
|
|
4513
|
+
RunAgentAgentToolInputRunAgentsRequestRequestBodySettingsTools16McpType,
|
|
4455
4514
|
);
|
|
4456
4515
|
/** @internal */
|
|
4457
|
-
export const
|
|
4516
|
+
export const RunAgentAgentToolInputRunAgentsRequestRequestBodySettingsTools16McpType$outboundSchema:
|
|
4458
4517
|
z.ZodNativeEnum<
|
|
4459
|
-
typeof
|
|
4518
|
+
typeof RunAgentAgentToolInputRunAgentsRequestRequestBodySettingsTools16McpType
|
|
4460
4519
|
> =
|
|
4461
|
-
|
|
4520
|
+
RunAgentAgentToolInputRunAgentsRequestRequestBodySettingsTools16McpType$inboundSchema;
|
|
4462
4521
|
|
|
4463
4522
|
/** @internal */
|
|
4464
|
-
export const
|
|
4465
|
-
|
|
4466
|
-
|
|
4467
|
-
|
|
4468
|
-
|
|
4469
|
-
|
|
4470
|
-
|
|
4523
|
+
export const AgentToolInputRunSchema$inboundSchema: z.ZodType<
|
|
4524
|
+
AgentToolInputRunSchema,
|
|
4525
|
+
z.ZodTypeDef,
|
|
4526
|
+
unknown
|
|
4527
|
+
> = z.object({
|
|
4528
|
+
type:
|
|
4529
|
+
RunAgentAgentToolInputRunAgentsRequestRequestBodySettingsTools16McpType$inboundSchema,
|
|
4530
|
+
properties: z.record(z.any()).optional(),
|
|
4531
|
+
required: z.array(z.string()).optional(),
|
|
4532
|
+
});
|
|
4471
4533
|
/** @internal */
|
|
4472
|
-
export type
|
|
4534
|
+
export type AgentToolInputRunSchema$Outbound = {
|
|
4473
4535
|
type: string;
|
|
4474
4536
|
properties?: { [k: string]: any } | undefined;
|
|
4475
4537
|
required?: Array<string> | undefined;
|
|
4476
4538
|
};
|
|
4477
4539
|
|
|
4478
4540
|
/** @internal */
|
|
4479
|
-
export const
|
|
4480
|
-
|
|
4541
|
+
export const AgentToolInputRunSchema$outboundSchema: z.ZodType<
|
|
4542
|
+
AgentToolInputRunSchema$Outbound,
|
|
4481
4543
|
z.ZodTypeDef,
|
|
4482
|
-
|
|
4544
|
+
AgentToolInputRunSchema
|
|
4483
4545
|
> = z.object({
|
|
4484
4546
|
type:
|
|
4485
|
-
|
|
4547
|
+
RunAgentAgentToolInputRunAgentsRequestRequestBodySettingsTools16McpType$outboundSchema,
|
|
4486
4548
|
properties: z.record(z.any()).optional(),
|
|
4487
4549
|
required: z.array(z.string()).optional(),
|
|
4488
4550
|
});
|
|
4489
4551
|
|
|
4490
|
-
export function
|
|
4491
|
-
|
|
4552
|
+
export function agentToolInputRunSchemaToJSON(
|
|
4553
|
+
agentToolInputRunSchema: AgentToolInputRunSchema,
|
|
4554
|
+
): string {
|
|
4555
|
+
return JSON.stringify(
|
|
4556
|
+
AgentToolInputRunSchema$outboundSchema.parse(agentToolInputRunSchema),
|
|
4557
|
+
);
|
|
4492
4558
|
}
|
|
4493
|
-
export function
|
|
4559
|
+
export function agentToolInputRunSchemaFromJSON(
|
|
4494
4560
|
jsonString: string,
|
|
4495
|
-
): SafeParseResult<
|
|
4561
|
+
): SafeParseResult<AgentToolInputRunSchema, SDKValidationError> {
|
|
4496
4562
|
return safeParse(
|
|
4497
4563
|
jsonString,
|
|
4498
|
-
(x) =>
|
|
4499
|
-
`Failed to parse '
|
|
4564
|
+
(x) => AgentToolInputRunSchema$inboundSchema.parse(JSON.parse(x)),
|
|
4565
|
+
`Failed to parse 'AgentToolInputRunSchema' from JSON`,
|
|
4500
4566
|
);
|
|
4501
4567
|
}
|
|
4502
4568
|
|
|
4503
4569
|
/** @internal */
|
|
4504
4570
|
export const Tools$inboundSchema: z.ZodType<Tools, z.ZodTypeDef, unknown> = z
|
|
4505
4571
|
.object({
|
|
4506
|
-
id: z.string().default("
|
|
4572
|
+
id: z.string().default("01KEYB6F3GH4FMYVD3Y08AGCJP"),
|
|
4507
4573
|
name: z.string(),
|
|
4508
4574
|
description: z.string().optional(),
|
|
4509
|
-
schema: z.lazy(() =>
|
|
4575
|
+
schema: z.lazy(() => AgentToolInputRunSchema$inboundSchema),
|
|
4510
4576
|
});
|
|
4511
4577
|
/** @internal */
|
|
4512
4578
|
export type Tools$Outbound = {
|
|
4513
4579
|
id: string;
|
|
4514
4580
|
name: string;
|
|
4515
4581
|
description?: string | undefined;
|
|
4516
|
-
schema:
|
|
4582
|
+
schema: AgentToolInputRunSchema$Outbound;
|
|
4517
4583
|
};
|
|
4518
4584
|
|
|
4519
4585
|
/** @internal */
|
|
@@ -4522,10 +4588,10 @@ export const Tools$outboundSchema: z.ZodType<
|
|
|
4522
4588
|
z.ZodTypeDef,
|
|
4523
4589
|
Tools
|
|
4524
4590
|
> = z.object({
|
|
4525
|
-
id: z.string().default("
|
|
4591
|
+
id: z.string().default("01KEYB6F3GH4FMYVD3Y08AGCJP"),
|
|
4526
4592
|
name: z.string(),
|
|
4527
4593
|
description: z.string().optional(),
|
|
4528
|
-
schema: z.lazy(() =>
|
|
4594
|
+
schema: z.lazy(() => AgentToolInputRunSchema$outboundSchema),
|
|
4529
4595
|
});
|
|
4530
4596
|
|
|
4531
4597
|
export function toolsToJSON(tools: Tools): string {
|
|
@@ -4665,6 +4731,178 @@ export function mcpToolRunFromJSON(
|
|
|
4665
4731
|
);
|
|
4666
4732
|
}
|
|
4667
4733
|
|
|
4734
|
+
/** @internal */
|
|
4735
|
+
export const Schema$inboundSchema: z.ZodType<Schema, z.ZodTypeDef, unknown> =
|
|
4736
|
+
collectExtraKeys$(
|
|
4737
|
+
z.object({
|
|
4738
|
+
type: z.string(),
|
|
4739
|
+
properties: z.record(z.any()),
|
|
4740
|
+
required: z.array(z.string()),
|
|
4741
|
+
}).catchall(z.any()),
|
|
4742
|
+
"additionalProperties",
|
|
4743
|
+
true,
|
|
4744
|
+
);
|
|
4745
|
+
/** @internal */
|
|
4746
|
+
export type Schema$Outbound = {
|
|
4747
|
+
type: string;
|
|
4748
|
+
properties: { [k: string]: any };
|
|
4749
|
+
required: Array<string>;
|
|
4750
|
+
[additionalProperties: string]: unknown;
|
|
4751
|
+
};
|
|
4752
|
+
|
|
4753
|
+
/** @internal */
|
|
4754
|
+
export const Schema$outboundSchema: z.ZodType<
|
|
4755
|
+
Schema$Outbound,
|
|
4756
|
+
z.ZodTypeDef,
|
|
4757
|
+
Schema
|
|
4758
|
+
> = z.object({
|
|
4759
|
+
type: z.string(),
|
|
4760
|
+
properties: z.record(z.any()),
|
|
4761
|
+
required: z.array(z.string()),
|
|
4762
|
+
additionalProperties: z.record(z.any()).optional(),
|
|
4763
|
+
}).transform((v) => {
|
|
4764
|
+
return {
|
|
4765
|
+
...v.additionalProperties,
|
|
4766
|
+
...remap$(v, {
|
|
4767
|
+
additionalProperties: null,
|
|
4768
|
+
}),
|
|
4769
|
+
};
|
|
4770
|
+
});
|
|
4771
|
+
|
|
4772
|
+
export function schemaToJSON(schema: Schema): string {
|
|
4773
|
+
return JSON.stringify(Schema$outboundSchema.parse(schema));
|
|
4774
|
+
}
|
|
4775
|
+
export function schemaFromJSON(
|
|
4776
|
+
jsonString: string,
|
|
4777
|
+
): SafeParseResult<Schema, SDKValidationError> {
|
|
4778
|
+
return safeParse(
|
|
4779
|
+
jsonString,
|
|
4780
|
+
(x) => Schema$inboundSchema.parse(JSON.parse(x)),
|
|
4781
|
+
`Failed to parse 'Schema' from JSON`,
|
|
4782
|
+
);
|
|
4783
|
+
}
|
|
4784
|
+
|
|
4785
|
+
/** @internal */
|
|
4786
|
+
export const AgentToolInputRunJsonSchema$inboundSchema: z.ZodType<
|
|
4787
|
+
AgentToolInputRunJsonSchema,
|
|
4788
|
+
z.ZodTypeDef,
|
|
4789
|
+
unknown
|
|
4790
|
+
> = z.object({
|
|
4791
|
+
name: z.string(),
|
|
4792
|
+
description: z.string(),
|
|
4793
|
+
schema: z.lazy(() => Schema$inboundSchema),
|
|
4794
|
+
strict: z.boolean().optional(),
|
|
4795
|
+
});
|
|
4796
|
+
/** @internal */
|
|
4797
|
+
export type AgentToolInputRunJsonSchema$Outbound = {
|
|
4798
|
+
name: string;
|
|
4799
|
+
description: string;
|
|
4800
|
+
schema: Schema$Outbound;
|
|
4801
|
+
strict?: boolean | undefined;
|
|
4802
|
+
};
|
|
4803
|
+
|
|
4804
|
+
/** @internal */
|
|
4805
|
+
export const AgentToolInputRunJsonSchema$outboundSchema: z.ZodType<
|
|
4806
|
+
AgentToolInputRunJsonSchema$Outbound,
|
|
4807
|
+
z.ZodTypeDef,
|
|
4808
|
+
AgentToolInputRunJsonSchema
|
|
4809
|
+
> = z.object({
|
|
4810
|
+
name: z.string(),
|
|
4811
|
+
description: z.string(),
|
|
4812
|
+
schema: z.lazy(() => Schema$outboundSchema),
|
|
4813
|
+
strict: z.boolean().optional(),
|
|
4814
|
+
});
|
|
4815
|
+
|
|
4816
|
+
export function agentToolInputRunJsonSchemaToJSON(
|
|
4817
|
+
agentToolInputRunJsonSchema: AgentToolInputRunJsonSchema,
|
|
4818
|
+
): string {
|
|
4819
|
+
return JSON.stringify(
|
|
4820
|
+
AgentToolInputRunJsonSchema$outboundSchema.parse(
|
|
4821
|
+
agentToolInputRunJsonSchema,
|
|
4822
|
+
),
|
|
4823
|
+
);
|
|
4824
|
+
}
|
|
4825
|
+
export function agentToolInputRunJsonSchemaFromJSON(
|
|
4826
|
+
jsonString: string,
|
|
4827
|
+
): SafeParseResult<AgentToolInputRunJsonSchema, SDKValidationError> {
|
|
4828
|
+
return safeParse(
|
|
4829
|
+
jsonString,
|
|
4830
|
+
(x) => AgentToolInputRunJsonSchema$inboundSchema.parse(JSON.parse(x)),
|
|
4831
|
+
`Failed to parse 'AgentToolInputRunJsonSchema' from JSON`,
|
|
4832
|
+
);
|
|
4833
|
+
}
|
|
4834
|
+
|
|
4835
|
+
/** @internal */
|
|
4836
|
+
export const JSONSchemaToolRun$inboundSchema: z.ZodType<
|
|
4837
|
+
JSONSchemaToolRun,
|
|
4838
|
+
z.ZodTypeDef,
|
|
4839
|
+
unknown
|
|
4840
|
+
> = z.object({
|
|
4841
|
+
type: z.literal("json_schema"),
|
|
4842
|
+
key: z.string(),
|
|
4843
|
+
_id: z.string().optional(),
|
|
4844
|
+
display_name: z.string().optional(),
|
|
4845
|
+
description: z.string(),
|
|
4846
|
+
json_schema: z.lazy(() => AgentToolInputRunJsonSchema$inboundSchema),
|
|
4847
|
+
requires_approval: z.boolean().default(false),
|
|
4848
|
+
}).transform((v) => {
|
|
4849
|
+
return remap$(v, {
|
|
4850
|
+
"_id": "id",
|
|
4851
|
+
"display_name": "displayName",
|
|
4852
|
+
"json_schema": "jsonSchema",
|
|
4853
|
+
"requires_approval": "requiresApproval",
|
|
4854
|
+
});
|
|
4855
|
+
});
|
|
4856
|
+
/** @internal */
|
|
4857
|
+
export type JSONSchemaToolRun$Outbound = {
|
|
4858
|
+
type: "json_schema";
|
|
4859
|
+
key: string;
|
|
4860
|
+
_id?: string | undefined;
|
|
4861
|
+
display_name?: string | undefined;
|
|
4862
|
+
description: string;
|
|
4863
|
+
json_schema: AgentToolInputRunJsonSchema$Outbound;
|
|
4864
|
+
requires_approval: boolean;
|
|
4865
|
+
};
|
|
4866
|
+
|
|
4867
|
+
/** @internal */
|
|
4868
|
+
export const JSONSchemaToolRun$outboundSchema: z.ZodType<
|
|
4869
|
+
JSONSchemaToolRun$Outbound,
|
|
4870
|
+
z.ZodTypeDef,
|
|
4871
|
+
JSONSchemaToolRun
|
|
4872
|
+
> = z.object({
|
|
4873
|
+
type: z.literal("json_schema"),
|
|
4874
|
+
key: z.string(),
|
|
4875
|
+
id: z.string().optional(),
|
|
4876
|
+
displayName: z.string().optional(),
|
|
4877
|
+
description: z.string(),
|
|
4878
|
+
jsonSchema: z.lazy(() => AgentToolInputRunJsonSchema$outboundSchema),
|
|
4879
|
+
requiresApproval: z.boolean().default(false),
|
|
4880
|
+
}).transform((v) => {
|
|
4881
|
+
return remap$(v, {
|
|
4882
|
+
id: "_id",
|
|
4883
|
+
displayName: "display_name",
|
|
4884
|
+
jsonSchema: "json_schema",
|
|
4885
|
+
requiresApproval: "requires_approval",
|
|
4886
|
+
});
|
|
4887
|
+
});
|
|
4888
|
+
|
|
4889
|
+
export function jsonSchemaToolRunToJSON(
|
|
4890
|
+
jsonSchemaToolRun: JSONSchemaToolRun,
|
|
4891
|
+
): string {
|
|
4892
|
+
return JSON.stringify(
|
|
4893
|
+
JSONSchemaToolRun$outboundSchema.parse(jsonSchemaToolRun),
|
|
4894
|
+
);
|
|
4895
|
+
}
|
|
4896
|
+
export function jsonSchemaToolRunFromJSON(
|
|
4897
|
+
jsonString: string,
|
|
4898
|
+
): SafeParseResult<JSONSchemaToolRun, SDKValidationError> {
|
|
4899
|
+
return safeParse(
|
|
4900
|
+
jsonString,
|
|
4901
|
+
(x) => JSONSchemaToolRun$inboundSchema.parse(JSON.parse(x)),
|
|
4902
|
+
`Failed to parse 'JSONSchemaToolRun' from JSON`,
|
|
4903
|
+
);
|
|
4904
|
+
}
|
|
4905
|
+
|
|
4668
4906
|
/** @internal */
|
|
4669
4907
|
export const RunAgentAgentToolInputRunAgentsRequestRequestBodySettingsTools14FunctionType$inboundSchema:
|
|
4670
4908
|
z.ZodNativeEnum<
|
|
@@ -5993,6 +6231,7 @@ export const AgentToolInputRun$inboundSchema: z.ZodType<
|
|
|
5993
6231
|
z.lazy(() => HTTPToolRun$inboundSchema),
|
|
5994
6232
|
z.lazy(() => CodeToolRun$inboundSchema),
|
|
5995
6233
|
z.lazy(() => FunctionToolRun$inboundSchema),
|
|
6234
|
+
z.lazy(() => JSONSchemaToolRun$inboundSchema),
|
|
5996
6235
|
z.lazy(() => MCPToolRun$inboundSchema),
|
|
5997
6236
|
]);
|
|
5998
6237
|
/** @internal */
|
|
@@ -6011,6 +6250,7 @@ export type AgentToolInputRun$Outbound =
|
|
|
6011
6250
|
| HTTPToolRun$Outbound
|
|
6012
6251
|
| CodeToolRun$Outbound
|
|
6013
6252
|
| FunctionToolRun$Outbound
|
|
6253
|
+
| JSONSchemaToolRun$Outbound
|
|
6014
6254
|
| MCPToolRun$Outbound;
|
|
6015
6255
|
|
|
6016
6256
|
/** @internal */
|
|
@@ -6033,6 +6273,7 @@ export const AgentToolInputRun$outboundSchema: z.ZodType<
|
|
|
6033
6273
|
z.lazy(() => HTTPToolRun$outboundSchema),
|
|
6034
6274
|
z.lazy(() => CodeToolRun$outboundSchema),
|
|
6035
6275
|
z.lazy(() => FunctionToolRun$outboundSchema),
|
|
6276
|
+
z.lazy(() => JSONSchemaToolRun$outboundSchema),
|
|
6036
6277
|
z.lazy(() => MCPToolRun$outboundSchema),
|
|
6037
6278
|
]);
|
|
6038
6279
|
|
|
@@ -6212,6 +6453,7 @@ export const RunAgentSettings$inboundSchema: z.ZodType<
|
|
|
6212
6453
|
z.lazy(() => HTTPToolRun$inboundSchema),
|
|
6213
6454
|
z.lazy(() => CodeToolRun$inboundSchema),
|
|
6214
6455
|
z.lazy(() => FunctionToolRun$inboundSchema),
|
|
6456
|
+
z.lazy(() => JSONSchemaToolRun$inboundSchema),
|
|
6215
6457
|
z.lazy(() => MCPToolRun$inboundSchema),
|
|
6216
6458
|
]),
|
|
6217
6459
|
).optional(),
|
|
@@ -6249,6 +6491,7 @@ export type RunAgentSettings$Outbound = {
|
|
|
6249
6491
|
| HTTPToolRun$Outbound
|
|
6250
6492
|
| CodeToolRun$Outbound
|
|
6251
6493
|
| FunctionToolRun$Outbound
|
|
6494
|
+
| JSONSchemaToolRun$Outbound
|
|
6252
6495
|
| MCPToolRun$Outbound
|
|
6253
6496
|
>
|
|
6254
6497
|
| undefined;
|
|
@@ -6281,6 +6524,7 @@ export const RunAgentSettings$outboundSchema: z.ZodType<
|
|
|
6281
6524
|
z.lazy(() => HTTPToolRun$outboundSchema),
|
|
6282
6525
|
z.lazy(() => CodeToolRun$outboundSchema),
|
|
6283
6526
|
z.lazy(() => FunctionToolRun$outboundSchema),
|
|
6527
|
+
z.lazy(() => JSONSchemaToolRun$outboundSchema),
|
|
6284
6528
|
z.lazy(() => MCPToolRun$outboundSchema),
|
|
6285
6529
|
]),
|
|
6286
6530
|
).optional(),
|