@orq-ai/node 4.1.0-rc.2 → 4.1.0-rc.4
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 +37427 -38283
- package/bin/mcp-server.js.map +72 -67
- package/docs/sdks/agents/README.md +10 -10
- package/docs/sdks/responses/README.md +5 -5
- package/examples/package-lock.json +1 -1
- package/funcs/agentsCreate.d.ts +1 -1
- package/funcs/agentsCreate.d.ts.map +1 -1
- package/funcs/agentsCreate.js +2 -4
- package/funcs/agentsCreate.js.map +1 -1
- package/funcs/agentsResponsesCreate.d.ts +1 -1
- package/funcs/agentsResponsesCreate.d.ts.map +1 -1
- package/funcs/agentsResponsesCreate.js +4 -4
- package/funcs/agentsResponsesCreate.js.map +1 -1
- package/funcs/agentsRun.d.ts +1 -1
- package/funcs/agentsRun.d.ts.map +1 -1
- package/funcs/agentsRun.js +2 -4
- package/funcs/agentsRun.js.map +1 -1
- package/funcs/agentsStream.d.ts +1 -1
- package/funcs/agentsStream.d.ts.map +1 -1
- package/funcs/agentsStream.js +4 -4
- package/funcs/agentsStream.js.map +1 -1
- package/funcs/agentsStreamRun.d.ts +1 -1
- package/funcs/agentsStreamRun.d.ts.map +1 -1
- package/funcs/agentsStreamRun.js +2 -4
- package/funcs/agentsStreamRun.js.map +1 -1
- package/funcs/agentsUpdate.d.ts +1 -1
- package/funcs/agentsUpdate.d.ts.map +1 -1
- package/funcs/agentsUpdate.js +4 -4
- package/funcs/agentsUpdate.js.map +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/mcp-server/tools/agentsCreate.d.ts +1 -1
- package/mcp-server/tools/agentsCreate.js +1 -1
- package/mcp-server/tools/agentsCreate.js.map +1 -1
- package/mcp-server/tools/agentsResponsesCreate.d.ts +1 -1
- package/mcp-server/tools/agentsResponsesCreate.d.ts.map +1 -1
- package/mcp-server/tools/agentsResponsesCreate.js +2 -3
- package/mcp-server/tools/agentsResponsesCreate.js.map +1 -1
- package/mcp-server/tools/agentsRun.d.ts +1 -1
- package/mcp-server/tools/agentsRun.js +1 -1
- package/mcp-server/tools/agentsRun.js.map +1 -1
- package/mcp-server/tools/agentsStream.d.ts +1 -1
- package/mcp-server/tools/agentsStream.js +2 -2
- package/mcp-server/tools/agentsStream.js.map +1 -1
- package/mcp-server/tools/agentsStreamRun.d.ts +1 -1
- package/mcp-server/tools/agentsStreamRun.js +1 -1
- package/mcp-server/tools/agentsStreamRun.js.map +1 -1
- package/mcp-server/tools/agentsUpdate.d.ts +1 -1
- package/mcp-server/tools/agentsUpdate.d.ts.map +1 -1
- package/mcp-server/tools/agentsUpdate.js +2 -3
- package/mcp-server/tools/agentsUpdate.js.map +1 -1
- package/models/components/datapart.d.ts +41 -0
- package/models/components/datapart.d.ts.map +1 -0
- package/models/components/datapart.js +69 -0
- package/models/components/datapart.js.map +1 -0
- package/models/components/filepart.d.ts +104 -0
- package/models/components/filepart.d.ts.map +1 -0
- package/models/components/filepart.js +134 -0
- package/models/components/filepart.js.map +1 -0
- package/models/components/index.d.ts +5 -0
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +5 -0
- package/models/components/index.js.map +1 -1
- package/models/components/invokedeploymentrequest.d.ts +8 -8
- package/models/components/invokedeploymentrequest.d.ts.map +1 -1
- package/models/components/invokedeploymentrequest.js +11 -12
- package/models/components/invokedeploymentrequest.js.map +1 -1
- package/models/components/textpart.d.ts +31 -0
- package/models/components/textpart.d.ts.map +1 -0
- package/models/components/textpart.js +67 -0
- package/models/components/textpart.js.map +1 -0
- package/models/components/toolcallpart.d.ts +45 -0
- package/models/components/toolcallpart.d.ts.map +1 -0
- package/models/components/toolcallpart.js +84 -0
- package/models/components/toolcallpart.js.map +1 -0
- package/models/components/toolresultpart.d.ts +39 -0
- package/models/components/toolresultpart.d.ts.map +1 -0
- package/models/components/toolresultpart.js +80 -0
- package/models/components/toolresultpart.js.map +1 -0
- package/models/operations/createagentresponserequest.d.ts +68 -44
- package/models/operations/createagentresponserequest.d.ts.map +1 -1
- package/models/operations/createagentresponserequest.js +92 -47
- package/models/operations/createagentresponserequest.js.map +1 -1
- package/models/operations/createbudget.js +2 -2
- package/models/operations/createcontact.js +2 -2
- 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/createprompt.d.ts +9 -11
- package/models/operations/createprompt.d.ts.map +1 -1
- package/models/operations/createprompt.js +9 -11
- package/models/operations/createprompt.js.map +1 -1
- package/models/operations/createtool.js +12 -12
- package/models/operations/deploymentinvoke.d.ts +9 -11
- package/models/operations/deploymentinvoke.d.ts.map +1 -1
- package/models/operations/deploymentinvoke.js +9 -11
- package/models/operations/deploymentinvoke.js.map +1 -1
- package/models/operations/deployments.d.ts +9 -11
- package/models/operations/deployments.d.ts.map +1 -1
- package/models/operations/deployments.js +9 -11
- package/models/operations/deployments.js.map +1 -1
- package/models/operations/deploymentstream.d.ts +9 -11
- package/models/operations/deploymentstream.d.ts.map +1 -1
- package/models/operations/deploymentstream.js +9 -11
- package/models/operations/deploymentstream.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/getallprompts.d.ts +9 -11
- package/models/operations/getallprompts.d.ts.map +1 -1
- package/models/operations/getallprompts.js +9 -11
- package/models/operations/getallprompts.js.map +1 -1
- package/models/operations/getalltools.js +12 -12
- package/models/operations/getbudget.js +2 -2
- package/models/operations/getevals.js +28 -28
- package/models/operations/getoneprompt.d.ts +9 -11
- package/models/operations/getoneprompt.d.ts.map +1 -1
- package/models/operations/getoneprompt.js +9 -11
- package/models/operations/getoneprompt.js.map +1 -1
- package/models/operations/getpromptversion.d.ts +9 -11
- package/models/operations/getpromptversion.d.ts.map +1 -1
- package/models/operations/getpromptversion.js +9 -11
- package/models/operations/getpromptversion.js.map +1 -1
- package/models/operations/invokeagent.d.ts +63 -283
- package/models/operations/invokeagent.d.ts.map +1 -1
- package/models/operations/invokeagent.js +73 -293
- package/models/operations/invokeagent.js.map +1 -1
- package/models/operations/listbudgets.js +2 -2
- 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/listpromptversions.d.ts +9 -11
- package/models/operations/listpromptversions.d.ts.map +1 -1
- package/models/operations/listpromptversions.js +9 -11
- package/models/operations/listpromptversions.js.map +1 -1
- 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 +59 -279
- package/models/operations/runagent.d.ts.map +1 -1
- package/models/operations/runagent.js +72 -292
- package/models/operations/runagent.js.map +1 -1
- package/models/operations/streamagent.d.ts +214 -1005
- package/models/operations/streamagent.d.ts.map +1 -1
- package/models/operations/streamagent.js +229 -1019
- package/models/operations/streamagent.js.map +1 -1
- package/models/operations/streamrunagent.d.ts +215 -1006
- package/models/operations/streamrunagent.d.ts.map +1 -1
- package/models/operations/streamrunagent.js +236 -1026
- package/models/operations/streamrunagent.js.map +1 -1
- package/models/operations/updateagent.d.ts +2 -2
- package/models/operations/updateagent.d.ts.map +1 -1
- package/models/operations/updateagent.js +2 -4
- package/models/operations/updateagent.js.map +1 -1
- package/models/operations/updatebudget.js +2 -2
- package/models/operations/updatecontact.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/updatememorystore.d.ts +9 -20
- package/models/operations/updatememorystore.d.ts.map +1 -1
- package/models/operations/updatememorystore.js +9 -14
- package/models/operations/updatememorystore.js.map +1 -1
- package/models/operations/updateprompt.d.ts +18 -22
- package/models/operations/updateprompt.d.ts.map +1 -1
- package/models/operations/updateprompt.js +18 -22
- package/models/operations/updateprompt.js.map +1 -1
- package/models/operations/updatetool.js +14 -14
- package/package.json +1 -1
- package/sdk/agents.d.ts +5 -5
- package/sdk/agents.d.ts.map +1 -1
- package/sdk/agents.js +4 -4
- package/sdk/agents.js.map +1 -1
- package/sdk/responses.d.ts +1 -1
- package/sdk/responses.d.ts.map +1 -1
- package/sdk/responses.js +2 -2
- package/sdk/responses.js.map +1 -1
- package/src/funcs/agentsCreate.ts +4 -8
- package/src/funcs/agentsResponsesCreate.ts +4 -4
- package/src/funcs/agentsRun.ts +4 -7
- package/src/funcs/agentsStream.ts +4 -4
- package/src/funcs/agentsStreamRun.ts +4 -9
- package/src/funcs/agentsUpdate.ts +4 -4
- 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/mcp-server/tools/agentsCreate.ts +1 -1
- package/src/mcp-server/tools/agentsResponsesCreate.ts +2 -3
- package/src/mcp-server/tools/agentsRun.ts +1 -1
- package/src/mcp-server/tools/agentsStream.ts +2 -2
- package/src/mcp-server/tools/agentsStreamRun.ts +1 -1
- package/src/mcp-server/tools/agentsUpdate.ts +2 -3
- package/src/models/components/datapart.ts +71 -0
- package/src/models/components/filepart.ts +231 -0
- package/src/models/components/index.ts +5 -0
- package/src/models/components/invokedeploymentrequest.ts +34 -25
- package/src/models/components/textpart.ts +68 -0
- package/src/models/components/toolcallpart.ts +92 -0
- package/src/models/components/toolresultpart.ts +86 -0
- package/src/models/operations/createagentresponserequest.ts +194 -100
- package/src/models/operations/createbudget.ts +2 -2
- package/src/models/operations/createcontact.ts +2 -2
- 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/createprompt.ts +9 -11
- package/src/models/operations/createtool.ts +12 -12
- package/src/models/operations/deploymentinvoke.ts +9 -11
- package/src/models/operations/deployments.ts +9 -11
- package/src/models/operations/deploymentstream.ts +9 -11
- 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/getallprompts.ts +9 -11
- package/src/models/operations/getalltools.ts +12 -12
- package/src/models/operations/getbudget.ts +2 -2
- package/src/models/operations/getevals.ts +28 -28
- package/src/models/operations/getoneprompt.ts +9 -11
- package/src/models/operations/getpromptversion.ts +9 -11
- package/src/models/operations/invokeagent.ts +158 -682
- package/src/models/operations/listbudgets.ts +2 -2
- 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/listpromptversions.ts +9 -11
- 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 +143 -697
- package/src/models/operations/streamagent.ts +2226 -4563
- package/src/models/operations/streamrunagent.ts +2189 -4615
- package/src/models/operations/updateagent.ts +4 -6
- package/src/models/operations/updatebudget.ts +2 -2
- package/src/models/operations/updatecontact.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/updatememorystore.ts +9 -20
- package/src/models/operations/updateprompt.ts +18 -22
- package/src/models/operations/updatetool.ts +14 -14
- package/src/sdk/agents.ts +7 -7
- package/src/sdk/responses.ts +2 -2
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
+
import { ClosedEnum } from "../../types/enums.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
+
|
|
11
|
+
export const FilePartKind = {
|
|
12
|
+
File: "file",
|
|
13
|
+
} as const;
|
|
14
|
+
export type FilePartKind = ClosedEnum<typeof FilePartKind>;
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* File in URI format. Check in the model's documentation for the supported mime types for the URI format
|
|
18
|
+
*/
|
|
19
|
+
export type FileInURIFormat = {
|
|
20
|
+
/**
|
|
21
|
+
* URL for the File content
|
|
22
|
+
*/
|
|
23
|
+
uri: string;
|
|
24
|
+
/**
|
|
25
|
+
* Optional mimeType for the file
|
|
26
|
+
*/
|
|
27
|
+
mimeType?: string | undefined;
|
|
28
|
+
/**
|
|
29
|
+
* Optional name for the file
|
|
30
|
+
*/
|
|
31
|
+
name?: string | undefined;
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Binary in base64 format. Check in the model's documentation for the supported mime types for the binary format.
|
|
36
|
+
*/
|
|
37
|
+
export type BinaryFormat = {
|
|
38
|
+
/**
|
|
39
|
+
* base64 encoded content of the file
|
|
40
|
+
*/
|
|
41
|
+
bytes: string;
|
|
42
|
+
/**
|
|
43
|
+
* Optional mimeType for the file
|
|
44
|
+
*/
|
|
45
|
+
mimeType?: string | undefined;
|
|
46
|
+
/**
|
|
47
|
+
* Optional name for the file
|
|
48
|
+
*/
|
|
49
|
+
name?: string | undefined;
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
export type FileT = BinaryFormat | FileInURIFormat;
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* A file content part that can contain either base64-encoded bytes or a URI reference. Used for images, documents, and other binary content in agent communications.
|
|
56
|
+
*/
|
|
57
|
+
export type FilePart = {
|
|
58
|
+
kind: FilePartKind;
|
|
59
|
+
file: BinaryFormat | FileInURIFormat;
|
|
60
|
+
metadata?: { [k: string]: any } | undefined;
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
/** @internal */
|
|
64
|
+
export const FilePartKind$inboundSchema: z.ZodNativeEnum<typeof FilePartKind> =
|
|
65
|
+
z.nativeEnum(FilePartKind);
|
|
66
|
+
/** @internal */
|
|
67
|
+
export const FilePartKind$outboundSchema: z.ZodNativeEnum<typeof FilePartKind> =
|
|
68
|
+
FilePartKind$inboundSchema;
|
|
69
|
+
|
|
70
|
+
/** @internal */
|
|
71
|
+
export const FileInURIFormat$inboundSchema: z.ZodType<
|
|
72
|
+
FileInURIFormat,
|
|
73
|
+
z.ZodTypeDef,
|
|
74
|
+
unknown
|
|
75
|
+
> = z.object({
|
|
76
|
+
uri: z.string(),
|
|
77
|
+
mimeType: z.string().optional(),
|
|
78
|
+
name: z.string().optional(),
|
|
79
|
+
});
|
|
80
|
+
/** @internal */
|
|
81
|
+
export type FileInURIFormat$Outbound = {
|
|
82
|
+
uri: string;
|
|
83
|
+
mimeType?: string | undefined;
|
|
84
|
+
name?: string | undefined;
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
/** @internal */
|
|
88
|
+
export const FileInURIFormat$outboundSchema: z.ZodType<
|
|
89
|
+
FileInURIFormat$Outbound,
|
|
90
|
+
z.ZodTypeDef,
|
|
91
|
+
FileInURIFormat
|
|
92
|
+
> = z.object({
|
|
93
|
+
uri: z.string(),
|
|
94
|
+
mimeType: z.string().optional(),
|
|
95
|
+
name: z.string().optional(),
|
|
96
|
+
});
|
|
97
|
+
|
|
98
|
+
export function fileInURIFormatToJSON(
|
|
99
|
+
fileInURIFormat: FileInURIFormat,
|
|
100
|
+
): string {
|
|
101
|
+
return JSON.stringify(FileInURIFormat$outboundSchema.parse(fileInURIFormat));
|
|
102
|
+
}
|
|
103
|
+
export function fileInURIFormatFromJSON(
|
|
104
|
+
jsonString: string,
|
|
105
|
+
): SafeParseResult<FileInURIFormat, SDKValidationError> {
|
|
106
|
+
return safeParse(
|
|
107
|
+
jsonString,
|
|
108
|
+
(x) => FileInURIFormat$inboundSchema.parse(JSON.parse(x)),
|
|
109
|
+
`Failed to parse 'FileInURIFormat' from JSON`,
|
|
110
|
+
);
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
/** @internal */
|
|
114
|
+
export const BinaryFormat$inboundSchema: z.ZodType<
|
|
115
|
+
BinaryFormat,
|
|
116
|
+
z.ZodTypeDef,
|
|
117
|
+
unknown
|
|
118
|
+
> = z.object({
|
|
119
|
+
bytes: z.string(),
|
|
120
|
+
mimeType: z.string().optional(),
|
|
121
|
+
name: z.string().optional(),
|
|
122
|
+
});
|
|
123
|
+
/** @internal */
|
|
124
|
+
export type BinaryFormat$Outbound = {
|
|
125
|
+
bytes: string;
|
|
126
|
+
mimeType?: string | undefined;
|
|
127
|
+
name?: string | undefined;
|
|
128
|
+
};
|
|
129
|
+
|
|
130
|
+
/** @internal */
|
|
131
|
+
export const BinaryFormat$outboundSchema: z.ZodType<
|
|
132
|
+
BinaryFormat$Outbound,
|
|
133
|
+
z.ZodTypeDef,
|
|
134
|
+
BinaryFormat
|
|
135
|
+
> = z.object({
|
|
136
|
+
bytes: z.string(),
|
|
137
|
+
mimeType: z.string().optional(),
|
|
138
|
+
name: z.string().optional(),
|
|
139
|
+
});
|
|
140
|
+
|
|
141
|
+
export function binaryFormatToJSON(binaryFormat: BinaryFormat): string {
|
|
142
|
+
return JSON.stringify(BinaryFormat$outboundSchema.parse(binaryFormat));
|
|
143
|
+
}
|
|
144
|
+
export function binaryFormatFromJSON(
|
|
145
|
+
jsonString: string,
|
|
146
|
+
): SafeParseResult<BinaryFormat, SDKValidationError> {
|
|
147
|
+
return safeParse(
|
|
148
|
+
jsonString,
|
|
149
|
+
(x) => BinaryFormat$inboundSchema.parse(JSON.parse(x)),
|
|
150
|
+
`Failed to parse 'BinaryFormat' from JSON`,
|
|
151
|
+
);
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
/** @internal */
|
|
155
|
+
export const FileT$inboundSchema: z.ZodType<FileT, z.ZodTypeDef, unknown> = z
|
|
156
|
+
.union([
|
|
157
|
+
z.lazy(() => BinaryFormat$inboundSchema),
|
|
158
|
+
z.lazy(() => FileInURIFormat$inboundSchema),
|
|
159
|
+
]);
|
|
160
|
+
/** @internal */
|
|
161
|
+
export type FileT$Outbound = BinaryFormat$Outbound | FileInURIFormat$Outbound;
|
|
162
|
+
|
|
163
|
+
/** @internal */
|
|
164
|
+
export const FileT$outboundSchema: z.ZodType<
|
|
165
|
+
FileT$Outbound,
|
|
166
|
+
z.ZodTypeDef,
|
|
167
|
+
FileT
|
|
168
|
+
> = z.union([
|
|
169
|
+
z.lazy(() => BinaryFormat$outboundSchema),
|
|
170
|
+
z.lazy(() => FileInURIFormat$outboundSchema),
|
|
171
|
+
]);
|
|
172
|
+
|
|
173
|
+
export function fileToJSON(fileT: FileT): string {
|
|
174
|
+
return JSON.stringify(FileT$outboundSchema.parse(fileT));
|
|
175
|
+
}
|
|
176
|
+
export function fileFromJSON(
|
|
177
|
+
jsonString: string,
|
|
178
|
+
): SafeParseResult<FileT, SDKValidationError> {
|
|
179
|
+
return safeParse(
|
|
180
|
+
jsonString,
|
|
181
|
+
(x) => FileT$inboundSchema.parse(JSON.parse(x)),
|
|
182
|
+
`Failed to parse 'FileT' from JSON`,
|
|
183
|
+
);
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
/** @internal */
|
|
187
|
+
export const FilePart$inboundSchema: z.ZodType<
|
|
188
|
+
FilePart,
|
|
189
|
+
z.ZodTypeDef,
|
|
190
|
+
unknown
|
|
191
|
+
> = z.object({
|
|
192
|
+
kind: FilePartKind$inboundSchema,
|
|
193
|
+
file: z.union([
|
|
194
|
+
z.lazy(() => BinaryFormat$inboundSchema),
|
|
195
|
+
z.lazy(() => FileInURIFormat$inboundSchema),
|
|
196
|
+
]),
|
|
197
|
+
metadata: z.record(z.any()).optional(),
|
|
198
|
+
});
|
|
199
|
+
/** @internal */
|
|
200
|
+
export type FilePart$Outbound = {
|
|
201
|
+
kind: string;
|
|
202
|
+
file: BinaryFormat$Outbound | FileInURIFormat$Outbound;
|
|
203
|
+
metadata?: { [k: string]: any } | undefined;
|
|
204
|
+
};
|
|
205
|
+
|
|
206
|
+
/** @internal */
|
|
207
|
+
export const FilePart$outboundSchema: z.ZodType<
|
|
208
|
+
FilePart$Outbound,
|
|
209
|
+
z.ZodTypeDef,
|
|
210
|
+
FilePart
|
|
211
|
+
> = z.object({
|
|
212
|
+
kind: FilePartKind$outboundSchema,
|
|
213
|
+
file: z.union([
|
|
214
|
+
z.lazy(() => BinaryFormat$outboundSchema),
|
|
215
|
+
z.lazy(() => FileInURIFormat$outboundSchema),
|
|
216
|
+
]),
|
|
217
|
+
metadata: z.record(z.any()).optional(),
|
|
218
|
+
});
|
|
219
|
+
|
|
220
|
+
export function filePartToJSON(filePart: FilePart): string {
|
|
221
|
+
return JSON.stringify(FilePart$outboundSchema.parse(filePart));
|
|
222
|
+
}
|
|
223
|
+
export function filePartFromJSON(
|
|
224
|
+
jsonString: string,
|
|
225
|
+
): SafeParseResult<FilePart, SDKValidationError> {
|
|
226
|
+
return safeParse(
|
|
227
|
+
jsonString,
|
|
228
|
+
(x) => FilePart$inboundSchema.parse(JSON.parse(x)),
|
|
229
|
+
`Failed to parse 'FilePart' from JSON`,
|
|
230
|
+
);
|
|
231
|
+
}
|
|
@@ -2,5 +2,10 @@
|
|
|
2
2
|
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
+
export * from "./datapart.js";
|
|
6
|
+
export * from "./filepart.js";
|
|
5
7
|
export * from "./invokedeploymentrequest.js";
|
|
6
8
|
export * from "./security.js";
|
|
9
|
+
export * from "./textpart.js";
|
|
10
|
+
export * from "./toolcallpart.js";
|
|
11
|
+
export * from "./toolresultpart.js";
|
|
@@ -273,7 +273,7 @@ export type InvokeDeploymentRequest2PrefixMessagesType = ClosedEnum<
|
|
|
273
273
|
/**
|
|
274
274
|
* File data for the content part. Must contain either file_data or uri, but not both.
|
|
275
275
|
*/
|
|
276
|
-
export type
|
|
276
|
+
export type InvokeDeploymentRequest2File = {
|
|
277
277
|
/**
|
|
278
278
|
* The file data as a data URI string in the format 'data:<mime-type>;base64,<base64-encoded-data>'. Example: 'data:image/png;base64,iVBORw0KGgoAAAANS...'
|
|
279
279
|
*/
|
|
@@ -300,7 +300,7 @@ export type Four = {
|
|
|
300
300
|
/**
|
|
301
301
|
* File data for the content part. Must contain either file_data or uri, but not both.
|
|
302
302
|
*/
|
|
303
|
-
file:
|
|
303
|
+
file: InvokeDeploymentRequest2File;
|
|
304
304
|
};
|
|
305
305
|
|
|
306
306
|
export const InvokeDeploymentRequest2Type = {
|
|
@@ -2156,19 +2156,22 @@ export const InvokeDeploymentRequest2PrefixMessagesType$outboundSchema:
|
|
|
2156
2156
|
InvokeDeploymentRequest2PrefixMessagesType$inboundSchema;
|
|
2157
2157
|
|
|
2158
2158
|
/** @internal */
|
|
2159
|
-
export const
|
|
2160
|
-
|
|
2161
|
-
|
|
2162
|
-
|
|
2163
|
-
|
|
2164
|
-
|
|
2165
|
-
|
|
2166
|
-
|
|
2167
|
-
|
|
2168
|
-
|
|
2159
|
+
export const InvokeDeploymentRequest2File$inboundSchema: z.ZodType<
|
|
2160
|
+
InvokeDeploymentRequest2File,
|
|
2161
|
+
z.ZodTypeDef,
|
|
2162
|
+
unknown
|
|
2163
|
+
> = z.object({
|
|
2164
|
+
file_data: z.string().optional(),
|
|
2165
|
+
uri: z.string().optional(),
|
|
2166
|
+
mimeType: z.string().optional(),
|
|
2167
|
+
filename: z.string().optional(),
|
|
2168
|
+
}).transform((v) => {
|
|
2169
|
+
return remap$(v, {
|
|
2170
|
+
"file_data": "fileData",
|
|
2169
2171
|
});
|
|
2172
|
+
});
|
|
2170
2173
|
/** @internal */
|
|
2171
|
-
export type
|
|
2174
|
+
export type InvokeDeploymentRequest2File$Outbound = {
|
|
2172
2175
|
file_data?: string | undefined;
|
|
2173
2176
|
uri?: string | undefined;
|
|
2174
2177
|
mimeType?: string | undefined;
|
|
@@ -2176,10 +2179,10 @@ export type FileT$Outbound = {
|
|
|
2176
2179
|
};
|
|
2177
2180
|
|
|
2178
2181
|
/** @internal */
|
|
2179
|
-
export const
|
|
2180
|
-
|
|
2182
|
+
export const InvokeDeploymentRequest2File$outboundSchema: z.ZodType<
|
|
2183
|
+
InvokeDeploymentRequest2File$Outbound,
|
|
2181
2184
|
z.ZodTypeDef,
|
|
2182
|
-
|
|
2185
|
+
InvokeDeploymentRequest2File
|
|
2183
2186
|
> = z.object({
|
|
2184
2187
|
fileData: z.string().optional(),
|
|
2185
2188
|
uri: z.string().optional(),
|
|
@@ -2191,16 +2194,22 @@ export const FileT$outboundSchema: z.ZodType<
|
|
|
2191
2194
|
});
|
|
2192
2195
|
});
|
|
2193
2196
|
|
|
2194
|
-
export function
|
|
2195
|
-
|
|
2197
|
+
export function invokeDeploymentRequest2FileToJSON(
|
|
2198
|
+
invokeDeploymentRequest2File: InvokeDeploymentRequest2File,
|
|
2199
|
+
): string {
|
|
2200
|
+
return JSON.stringify(
|
|
2201
|
+
InvokeDeploymentRequest2File$outboundSchema.parse(
|
|
2202
|
+
invokeDeploymentRequest2File,
|
|
2203
|
+
),
|
|
2204
|
+
);
|
|
2196
2205
|
}
|
|
2197
|
-
export function
|
|
2206
|
+
export function invokeDeploymentRequest2FileFromJSON(
|
|
2198
2207
|
jsonString: string,
|
|
2199
|
-
): SafeParseResult<
|
|
2208
|
+
): SafeParseResult<InvokeDeploymentRequest2File, SDKValidationError> {
|
|
2200
2209
|
return safeParse(
|
|
2201
2210
|
jsonString,
|
|
2202
|
-
(x) =>
|
|
2203
|
-
`Failed to parse '
|
|
2211
|
+
(x) => InvokeDeploymentRequest2File$inboundSchema.parse(JSON.parse(x)),
|
|
2212
|
+
`Failed to parse 'InvokeDeploymentRequest2File' from JSON`,
|
|
2204
2213
|
);
|
|
2205
2214
|
}
|
|
2206
2215
|
|
|
@@ -2208,19 +2217,19 @@ export function fileFromJSON(
|
|
|
2208
2217
|
export const Four$inboundSchema: z.ZodType<Four, z.ZodTypeDef, unknown> = z
|
|
2209
2218
|
.object({
|
|
2210
2219
|
type: InvokeDeploymentRequest2PrefixMessagesType$inboundSchema,
|
|
2211
|
-
file: z.lazy(() =>
|
|
2220
|
+
file: z.lazy(() => InvokeDeploymentRequest2File$inboundSchema),
|
|
2212
2221
|
});
|
|
2213
2222
|
/** @internal */
|
|
2214
2223
|
export type Four$Outbound = {
|
|
2215
2224
|
type: string;
|
|
2216
|
-
file:
|
|
2225
|
+
file: InvokeDeploymentRequest2File$Outbound;
|
|
2217
2226
|
};
|
|
2218
2227
|
|
|
2219
2228
|
/** @internal */
|
|
2220
2229
|
export const Four$outboundSchema: z.ZodType<Four$Outbound, z.ZodTypeDef, Four> =
|
|
2221
2230
|
z.object({
|
|
2222
2231
|
type: InvokeDeploymentRequest2PrefixMessagesType$outboundSchema,
|
|
2223
|
-
file: z.lazy(() =>
|
|
2232
|
+
file: z.lazy(() => InvokeDeploymentRequest2File$outboundSchema),
|
|
2224
2233
|
});
|
|
2225
2234
|
|
|
2226
2235
|
export function fourToJSON(four: Four): string {
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
+
import { ClosedEnum } from "../../types/enums.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
+
|
|
11
|
+
export const Kind = {
|
|
12
|
+
Text: "text",
|
|
13
|
+
} as const;
|
|
14
|
+
export type Kind = ClosedEnum<typeof Kind>;
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Text content part. Use this to send text messages to the agent.
|
|
18
|
+
*/
|
|
19
|
+
export type TextPart = {
|
|
20
|
+
kind: Kind;
|
|
21
|
+
text: string;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
/** @internal */
|
|
25
|
+
export const Kind$inboundSchema: z.ZodNativeEnum<typeof Kind> = z.nativeEnum(
|
|
26
|
+
Kind,
|
|
27
|
+
);
|
|
28
|
+
/** @internal */
|
|
29
|
+
export const Kind$outboundSchema: z.ZodNativeEnum<typeof Kind> =
|
|
30
|
+
Kind$inboundSchema;
|
|
31
|
+
|
|
32
|
+
/** @internal */
|
|
33
|
+
export const TextPart$inboundSchema: z.ZodType<
|
|
34
|
+
TextPart,
|
|
35
|
+
z.ZodTypeDef,
|
|
36
|
+
unknown
|
|
37
|
+
> = z.object({
|
|
38
|
+
kind: Kind$inboundSchema,
|
|
39
|
+
text: z.string(),
|
|
40
|
+
});
|
|
41
|
+
/** @internal */
|
|
42
|
+
export type TextPart$Outbound = {
|
|
43
|
+
kind: string;
|
|
44
|
+
text: string;
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
/** @internal */
|
|
48
|
+
export const TextPart$outboundSchema: z.ZodType<
|
|
49
|
+
TextPart$Outbound,
|
|
50
|
+
z.ZodTypeDef,
|
|
51
|
+
TextPart
|
|
52
|
+
> = z.object({
|
|
53
|
+
kind: Kind$outboundSchema,
|
|
54
|
+
text: z.string(),
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
export function textPartToJSON(textPart: TextPart): string {
|
|
58
|
+
return JSON.stringify(TextPart$outboundSchema.parse(textPart));
|
|
59
|
+
}
|
|
60
|
+
export function textPartFromJSON(
|
|
61
|
+
jsonString: string,
|
|
62
|
+
): SafeParseResult<TextPart, SDKValidationError> {
|
|
63
|
+
return safeParse(
|
|
64
|
+
jsonString,
|
|
65
|
+
(x) => TextPart$inboundSchema.parse(JSON.parse(x)),
|
|
66
|
+
`Failed to parse 'TextPart' from JSON`,
|
|
67
|
+
);
|
|
68
|
+
}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { ClosedEnum } from "../../types/enums.js";
|
|
9
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
10
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
|
+
|
|
12
|
+
export const ToolCallPartKind = {
|
|
13
|
+
ToolCall: "tool_call",
|
|
14
|
+
} as const;
|
|
15
|
+
export type ToolCallPartKind = ClosedEnum<typeof ToolCallPartKind>;
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* A tool invocation request from an agent. Contains the tool name, unique call ID, and arguments for the tool execution.
|
|
19
|
+
*/
|
|
20
|
+
export type ToolCallPart = {
|
|
21
|
+
kind: ToolCallPartKind;
|
|
22
|
+
toolName: string;
|
|
23
|
+
toolCallId: string;
|
|
24
|
+
arguments: { [k: string]: any };
|
|
25
|
+
metadata?: { [k: string]: any } | undefined;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
/** @internal */
|
|
29
|
+
export const ToolCallPartKind$inboundSchema: z.ZodNativeEnum<
|
|
30
|
+
typeof ToolCallPartKind
|
|
31
|
+
> = z.nativeEnum(ToolCallPartKind);
|
|
32
|
+
/** @internal */
|
|
33
|
+
export const ToolCallPartKind$outboundSchema: z.ZodNativeEnum<
|
|
34
|
+
typeof ToolCallPartKind
|
|
35
|
+
> = ToolCallPartKind$inboundSchema;
|
|
36
|
+
|
|
37
|
+
/** @internal */
|
|
38
|
+
export const ToolCallPart$inboundSchema: z.ZodType<
|
|
39
|
+
ToolCallPart,
|
|
40
|
+
z.ZodTypeDef,
|
|
41
|
+
unknown
|
|
42
|
+
> = z.object({
|
|
43
|
+
kind: ToolCallPartKind$inboundSchema,
|
|
44
|
+
tool_name: z.string(),
|
|
45
|
+
tool_call_id: z.string(),
|
|
46
|
+
arguments: z.record(z.any()),
|
|
47
|
+
metadata: z.record(z.any()).optional(),
|
|
48
|
+
}).transform((v) => {
|
|
49
|
+
return remap$(v, {
|
|
50
|
+
"tool_name": "toolName",
|
|
51
|
+
"tool_call_id": "toolCallId",
|
|
52
|
+
});
|
|
53
|
+
});
|
|
54
|
+
/** @internal */
|
|
55
|
+
export type ToolCallPart$Outbound = {
|
|
56
|
+
kind: string;
|
|
57
|
+
tool_name: string;
|
|
58
|
+
tool_call_id: string;
|
|
59
|
+
arguments: { [k: string]: any };
|
|
60
|
+
metadata?: { [k: string]: any } | undefined;
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
/** @internal */
|
|
64
|
+
export const ToolCallPart$outboundSchema: z.ZodType<
|
|
65
|
+
ToolCallPart$Outbound,
|
|
66
|
+
z.ZodTypeDef,
|
|
67
|
+
ToolCallPart
|
|
68
|
+
> = z.object({
|
|
69
|
+
kind: ToolCallPartKind$outboundSchema,
|
|
70
|
+
toolName: z.string(),
|
|
71
|
+
toolCallId: z.string(),
|
|
72
|
+
arguments: z.record(z.any()),
|
|
73
|
+
metadata: z.record(z.any()).optional(),
|
|
74
|
+
}).transform((v) => {
|
|
75
|
+
return remap$(v, {
|
|
76
|
+
toolName: "tool_name",
|
|
77
|
+
toolCallId: "tool_call_id",
|
|
78
|
+
});
|
|
79
|
+
});
|
|
80
|
+
|
|
81
|
+
export function toolCallPartToJSON(toolCallPart: ToolCallPart): string {
|
|
82
|
+
return JSON.stringify(ToolCallPart$outboundSchema.parse(toolCallPart));
|
|
83
|
+
}
|
|
84
|
+
export function toolCallPartFromJSON(
|
|
85
|
+
jsonString: string,
|
|
86
|
+
): SafeParseResult<ToolCallPart, SDKValidationError> {
|
|
87
|
+
return safeParse(
|
|
88
|
+
jsonString,
|
|
89
|
+
(x) => ToolCallPart$inboundSchema.parse(JSON.parse(x)),
|
|
90
|
+
`Failed to parse 'ToolCallPart' from JSON`,
|
|
91
|
+
);
|
|
92
|
+
}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { ClosedEnum } from "../../types/enums.js";
|
|
9
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
10
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
|
+
|
|
12
|
+
export const ToolResultPartKind = {
|
|
13
|
+
ToolResult: "tool_result",
|
|
14
|
+
} as const;
|
|
15
|
+
export type ToolResultPartKind = ClosedEnum<typeof ToolResultPartKind>;
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* The result of a tool execution. Contains the tool call ID for correlation and the result data from the tool invocation.
|
|
19
|
+
*/
|
|
20
|
+
export type ToolResultPart = {
|
|
21
|
+
kind: ToolResultPartKind;
|
|
22
|
+
toolCallId: string;
|
|
23
|
+
result?: any | undefined;
|
|
24
|
+
metadata?: { [k: string]: any } | undefined;
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
/** @internal */
|
|
28
|
+
export const ToolResultPartKind$inboundSchema: z.ZodNativeEnum<
|
|
29
|
+
typeof ToolResultPartKind
|
|
30
|
+
> = z.nativeEnum(ToolResultPartKind);
|
|
31
|
+
/** @internal */
|
|
32
|
+
export const ToolResultPartKind$outboundSchema: z.ZodNativeEnum<
|
|
33
|
+
typeof ToolResultPartKind
|
|
34
|
+
> = ToolResultPartKind$inboundSchema;
|
|
35
|
+
|
|
36
|
+
/** @internal */
|
|
37
|
+
export const ToolResultPart$inboundSchema: z.ZodType<
|
|
38
|
+
ToolResultPart,
|
|
39
|
+
z.ZodTypeDef,
|
|
40
|
+
unknown
|
|
41
|
+
> = z.object({
|
|
42
|
+
kind: ToolResultPartKind$inboundSchema,
|
|
43
|
+
tool_call_id: z.string(),
|
|
44
|
+
result: z.any().optional(),
|
|
45
|
+
metadata: z.record(z.any()).optional(),
|
|
46
|
+
}).transform((v) => {
|
|
47
|
+
return remap$(v, {
|
|
48
|
+
"tool_call_id": "toolCallId",
|
|
49
|
+
});
|
|
50
|
+
});
|
|
51
|
+
/** @internal */
|
|
52
|
+
export type ToolResultPart$Outbound = {
|
|
53
|
+
kind: string;
|
|
54
|
+
tool_call_id: string;
|
|
55
|
+
result?: any | undefined;
|
|
56
|
+
metadata?: { [k: string]: any } | undefined;
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
/** @internal */
|
|
60
|
+
export const ToolResultPart$outboundSchema: z.ZodType<
|
|
61
|
+
ToolResultPart$Outbound,
|
|
62
|
+
z.ZodTypeDef,
|
|
63
|
+
ToolResultPart
|
|
64
|
+
> = z.object({
|
|
65
|
+
kind: ToolResultPartKind$outboundSchema,
|
|
66
|
+
toolCallId: z.string(),
|
|
67
|
+
result: z.any().optional(),
|
|
68
|
+
metadata: z.record(z.any()).optional(),
|
|
69
|
+
}).transform((v) => {
|
|
70
|
+
return remap$(v, {
|
|
71
|
+
toolCallId: "tool_call_id",
|
|
72
|
+
});
|
|
73
|
+
});
|
|
74
|
+
|
|
75
|
+
export function toolResultPartToJSON(toolResultPart: ToolResultPart): string {
|
|
76
|
+
return JSON.stringify(ToolResultPart$outboundSchema.parse(toolResultPart));
|
|
77
|
+
}
|
|
78
|
+
export function toolResultPartFromJSON(
|
|
79
|
+
jsonString: string,
|
|
80
|
+
): SafeParseResult<ToolResultPart, SDKValidationError> {
|
|
81
|
+
return safeParse(
|
|
82
|
+
jsonString,
|
|
83
|
+
(x) => ToolResultPart$inboundSchema.parse(JSON.parse(x)),
|
|
84
|
+
`Failed to parse 'ToolResultPart' from JSON`,
|
|
85
|
+
);
|
|
86
|
+
}
|