@artinet/sdk 0.5.15 → 0.5.17
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/README.md +11 -34
- package/dist/server/express/server.d.ts +24 -24
- package/dist/services/a2a/factory/builder.d.ts +26 -26
- package/dist/services/a2a/factory/builder.js +38 -72
- package/dist/services/a2a/factory/service.js +2 -1
- package/dist/services/a2a/helpers/agentcard-builder.d.ts +7 -0
- package/dist/services/a2a/helpers/agentcard-builder.js +22 -0
- package/dist/services/a2a/helpers/index.d.ts +1 -0
- package/dist/services/a2a/helpers/index.js +1 -0
- package/dist/services/a2a/methods/get-task.d.ts +46 -46
- package/dist/services/a2a/service.d.ts +152 -152
- package/dist/transport/trpc/a2a/factory/router.d.ts +1084 -1084
- package/dist/transport/trpc/a2a/routes/info.d.ts +36 -36
- package/dist/transport/trpc/a2a/routes/message/route.d.ts +225 -225
- package/dist/transport/trpc/a2a/routes/tasks/route.d.ts +257 -257
- package/dist/transport/trpc/a2a/trpc.d.ts +120 -120
- package/dist/types/interfaces/services/a2a/service.d.ts +2 -1
- package/dist/types/schemas/a2a/agent.d.ts +818 -818
- package/dist/types/schemas/a2a/agent.js +1 -23
- package/dist/types/schemas/a2a/auth.d.ts +197 -197
- package/dist/types/schemas/a2a/auth.js +4 -19
- package/dist/types/schemas/a2a/error.d.ts +24 -24
- package/dist/types/schemas/a2a/message.d.ts +4499 -4499
- package/dist/types/schemas/a2a/message.js +2 -10
- package/dist/types/schemas/a2a/notification.d.ts +403 -403
- package/dist/types/schemas/a2a/notification.js +3 -7
- package/dist/types/schemas/a2a/parameters.d.ts +264 -264
- package/dist/types/schemas/a2a/parameters.js +1 -14
- package/dist/types/schemas/a2a/protocol.d.ts +5988 -5988
- package/dist/types/schemas/a2a/rpc.d.ts +20 -20
- package/dist/types/schemas/a2a/rpc.js +0 -5
- package/dist/types/schemas/a2a/task.d.ts +2513 -2513
- package/dist/types/schemas/a2a/task.js +10 -11
- package/package.json +1 -1
|
@@ -10,11 +10,11 @@ export declare const PartBaseSchema: z.ZodObject<{
|
|
|
10
10
|
/**
|
|
11
11
|
* @optional Optional metadata associated with this part.
|
|
12
12
|
*/
|
|
13
|
-
metadata: z.
|
|
13
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
14
14
|
}, "strip", z.ZodTypeAny, {
|
|
15
|
-
metadata?: Record<string, unknown> |
|
|
15
|
+
metadata?: Record<string, unknown> | undefined;
|
|
16
16
|
}, {
|
|
17
|
-
metadata?: Record<string, unknown> |
|
|
17
|
+
metadata?: Record<string, unknown> | undefined;
|
|
18
18
|
}>;
|
|
19
19
|
export type PartBase = z.infer<typeof PartBaseSchema>;
|
|
20
20
|
/**
|
|
@@ -24,17 +24,17 @@ export declare const FileBaseSchema: z.ZodObject<{
|
|
|
24
24
|
/**
|
|
25
25
|
* @optional An optional name for the file (e.g., "document.pdf").
|
|
26
26
|
*/
|
|
27
|
-
name: z.
|
|
27
|
+
name: z.ZodOptional<z.ZodString>;
|
|
28
28
|
/**
|
|
29
29
|
* @optional The MIME type of the file (e.g., "application/pdf").
|
|
30
30
|
*/
|
|
31
|
-
mimeType: z.
|
|
31
|
+
mimeType: z.ZodOptional<z.ZodString>;
|
|
32
32
|
}, "strip", z.ZodTypeAny, {
|
|
33
|
-
name?: string |
|
|
34
|
-
mimeType?: string |
|
|
33
|
+
name?: string | undefined;
|
|
34
|
+
mimeType?: string | undefined;
|
|
35
35
|
}, {
|
|
36
|
-
name?: string |
|
|
37
|
-
mimeType?: string |
|
|
36
|
+
name?: string | undefined;
|
|
37
|
+
mimeType?: string | undefined;
|
|
38
38
|
}>;
|
|
39
39
|
export type FileBase = z.infer<typeof FileBaseSchema>;
|
|
40
40
|
/**
|
|
@@ -44,11 +44,11 @@ export declare const FileWithBytesSchema: z.ZodObject<{
|
|
|
44
44
|
/**
|
|
45
45
|
* @optional An optional name for the file (e.g., "document.pdf").
|
|
46
46
|
*/
|
|
47
|
-
name: z.
|
|
47
|
+
name: z.ZodOptional<z.ZodString>;
|
|
48
48
|
/**
|
|
49
49
|
* @optional The MIME type of the file (e.g., "application/pdf").
|
|
50
50
|
*/
|
|
51
|
-
mimeType: z.
|
|
51
|
+
mimeType: z.ZodOptional<z.ZodString>;
|
|
52
52
|
} & {
|
|
53
53
|
/**
|
|
54
54
|
* @required The base64-encoded content of the file.
|
|
@@ -57,17 +57,17 @@ export declare const FileWithBytesSchema: z.ZodObject<{
|
|
|
57
57
|
/**
|
|
58
58
|
* @optional The `uri` property must be absent when `bytes` is present.
|
|
59
59
|
*/
|
|
60
|
-
uri: z.
|
|
60
|
+
uri: z.ZodOptional<z.ZodNever>;
|
|
61
61
|
}, "strip", z.ZodTypeAny, {
|
|
62
62
|
bytes: string;
|
|
63
|
-
name?: string |
|
|
64
|
-
mimeType?: string |
|
|
65
|
-
uri?:
|
|
63
|
+
name?: string | undefined;
|
|
64
|
+
mimeType?: string | undefined;
|
|
65
|
+
uri?: undefined;
|
|
66
66
|
}, {
|
|
67
67
|
bytes: string;
|
|
68
|
-
name?: string |
|
|
69
|
-
mimeType?: string |
|
|
70
|
-
uri?:
|
|
68
|
+
name?: string | undefined;
|
|
69
|
+
mimeType?: string | undefined;
|
|
70
|
+
uri?: undefined;
|
|
71
71
|
}>;
|
|
72
72
|
export type FileWithBytes = z.infer<typeof FileWithBytesSchema>;
|
|
73
73
|
/**
|
|
@@ -77,11 +77,11 @@ export declare const FileWithUriSchema: z.ZodObject<{
|
|
|
77
77
|
/**
|
|
78
78
|
* @optional An optional name for the file (e.g., "document.pdf").
|
|
79
79
|
*/
|
|
80
|
-
name: z.
|
|
80
|
+
name: z.ZodOptional<z.ZodString>;
|
|
81
81
|
/**
|
|
82
82
|
* @optional The MIME type of the file (e.g., "application/pdf").
|
|
83
83
|
*/
|
|
84
|
-
mimeType: z.
|
|
84
|
+
mimeType: z.ZodOptional<z.ZodString>;
|
|
85
85
|
} & {
|
|
86
86
|
/**
|
|
87
87
|
* @required A URL pointing to the file's content. (keeping as string for now)
|
|
@@ -90,17 +90,17 @@ export declare const FileWithUriSchema: z.ZodObject<{
|
|
|
90
90
|
/**
|
|
91
91
|
* @optional The `bytes` property must be absent when `uri` is present.
|
|
92
92
|
*/
|
|
93
|
-
bytes: z.
|
|
93
|
+
bytes: z.ZodOptional<z.ZodNever>;
|
|
94
94
|
}, "strip", z.ZodTypeAny, {
|
|
95
95
|
uri: string;
|
|
96
|
-
name?: string |
|
|
97
|
-
bytes?:
|
|
98
|
-
mimeType?: string |
|
|
96
|
+
name?: string | undefined;
|
|
97
|
+
bytes?: undefined;
|
|
98
|
+
mimeType?: string | undefined;
|
|
99
99
|
}, {
|
|
100
100
|
uri: string;
|
|
101
|
-
name?: string |
|
|
102
|
-
bytes?:
|
|
103
|
-
mimeType?: string |
|
|
101
|
+
name?: string | undefined;
|
|
102
|
+
bytes?: undefined;
|
|
103
|
+
mimeType?: string | undefined;
|
|
104
104
|
}>;
|
|
105
105
|
export type FileWithUri = z.infer<typeof FileWithUriSchema>;
|
|
106
106
|
/**
|
|
@@ -110,11 +110,11 @@ export declare const FileSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
110
110
|
/**
|
|
111
111
|
* @optional An optional name for the file (e.g., "document.pdf").
|
|
112
112
|
*/
|
|
113
|
-
name: z.
|
|
113
|
+
name: z.ZodOptional<z.ZodString>;
|
|
114
114
|
/**
|
|
115
115
|
* @optional The MIME type of the file (e.g., "application/pdf").
|
|
116
116
|
*/
|
|
117
|
-
mimeType: z.
|
|
117
|
+
mimeType: z.ZodOptional<z.ZodString>;
|
|
118
118
|
} & {
|
|
119
119
|
/**
|
|
120
120
|
* @required The base64-encoded content of the file.
|
|
@@ -123,26 +123,26 @@ export declare const FileSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
123
123
|
/**
|
|
124
124
|
* @optional The `uri` property must be absent when `bytes` is present.
|
|
125
125
|
*/
|
|
126
|
-
uri: z.
|
|
126
|
+
uri: z.ZodOptional<z.ZodNever>;
|
|
127
127
|
}, "strip", z.ZodTypeAny, {
|
|
128
128
|
bytes: string;
|
|
129
|
-
name?: string |
|
|
130
|
-
mimeType?: string |
|
|
131
|
-
uri?:
|
|
129
|
+
name?: string | undefined;
|
|
130
|
+
mimeType?: string | undefined;
|
|
131
|
+
uri?: undefined;
|
|
132
132
|
}, {
|
|
133
133
|
bytes: string;
|
|
134
|
-
name?: string |
|
|
135
|
-
mimeType?: string |
|
|
136
|
-
uri?:
|
|
134
|
+
name?: string | undefined;
|
|
135
|
+
mimeType?: string | undefined;
|
|
136
|
+
uri?: undefined;
|
|
137
137
|
}>, z.ZodObject<{
|
|
138
138
|
/**
|
|
139
139
|
* @optional An optional name for the file (e.g., "document.pdf").
|
|
140
140
|
*/
|
|
141
|
-
name: z.
|
|
141
|
+
name: z.ZodOptional<z.ZodString>;
|
|
142
142
|
/**
|
|
143
143
|
* @optional The MIME type of the file (e.g., "application/pdf").
|
|
144
144
|
*/
|
|
145
|
-
mimeType: z.
|
|
145
|
+
mimeType: z.ZodOptional<z.ZodString>;
|
|
146
146
|
} & {
|
|
147
147
|
/**
|
|
148
148
|
* @required A URL pointing to the file's content. (keeping as string for now)
|
|
@@ -151,17 +151,17 @@ export declare const FileSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
151
151
|
/**
|
|
152
152
|
* @optional The `bytes` property must be absent when `uri` is present.
|
|
153
153
|
*/
|
|
154
|
-
bytes: z.
|
|
154
|
+
bytes: z.ZodOptional<z.ZodNever>;
|
|
155
155
|
}, "strip", z.ZodTypeAny, {
|
|
156
156
|
uri: string;
|
|
157
|
-
name?: string |
|
|
158
|
-
bytes?:
|
|
159
|
-
mimeType?: string |
|
|
157
|
+
name?: string | undefined;
|
|
158
|
+
bytes?: undefined;
|
|
159
|
+
mimeType?: string | undefined;
|
|
160
160
|
}, {
|
|
161
161
|
uri: string;
|
|
162
|
-
name?: string |
|
|
163
|
-
bytes?:
|
|
164
|
-
mimeType?: string |
|
|
162
|
+
name?: string | undefined;
|
|
163
|
+
bytes?: undefined;
|
|
164
|
+
mimeType?: string | undefined;
|
|
165
165
|
}>]>;
|
|
166
166
|
export type File = z.infer<typeof FileSchema>;
|
|
167
167
|
/**
|
|
@@ -172,7 +172,7 @@ export declare const FilePartSchema: z.ZodObject<{
|
|
|
172
172
|
/**
|
|
173
173
|
* @optional Optional metadata associated with this part.
|
|
174
174
|
*/
|
|
175
|
-
metadata: z.
|
|
175
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
176
176
|
} & {
|
|
177
177
|
/**
|
|
178
178
|
* @required The type of this part, used as a discriminator. Always 'file'.
|
|
@@ -185,11 +185,11 @@ export declare const FilePartSchema: z.ZodObject<{
|
|
|
185
185
|
/**
|
|
186
186
|
* @optional An optional name for the file (e.g., "document.pdf").
|
|
187
187
|
*/
|
|
188
|
-
name: z.
|
|
188
|
+
name: z.ZodOptional<z.ZodString>;
|
|
189
189
|
/**
|
|
190
190
|
* @optional The MIME type of the file (e.g., "application/pdf").
|
|
191
191
|
*/
|
|
192
|
-
mimeType: z.
|
|
192
|
+
mimeType: z.ZodOptional<z.ZodString>;
|
|
193
193
|
} & {
|
|
194
194
|
/**
|
|
195
195
|
* @required The base64-encoded content of the file.
|
|
@@ -198,26 +198,26 @@ export declare const FilePartSchema: z.ZodObject<{
|
|
|
198
198
|
/**
|
|
199
199
|
* @optional The `uri` property must be absent when `bytes` is present.
|
|
200
200
|
*/
|
|
201
|
-
uri: z.
|
|
201
|
+
uri: z.ZodOptional<z.ZodNever>;
|
|
202
202
|
}, "strip", z.ZodTypeAny, {
|
|
203
203
|
bytes: string;
|
|
204
|
-
name?: string |
|
|
205
|
-
mimeType?: string |
|
|
206
|
-
uri?:
|
|
204
|
+
name?: string | undefined;
|
|
205
|
+
mimeType?: string | undefined;
|
|
206
|
+
uri?: undefined;
|
|
207
207
|
}, {
|
|
208
208
|
bytes: string;
|
|
209
|
-
name?: string |
|
|
210
|
-
mimeType?: string |
|
|
211
|
-
uri?:
|
|
209
|
+
name?: string | undefined;
|
|
210
|
+
mimeType?: string | undefined;
|
|
211
|
+
uri?: undefined;
|
|
212
212
|
}>, z.ZodObject<{
|
|
213
213
|
/**
|
|
214
214
|
* @optional An optional name for the file (e.g., "document.pdf").
|
|
215
215
|
*/
|
|
216
|
-
name: z.
|
|
216
|
+
name: z.ZodOptional<z.ZodString>;
|
|
217
217
|
/**
|
|
218
218
|
* @optional The MIME type of the file (e.g., "application/pdf").
|
|
219
219
|
*/
|
|
220
|
-
mimeType: z.
|
|
220
|
+
mimeType: z.ZodOptional<z.ZodString>;
|
|
221
221
|
} & {
|
|
222
222
|
/**
|
|
223
223
|
* @required A URL pointing to the file's content. (keeping as string for now)
|
|
@@ -226,46 +226,46 @@ export declare const FilePartSchema: z.ZodObject<{
|
|
|
226
226
|
/**
|
|
227
227
|
* @optional The `bytes` property must be absent when `uri` is present.
|
|
228
228
|
*/
|
|
229
|
-
bytes: z.
|
|
229
|
+
bytes: z.ZodOptional<z.ZodNever>;
|
|
230
230
|
}, "strip", z.ZodTypeAny, {
|
|
231
231
|
uri: string;
|
|
232
|
-
name?: string |
|
|
233
|
-
bytes?:
|
|
234
|
-
mimeType?: string |
|
|
232
|
+
name?: string | undefined;
|
|
233
|
+
bytes?: undefined;
|
|
234
|
+
mimeType?: string | undefined;
|
|
235
235
|
}, {
|
|
236
236
|
uri: string;
|
|
237
|
-
name?: string |
|
|
238
|
-
bytes?:
|
|
239
|
-
mimeType?: string |
|
|
237
|
+
name?: string | undefined;
|
|
238
|
+
bytes?: undefined;
|
|
239
|
+
mimeType?: string | undefined;
|
|
240
240
|
}>]>;
|
|
241
241
|
}, "strip", z.ZodTypeAny, {
|
|
242
242
|
file: {
|
|
243
243
|
bytes: string;
|
|
244
|
-
name?: string |
|
|
245
|
-
mimeType?: string |
|
|
246
|
-
uri?:
|
|
244
|
+
name?: string | undefined;
|
|
245
|
+
mimeType?: string | undefined;
|
|
246
|
+
uri?: undefined;
|
|
247
247
|
} | {
|
|
248
248
|
uri: string;
|
|
249
|
-
name?: string |
|
|
250
|
-
bytes?:
|
|
251
|
-
mimeType?: string |
|
|
249
|
+
name?: string | undefined;
|
|
250
|
+
bytes?: undefined;
|
|
251
|
+
mimeType?: string | undefined;
|
|
252
252
|
};
|
|
253
253
|
kind: "file";
|
|
254
|
-
metadata?: Record<string, unknown> |
|
|
254
|
+
metadata?: Record<string, unknown> | undefined;
|
|
255
255
|
}, {
|
|
256
256
|
file: {
|
|
257
257
|
bytes: string;
|
|
258
|
-
name?: string |
|
|
259
|
-
mimeType?: string |
|
|
260
|
-
uri?:
|
|
258
|
+
name?: string | undefined;
|
|
259
|
+
mimeType?: string | undefined;
|
|
260
|
+
uri?: undefined;
|
|
261
261
|
} | {
|
|
262
262
|
uri: string;
|
|
263
|
-
name?: string |
|
|
264
|
-
bytes?:
|
|
265
|
-
mimeType?: string |
|
|
263
|
+
name?: string | undefined;
|
|
264
|
+
bytes?: undefined;
|
|
265
|
+
mimeType?: string | undefined;
|
|
266
266
|
};
|
|
267
267
|
kind: "data" | "message" | "file" | "text" | "artifact-update" | "status-update" | "task";
|
|
268
|
-
metadata?: Record<string, unknown> |
|
|
268
|
+
metadata?: Record<string, unknown> | undefined;
|
|
269
269
|
}>;
|
|
270
270
|
export type FilePart = z.infer<typeof FilePartSchema>;
|
|
271
271
|
/**
|
|
@@ -275,7 +275,7 @@ export declare const TextPartSchema: z.ZodObject<{
|
|
|
275
275
|
/**
|
|
276
276
|
* @optional Optional metadata associated with this part.
|
|
277
277
|
*/
|
|
278
|
-
metadata: z.
|
|
278
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
279
279
|
} & {
|
|
280
280
|
/**
|
|
281
281
|
* @required The type of this object, used as a discriminator. Always 'text' for a TextPart.
|
|
@@ -288,11 +288,11 @@ export declare const TextPartSchema: z.ZodObject<{
|
|
|
288
288
|
}, "strip", z.ZodTypeAny, {
|
|
289
289
|
text: string;
|
|
290
290
|
kind: "text";
|
|
291
|
-
metadata?: Record<string, unknown> |
|
|
291
|
+
metadata?: Record<string, unknown> | undefined;
|
|
292
292
|
}, {
|
|
293
293
|
text: string;
|
|
294
294
|
kind: "data" | "message" | "file" | "text" | "artifact-update" | "status-update" | "task";
|
|
295
|
-
metadata?: Record<string, unknown> |
|
|
295
|
+
metadata?: Record<string, unknown> | undefined;
|
|
296
296
|
}>;
|
|
297
297
|
export type TextPart = z.infer<typeof TextPartSchema>;
|
|
298
298
|
/**
|
|
@@ -302,7 +302,7 @@ export declare const DataPartSchema: z.ZodObject<{
|
|
|
302
302
|
/**
|
|
303
303
|
* @optional Optional metadata associated with this part.
|
|
304
304
|
*/
|
|
305
|
-
metadata: z.
|
|
305
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
306
306
|
} & {
|
|
307
307
|
/**
|
|
308
308
|
* @required The type of this object, used as a discriminator. Always 'data' for a DataPart.
|
|
@@ -315,11 +315,11 @@ export declare const DataPartSchema: z.ZodObject<{
|
|
|
315
315
|
}, "strip", z.ZodTypeAny, {
|
|
316
316
|
data: Record<string, unknown>;
|
|
317
317
|
kind: "data";
|
|
318
|
-
metadata?: Record<string, unknown> |
|
|
318
|
+
metadata?: Record<string, unknown> | undefined;
|
|
319
319
|
}, {
|
|
320
320
|
data: Record<string, unknown>;
|
|
321
321
|
kind: "data" | "message" | "file" | "text" | "artifact-update" | "status-update" | "task";
|
|
322
|
-
metadata?: Record<string, unknown> |
|
|
322
|
+
metadata?: Record<string, unknown> | undefined;
|
|
323
323
|
}>;
|
|
324
324
|
export type DataPart = z.infer<typeof DataPartSchema>;
|
|
325
325
|
/**
|
|
@@ -330,7 +330,7 @@ export declare const PartSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
330
330
|
/**
|
|
331
331
|
* @optional Optional metadata associated with this part.
|
|
332
332
|
*/
|
|
333
|
-
metadata: z.
|
|
333
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
334
334
|
} & {
|
|
335
335
|
/**
|
|
336
336
|
* @required The type of this object, used as a discriminator. Always 'text' for a TextPart.
|
|
@@ -343,16 +343,16 @@ export declare const PartSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
343
343
|
}, "strip", z.ZodTypeAny, {
|
|
344
344
|
text: string;
|
|
345
345
|
kind: "text";
|
|
346
|
-
metadata?: Record<string, unknown> |
|
|
346
|
+
metadata?: Record<string, unknown> | undefined;
|
|
347
347
|
}, {
|
|
348
348
|
text: string;
|
|
349
349
|
kind: "data" | "message" | "file" | "text" | "artifact-update" | "status-update" | "task";
|
|
350
|
-
metadata?: Record<string, unknown> |
|
|
350
|
+
metadata?: Record<string, unknown> | undefined;
|
|
351
351
|
}>, z.ZodObject<{
|
|
352
352
|
/**
|
|
353
353
|
* @optional Optional metadata associated with this part.
|
|
354
354
|
*/
|
|
355
|
-
metadata: z.
|
|
355
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
356
356
|
} & {
|
|
357
357
|
/**
|
|
358
358
|
* @required The type of this part, used as a discriminator. Always 'file'.
|
|
@@ -365,11 +365,11 @@ export declare const PartSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
365
365
|
/**
|
|
366
366
|
* @optional An optional name for the file (e.g., "document.pdf").
|
|
367
367
|
*/
|
|
368
|
-
name: z.
|
|
368
|
+
name: z.ZodOptional<z.ZodString>;
|
|
369
369
|
/**
|
|
370
370
|
* @optional The MIME type of the file (e.g., "application/pdf").
|
|
371
371
|
*/
|
|
372
|
-
mimeType: z.
|
|
372
|
+
mimeType: z.ZodOptional<z.ZodString>;
|
|
373
373
|
} & {
|
|
374
374
|
/**
|
|
375
375
|
* @required The base64-encoded content of the file.
|
|
@@ -378,26 +378,26 @@ export declare const PartSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
378
378
|
/**
|
|
379
379
|
* @optional The `uri` property must be absent when `bytes` is present.
|
|
380
380
|
*/
|
|
381
|
-
uri: z.
|
|
381
|
+
uri: z.ZodOptional<z.ZodNever>;
|
|
382
382
|
}, "strip", z.ZodTypeAny, {
|
|
383
383
|
bytes: string;
|
|
384
|
-
name?: string |
|
|
385
|
-
mimeType?: string |
|
|
386
|
-
uri?:
|
|
384
|
+
name?: string | undefined;
|
|
385
|
+
mimeType?: string | undefined;
|
|
386
|
+
uri?: undefined;
|
|
387
387
|
}, {
|
|
388
388
|
bytes: string;
|
|
389
|
-
name?: string |
|
|
390
|
-
mimeType?: string |
|
|
391
|
-
uri?:
|
|
389
|
+
name?: string | undefined;
|
|
390
|
+
mimeType?: string | undefined;
|
|
391
|
+
uri?: undefined;
|
|
392
392
|
}>, z.ZodObject<{
|
|
393
393
|
/**
|
|
394
394
|
* @optional An optional name for the file (e.g., "document.pdf").
|
|
395
395
|
*/
|
|
396
|
-
name: z.
|
|
396
|
+
name: z.ZodOptional<z.ZodString>;
|
|
397
397
|
/**
|
|
398
398
|
* @optional The MIME type of the file (e.g., "application/pdf").
|
|
399
399
|
*/
|
|
400
|
-
mimeType: z.
|
|
400
|
+
mimeType: z.ZodOptional<z.ZodString>;
|
|
401
401
|
} & {
|
|
402
402
|
/**
|
|
403
403
|
* @required A URL pointing to the file's content. (keeping as string for now)
|
|
@@ -406,51 +406,51 @@ export declare const PartSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
406
406
|
/**
|
|
407
407
|
* @optional The `bytes` property must be absent when `uri` is present.
|
|
408
408
|
*/
|
|
409
|
-
bytes: z.
|
|
409
|
+
bytes: z.ZodOptional<z.ZodNever>;
|
|
410
410
|
}, "strip", z.ZodTypeAny, {
|
|
411
411
|
uri: string;
|
|
412
|
-
name?: string |
|
|
413
|
-
bytes?:
|
|
414
|
-
mimeType?: string |
|
|
412
|
+
name?: string | undefined;
|
|
413
|
+
bytes?: undefined;
|
|
414
|
+
mimeType?: string | undefined;
|
|
415
415
|
}, {
|
|
416
416
|
uri: string;
|
|
417
|
-
name?: string |
|
|
418
|
-
bytes?:
|
|
419
|
-
mimeType?: string |
|
|
417
|
+
name?: string | undefined;
|
|
418
|
+
bytes?: undefined;
|
|
419
|
+
mimeType?: string | undefined;
|
|
420
420
|
}>]>;
|
|
421
421
|
}, "strip", z.ZodTypeAny, {
|
|
422
422
|
file: {
|
|
423
423
|
bytes: string;
|
|
424
|
-
name?: string |
|
|
425
|
-
mimeType?: string |
|
|
426
|
-
uri?:
|
|
424
|
+
name?: string | undefined;
|
|
425
|
+
mimeType?: string | undefined;
|
|
426
|
+
uri?: undefined;
|
|
427
427
|
} | {
|
|
428
428
|
uri: string;
|
|
429
|
-
name?: string |
|
|
430
|
-
bytes?:
|
|
431
|
-
mimeType?: string |
|
|
429
|
+
name?: string | undefined;
|
|
430
|
+
bytes?: undefined;
|
|
431
|
+
mimeType?: string | undefined;
|
|
432
432
|
};
|
|
433
433
|
kind: "file";
|
|
434
|
-
metadata?: Record<string, unknown> |
|
|
434
|
+
metadata?: Record<string, unknown> | undefined;
|
|
435
435
|
}, {
|
|
436
436
|
file: {
|
|
437
437
|
bytes: string;
|
|
438
|
-
name?: string |
|
|
439
|
-
mimeType?: string |
|
|
440
|
-
uri?:
|
|
438
|
+
name?: string | undefined;
|
|
439
|
+
mimeType?: string | undefined;
|
|
440
|
+
uri?: undefined;
|
|
441
441
|
} | {
|
|
442
442
|
uri: string;
|
|
443
|
-
name?: string |
|
|
444
|
-
bytes?:
|
|
445
|
-
mimeType?: string |
|
|
443
|
+
name?: string | undefined;
|
|
444
|
+
bytes?: undefined;
|
|
445
|
+
mimeType?: string | undefined;
|
|
446
446
|
};
|
|
447
447
|
kind: "data" | "message" | "file" | "text" | "artifact-update" | "status-update" | "task";
|
|
448
|
-
metadata?: Record<string, unknown> |
|
|
448
|
+
metadata?: Record<string, unknown> | undefined;
|
|
449
449
|
}>, z.ZodObject<{
|
|
450
450
|
/**
|
|
451
451
|
* @optional Optional metadata associated with this part.
|
|
452
452
|
*/
|
|
453
|
-
metadata: z.
|
|
453
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
454
454
|
} & {
|
|
455
455
|
/**
|
|
456
456
|
* @required The type of this object, used as a discriminator. Always 'data' for a DataPart.
|
|
@@ -463,11 +463,11 @@ export declare const PartSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
463
463
|
}, "strip", z.ZodTypeAny, {
|
|
464
464
|
data: Record<string, unknown>;
|
|
465
465
|
kind: "data";
|
|
466
|
-
metadata?: Record<string, unknown> |
|
|
466
|
+
metadata?: Record<string, unknown> | undefined;
|
|
467
467
|
}, {
|
|
468
468
|
data: Record<string, unknown>;
|
|
469
469
|
kind: "data" | "message" | "file" | "text" | "artifact-update" | "status-update" | "task";
|
|
470
|
-
metadata?: Record<string, unknown> |
|
|
470
|
+
metadata?: Record<string, unknown> | undefined;
|
|
471
471
|
}>]>;
|
|
472
472
|
export type Part = z.infer<typeof PartSchema>;
|
|
473
473
|
/**
|
|
@@ -481,11 +481,11 @@ export declare const ArtifactSchema: z.ZodObject<{
|
|
|
481
481
|
/**
|
|
482
482
|
* @optional A human-readable name for the artifact.
|
|
483
483
|
*/
|
|
484
|
-
name: z.
|
|
484
|
+
name: z.ZodOptional<z.ZodString>;
|
|
485
485
|
/**
|
|
486
486
|
* @optional A human-readable description of the artifact.
|
|
487
487
|
*/
|
|
488
|
-
description: z.
|
|
488
|
+
description: z.ZodOptional<z.ZodString>;
|
|
489
489
|
/**
|
|
490
490
|
* @optional An array of content parts that make up the artifact.
|
|
491
491
|
*/
|
|
@@ -493,7 +493,7 @@ export declare const ArtifactSchema: z.ZodObject<{
|
|
|
493
493
|
/**
|
|
494
494
|
* @optional Optional metadata associated with this part.
|
|
495
495
|
*/
|
|
496
|
-
metadata: z.
|
|
496
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
497
497
|
} & {
|
|
498
498
|
/**
|
|
499
499
|
* @required The type of this object, used as a discriminator. Always 'text' for a TextPart.
|
|
@@ -506,16 +506,16 @@ export declare const ArtifactSchema: z.ZodObject<{
|
|
|
506
506
|
}, "strip", z.ZodTypeAny, {
|
|
507
507
|
text: string;
|
|
508
508
|
kind: "text";
|
|
509
|
-
metadata?: Record<string, unknown> |
|
|
509
|
+
metadata?: Record<string, unknown> | undefined;
|
|
510
510
|
}, {
|
|
511
511
|
text: string;
|
|
512
512
|
kind: "data" | "message" | "file" | "text" | "artifact-update" | "status-update" | "task";
|
|
513
|
-
metadata?: Record<string, unknown> |
|
|
513
|
+
metadata?: Record<string, unknown> | undefined;
|
|
514
514
|
}>, z.ZodObject<{
|
|
515
515
|
/**
|
|
516
516
|
* @optional Optional metadata associated with this part.
|
|
517
517
|
*/
|
|
518
|
-
metadata: z.
|
|
518
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
519
519
|
} & {
|
|
520
520
|
/**
|
|
521
521
|
* @required The type of this part, used as a discriminator. Always 'file'.
|
|
@@ -528,11 +528,11 @@ export declare const ArtifactSchema: z.ZodObject<{
|
|
|
528
528
|
/**
|
|
529
529
|
* @optional An optional name for the file (e.g., "document.pdf").
|
|
530
530
|
*/
|
|
531
|
-
name: z.
|
|
531
|
+
name: z.ZodOptional<z.ZodString>;
|
|
532
532
|
/**
|
|
533
533
|
* @optional The MIME type of the file (e.g., "application/pdf").
|
|
534
534
|
*/
|
|
535
|
-
mimeType: z.
|
|
535
|
+
mimeType: z.ZodOptional<z.ZodString>;
|
|
536
536
|
} & {
|
|
537
537
|
/**
|
|
538
538
|
* @required The base64-encoded content of the file.
|
|
@@ -541,26 +541,26 @@ export declare const ArtifactSchema: z.ZodObject<{
|
|
|
541
541
|
/**
|
|
542
542
|
* @optional The `uri` property must be absent when `bytes` is present.
|
|
543
543
|
*/
|
|
544
|
-
uri: z.
|
|
544
|
+
uri: z.ZodOptional<z.ZodNever>;
|
|
545
545
|
}, "strip", z.ZodTypeAny, {
|
|
546
546
|
bytes: string;
|
|
547
|
-
name?: string |
|
|
548
|
-
mimeType?: string |
|
|
549
|
-
uri?:
|
|
547
|
+
name?: string | undefined;
|
|
548
|
+
mimeType?: string | undefined;
|
|
549
|
+
uri?: undefined;
|
|
550
550
|
}, {
|
|
551
551
|
bytes: string;
|
|
552
|
-
name?: string |
|
|
553
|
-
mimeType?: string |
|
|
554
|
-
uri?:
|
|
552
|
+
name?: string | undefined;
|
|
553
|
+
mimeType?: string | undefined;
|
|
554
|
+
uri?: undefined;
|
|
555
555
|
}>, z.ZodObject<{
|
|
556
556
|
/**
|
|
557
557
|
* @optional An optional name for the file (e.g., "document.pdf").
|
|
558
558
|
*/
|
|
559
|
-
name: z.
|
|
559
|
+
name: z.ZodOptional<z.ZodString>;
|
|
560
560
|
/**
|
|
561
561
|
* @optional The MIME type of the file (e.g., "application/pdf").
|
|
562
562
|
*/
|
|
563
|
-
mimeType: z.
|
|
563
|
+
mimeType: z.ZodOptional<z.ZodString>;
|
|
564
564
|
} & {
|
|
565
565
|
/**
|
|
566
566
|
* @required A URL pointing to the file's content. (keeping as string for now)
|
|
@@ -569,51 +569,51 @@ export declare const ArtifactSchema: z.ZodObject<{
|
|
|
569
569
|
/**
|
|
570
570
|
* @optional The `bytes` property must be absent when `uri` is present.
|
|
571
571
|
*/
|
|
572
|
-
bytes: z.
|
|
572
|
+
bytes: z.ZodOptional<z.ZodNever>;
|
|
573
573
|
}, "strip", z.ZodTypeAny, {
|
|
574
574
|
uri: string;
|
|
575
|
-
name?: string |
|
|
576
|
-
bytes?:
|
|
577
|
-
mimeType?: string |
|
|
575
|
+
name?: string | undefined;
|
|
576
|
+
bytes?: undefined;
|
|
577
|
+
mimeType?: string | undefined;
|
|
578
578
|
}, {
|
|
579
579
|
uri: string;
|
|
580
|
-
name?: string |
|
|
581
|
-
bytes?:
|
|
582
|
-
mimeType?: string |
|
|
580
|
+
name?: string | undefined;
|
|
581
|
+
bytes?: undefined;
|
|
582
|
+
mimeType?: string | undefined;
|
|
583
583
|
}>]>;
|
|
584
584
|
}, "strip", z.ZodTypeAny, {
|
|
585
585
|
file: {
|
|
586
586
|
bytes: string;
|
|
587
|
-
name?: string |
|
|
588
|
-
mimeType?: string |
|
|
589
|
-
uri?:
|
|
587
|
+
name?: string | undefined;
|
|
588
|
+
mimeType?: string | undefined;
|
|
589
|
+
uri?: undefined;
|
|
590
590
|
} | {
|
|
591
591
|
uri: string;
|
|
592
|
-
name?: string |
|
|
593
|
-
bytes?:
|
|
594
|
-
mimeType?: string |
|
|
592
|
+
name?: string | undefined;
|
|
593
|
+
bytes?: undefined;
|
|
594
|
+
mimeType?: string | undefined;
|
|
595
595
|
};
|
|
596
596
|
kind: "file";
|
|
597
|
-
metadata?: Record<string, unknown> |
|
|
597
|
+
metadata?: Record<string, unknown> | undefined;
|
|
598
598
|
}, {
|
|
599
599
|
file: {
|
|
600
600
|
bytes: string;
|
|
601
|
-
name?: string |
|
|
602
|
-
mimeType?: string |
|
|
603
|
-
uri?:
|
|
601
|
+
name?: string | undefined;
|
|
602
|
+
mimeType?: string | undefined;
|
|
603
|
+
uri?: undefined;
|
|
604
604
|
} | {
|
|
605
605
|
uri: string;
|
|
606
|
-
name?: string |
|
|
607
|
-
bytes?:
|
|
608
|
-
mimeType?: string |
|
|
606
|
+
name?: string | undefined;
|
|
607
|
+
bytes?: undefined;
|
|
608
|
+
mimeType?: string | undefined;
|
|
609
609
|
};
|
|
610
610
|
kind: "data" | "message" | "file" | "text" | "artifact-update" | "status-update" | "task";
|
|
611
|
-
metadata?: Record<string, unknown> |
|
|
611
|
+
metadata?: Record<string, unknown> | undefined;
|
|
612
612
|
}>, z.ZodObject<{
|
|
613
613
|
/**
|
|
614
614
|
* @optional Optional metadata associated with this part.
|
|
615
615
|
*/
|
|
616
|
-
metadata: z.
|
|
616
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
617
617
|
} & {
|
|
618
618
|
/**
|
|
619
619
|
* @required The type of this object, used as a discriminator. Always 'data' for a DataPart.
|
|
@@ -626,78 +626,78 @@ export declare const ArtifactSchema: z.ZodObject<{
|
|
|
626
626
|
}, "strip", z.ZodTypeAny, {
|
|
627
627
|
data: Record<string, unknown>;
|
|
628
628
|
kind: "data";
|
|
629
|
-
metadata?: Record<string, unknown> |
|
|
629
|
+
metadata?: Record<string, unknown> | undefined;
|
|
630
630
|
}, {
|
|
631
631
|
data: Record<string, unknown>;
|
|
632
632
|
kind: "data" | "message" | "file" | "text" | "artifact-update" | "status-update" | "task";
|
|
633
|
-
metadata?: Record<string, unknown> |
|
|
633
|
+
metadata?: Record<string, unknown> | undefined;
|
|
634
634
|
}>]>, "many">;
|
|
635
635
|
/**
|
|
636
636
|
* @optional Optional metadata for extensions. The key is an extension-specific identifier.
|
|
637
637
|
*/
|
|
638
|
-
metadata: z.
|
|
638
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
639
639
|
/**
|
|
640
640
|
* @optional The URIs of extensions that are relevant to this artifact.
|
|
641
641
|
*/
|
|
642
|
-
extension: z.
|
|
642
|
+
extension: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
643
643
|
}, "strip", z.ZodTypeAny, {
|
|
644
644
|
artifactId: string;
|
|
645
645
|
parts: ({
|
|
646
646
|
file: {
|
|
647
647
|
bytes: string;
|
|
648
|
-
name?: string |
|
|
649
|
-
mimeType?: string |
|
|
650
|
-
uri?:
|
|
648
|
+
name?: string | undefined;
|
|
649
|
+
mimeType?: string | undefined;
|
|
650
|
+
uri?: undefined;
|
|
651
651
|
} | {
|
|
652
652
|
uri: string;
|
|
653
|
-
name?: string |
|
|
654
|
-
bytes?:
|
|
655
|
-
mimeType?: string |
|
|
653
|
+
name?: string | undefined;
|
|
654
|
+
bytes?: undefined;
|
|
655
|
+
mimeType?: string | undefined;
|
|
656
656
|
};
|
|
657
657
|
kind: "file";
|
|
658
|
-
metadata?: Record<string, unknown> |
|
|
658
|
+
metadata?: Record<string, unknown> | undefined;
|
|
659
659
|
} | {
|
|
660
660
|
text: string;
|
|
661
661
|
kind: "text";
|
|
662
|
-
metadata?: Record<string, unknown> |
|
|
662
|
+
metadata?: Record<string, unknown> | undefined;
|
|
663
663
|
} | {
|
|
664
664
|
data: Record<string, unknown>;
|
|
665
665
|
kind: "data";
|
|
666
|
-
metadata?: Record<string, unknown> |
|
|
666
|
+
metadata?: Record<string, unknown> | undefined;
|
|
667
667
|
})[];
|
|
668
|
-
name?: string |
|
|
669
|
-
metadata?: Record<string, unknown> |
|
|
670
|
-
description?: string |
|
|
671
|
-
extension?: string[] |
|
|
668
|
+
name?: string | undefined;
|
|
669
|
+
metadata?: Record<string, unknown> | undefined;
|
|
670
|
+
description?: string | undefined;
|
|
671
|
+
extension?: string[] | undefined;
|
|
672
672
|
}, {
|
|
673
673
|
artifactId: string;
|
|
674
674
|
parts: ({
|
|
675
675
|
file: {
|
|
676
676
|
bytes: string;
|
|
677
|
-
name?: string |
|
|
678
|
-
mimeType?: string |
|
|
679
|
-
uri?:
|
|
677
|
+
name?: string | undefined;
|
|
678
|
+
mimeType?: string | undefined;
|
|
679
|
+
uri?: undefined;
|
|
680
680
|
} | {
|
|
681
681
|
uri: string;
|
|
682
|
-
name?: string |
|
|
683
|
-
bytes?:
|
|
684
|
-
mimeType?: string |
|
|
682
|
+
name?: string | undefined;
|
|
683
|
+
bytes?: undefined;
|
|
684
|
+
mimeType?: string | undefined;
|
|
685
685
|
};
|
|
686
686
|
kind: "data" | "message" | "file" | "text" | "artifact-update" | "status-update" | "task";
|
|
687
|
-
metadata?: Record<string, unknown> |
|
|
687
|
+
metadata?: Record<string, unknown> | undefined;
|
|
688
688
|
} | {
|
|
689
689
|
text: string;
|
|
690
690
|
kind: "data" | "message" | "file" | "text" | "artifact-update" | "status-update" | "task";
|
|
691
|
-
metadata?: Record<string, unknown> |
|
|
691
|
+
metadata?: Record<string, unknown> | undefined;
|
|
692
692
|
} | {
|
|
693
693
|
data: Record<string, unknown>;
|
|
694
694
|
kind: "data" | "message" | "file" | "text" | "artifact-update" | "status-update" | "task";
|
|
695
|
-
metadata?: Record<string, unknown> |
|
|
695
|
+
metadata?: Record<string, unknown> | undefined;
|
|
696
696
|
})[];
|
|
697
|
-
name?: string |
|
|
698
|
-
metadata?: Record<string, unknown> |
|
|
699
|
-
description?: string |
|
|
700
|
-
extension?: string[] |
|
|
697
|
+
name?: string | undefined;
|
|
698
|
+
metadata?: Record<string, unknown> | undefined;
|
|
699
|
+
description?: string | undefined;
|
|
700
|
+
extension?: string[] | undefined;
|
|
701
701
|
}>;
|
|
702
702
|
export type Artifact = z.infer<typeof ArtifactSchema>;
|
|
703
703
|
/**
|
|
@@ -721,7 +721,7 @@ export declare const MessageSchema: z.ZodObject<{
|
|
|
721
721
|
/**
|
|
722
722
|
* @optional Optional metadata associated with this part.
|
|
723
723
|
*/
|
|
724
|
-
metadata: z.
|
|
724
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
725
725
|
} & {
|
|
726
726
|
/**
|
|
727
727
|
* @required The type of this object, used as a discriminator. Always 'text' for a TextPart.
|
|
@@ -734,16 +734,16 @@ export declare const MessageSchema: z.ZodObject<{
|
|
|
734
734
|
}, "strip", z.ZodTypeAny, {
|
|
735
735
|
text: string;
|
|
736
736
|
kind: "text";
|
|
737
|
-
metadata?: Record<string, unknown> |
|
|
737
|
+
metadata?: Record<string, unknown> | undefined;
|
|
738
738
|
}, {
|
|
739
739
|
text: string;
|
|
740
740
|
kind: "data" | "message" | "file" | "text" | "artifact-update" | "status-update" | "task";
|
|
741
|
-
metadata?: Record<string, unknown> |
|
|
741
|
+
metadata?: Record<string, unknown> | undefined;
|
|
742
742
|
}>, z.ZodObject<{
|
|
743
743
|
/**
|
|
744
744
|
* @optional Optional metadata associated with this part.
|
|
745
745
|
*/
|
|
746
|
-
metadata: z.
|
|
746
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
747
747
|
} & {
|
|
748
748
|
/**
|
|
749
749
|
* @required The type of this part, used as a discriminator. Always 'file'.
|
|
@@ -756,11 +756,11 @@ export declare const MessageSchema: z.ZodObject<{
|
|
|
756
756
|
/**
|
|
757
757
|
* @optional An optional name for the file (e.g., "document.pdf").
|
|
758
758
|
*/
|
|
759
|
-
name: z.
|
|
759
|
+
name: z.ZodOptional<z.ZodString>;
|
|
760
760
|
/**
|
|
761
761
|
* @optional The MIME type of the file (e.g., "application/pdf").
|
|
762
762
|
*/
|
|
763
|
-
mimeType: z.
|
|
763
|
+
mimeType: z.ZodOptional<z.ZodString>;
|
|
764
764
|
} & {
|
|
765
765
|
/**
|
|
766
766
|
* @required The base64-encoded content of the file.
|
|
@@ -769,26 +769,26 @@ export declare const MessageSchema: z.ZodObject<{
|
|
|
769
769
|
/**
|
|
770
770
|
* @optional The `uri` property must be absent when `bytes` is present.
|
|
771
771
|
*/
|
|
772
|
-
uri: z.
|
|
772
|
+
uri: z.ZodOptional<z.ZodNever>;
|
|
773
773
|
}, "strip", z.ZodTypeAny, {
|
|
774
774
|
bytes: string;
|
|
775
|
-
name?: string |
|
|
776
|
-
mimeType?: string |
|
|
777
|
-
uri?:
|
|
775
|
+
name?: string | undefined;
|
|
776
|
+
mimeType?: string | undefined;
|
|
777
|
+
uri?: undefined;
|
|
778
778
|
}, {
|
|
779
779
|
bytes: string;
|
|
780
|
-
name?: string |
|
|
781
|
-
mimeType?: string |
|
|
782
|
-
uri?:
|
|
780
|
+
name?: string | undefined;
|
|
781
|
+
mimeType?: string | undefined;
|
|
782
|
+
uri?: undefined;
|
|
783
783
|
}>, z.ZodObject<{
|
|
784
784
|
/**
|
|
785
785
|
* @optional An optional name for the file (e.g., "document.pdf").
|
|
786
786
|
*/
|
|
787
|
-
name: z.
|
|
787
|
+
name: z.ZodOptional<z.ZodString>;
|
|
788
788
|
/**
|
|
789
789
|
* @optional The MIME type of the file (e.g., "application/pdf").
|
|
790
790
|
*/
|
|
791
|
-
mimeType: z.
|
|
791
|
+
mimeType: z.ZodOptional<z.ZodString>;
|
|
792
792
|
} & {
|
|
793
793
|
/**
|
|
794
794
|
* @required A URL pointing to the file's content. (keeping as string for now)
|
|
@@ -797,51 +797,51 @@ export declare const MessageSchema: z.ZodObject<{
|
|
|
797
797
|
/**
|
|
798
798
|
* @optional The `bytes` property must be absent when `uri` is present.
|
|
799
799
|
*/
|
|
800
|
-
bytes: z.
|
|
800
|
+
bytes: z.ZodOptional<z.ZodNever>;
|
|
801
801
|
}, "strip", z.ZodTypeAny, {
|
|
802
802
|
uri: string;
|
|
803
|
-
name?: string |
|
|
804
|
-
bytes?:
|
|
805
|
-
mimeType?: string |
|
|
803
|
+
name?: string | undefined;
|
|
804
|
+
bytes?: undefined;
|
|
805
|
+
mimeType?: string | undefined;
|
|
806
806
|
}, {
|
|
807
807
|
uri: string;
|
|
808
|
-
name?: string |
|
|
809
|
-
bytes?:
|
|
810
|
-
mimeType?: string |
|
|
808
|
+
name?: string | undefined;
|
|
809
|
+
bytes?: undefined;
|
|
810
|
+
mimeType?: string | undefined;
|
|
811
811
|
}>]>;
|
|
812
812
|
}, "strip", z.ZodTypeAny, {
|
|
813
813
|
file: {
|
|
814
814
|
bytes: string;
|
|
815
|
-
name?: string |
|
|
816
|
-
mimeType?: string |
|
|
817
|
-
uri?:
|
|
815
|
+
name?: string | undefined;
|
|
816
|
+
mimeType?: string | undefined;
|
|
817
|
+
uri?: undefined;
|
|
818
818
|
} | {
|
|
819
819
|
uri: string;
|
|
820
|
-
name?: string |
|
|
821
|
-
bytes?:
|
|
822
|
-
mimeType?: string |
|
|
820
|
+
name?: string | undefined;
|
|
821
|
+
bytes?: undefined;
|
|
822
|
+
mimeType?: string | undefined;
|
|
823
823
|
};
|
|
824
824
|
kind: "file";
|
|
825
|
-
metadata?: Record<string, unknown> |
|
|
825
|
+
metadata?: Record<string, unknown> | undefined;
|
|
826
826
|
}, {
|
|
827
827
|
file: {
|
|
828
828
|
bytes: string;
|
|
829
|
-
name?: string |
|
|
830
|
-
mimeType?: string |
|
|
831
|
-
uri?:
|
|
829
|
+
name?: string | undefined;
|
|
830
|
+
mimeType?: string | undefined;
|
|
831
|
+
uri?: undefined;
|
|
832
832
|
} | {
|
|
833
833
|
uri: string;
|
|
834
|
-
name?: string |
|
|
835
|
-
bytes?:
|
|
836
|
-
mimeType?: string |
|
|
834
|
+
name?: string | undefined;
|
|
835
|
+
bytes?: undefined;
|
|
836
|
+
mimeType?: string | undefined;
|
|
837
837
|
};
|
|
838
838
|
kind: "data" | "message" | "file" | "text" | "artifact-update" | "status-update" | "task";
|
|
839
|
-
metadata?: Record<string, unknown> |
|
|
839
|
+
metadata?: Record<string, unknown> | undefined;
|
|
840
840
|
}>, z.ZodObject<{
|
|
841
841
|
/**
|
|
842
842
|
* @optional Optional metadata associated with this part.
|
|
843
843
|
*/
|
|
844
|
-
metadata: z.
|
|
844
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
845
845
|
} & {
|
|
846
846
|
/**
|
|
847
847
|
* @required The type of this object, used as a discriminator. Always 'data' for a DataPart.
|
|
@@ -854,24 +854,24 @@ export declare const MessageSchema: z.ZodObject<{
|
|
|
854
854
|
}, "strip", z.ZodTypeAny, {
|
|
855
855
|
data: Record<string, unknown>;
|
|
856
856
|
kind: "data";
|
|
857
|
-
metadata?: Record<string, unknown> |
|
|
857
|
+
metadata?: Record<string, unknown> | undefined;
|
|
858
858
|
}, {
|
|
859
859
|
data: Record<string, unknown>;
|
|
860
860
|
kind: "data" | "message" | "file" | "text" | "artifact-update" | "status-update" | "task";
|
|
861
|
-
metadata?: Record<string, unknown> |
|
|
861
|
+
metadata?: Record<string, unknown> | undefined;
|
|
862
862
|
}>]>, "many">;
|
|
863
863
|
/**
|
|
864
864
|
* @optional Optional metadata for extensions. The key is an extension-specific identifier.
|
|
865
865
|
*/
|
|
866
|
-
metadata: z.
|
|
866
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
867
867
|
/**
|
|
868
868
|
* @optional The URIs of extensions that are relevant to this message.
|
|
869
869
|
*/
|
|
870
|
-
extensions: z.
|
|
870
|
+
extensions: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
871
871
|
/**
|
|
872
872
|
* @optional A list of other task IDs that this message references for additional context.
|
|
873
873
|
*/
|
|
874
|
-
referenceTaskIds: z.
|
|
874
|
+
referenceTaskIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
875
875
|
/**
|
|
876
876
|
* @required A unique identifier for the message, typically a UUID, generated by the sender.
|
|
877
877
|
*/
|
|
@@ -879,11 +879,11 @@ export declare const MessageSchema: z.ZodObject<{
|
|
|
879
879
|
/**
|
|
880
880
|
* @optional The identifier of the task this message is part of. Can be omitted for the first message of a new task.
|
|
881
881
|
*/
|
|
882
|
-
taskId: z.
|
|
882
|
+
taskId: z.ZodOptional<z.ZodString>;
|
|
883
883
|
/**
|
|
884
884
|
* @optional The context identifier for this message, used to group related interactions.
|
|
885
885
|
*/
|
|
886
|
-
contextId: z.
|
|
886
|
+
contextId: z.ZodOptional<z.ZodString>;
|
|
887
887
|
/**
|
|
888
888
|
* @required The type of this object, used as a discriminator. Always 'message' for a Message.
|
|
889
889
|
*/
|
|
@@ -894,63 +894,63 @@ export declare const MessageSchema: z.ZodObject<{
|
|
|
894
894
|
parts: ({
|
|
895
895
|
file: {
|
|
896
896
|
bytes: string;
|
|
897
|
-
name?: string |
|
|
898
|
-
mimeType?: string |
|
|
899
|
-
uri?:
|
|
897
|
+
name?: string | undefined;
|
|
898
|
+
mimeType?: string | undefined;
|
|
899
|
+
uri?: undefined;
|
|
900
900
|
} | {
|
|
901
901
|
uri: string;
|
|
902
|
-
name?: string |
|
|
903
|
-
bytes?:
|
|
904
|
-
mimeType?: string |
|
|
902
|
+
name?: string | undefined;
|
|
903
|
+
bytes?: undefined;
|
|
904
|
+
mimeType?: string | undefined;
|
|
905
905
|
};
|
|
906
906
|
kind: "file";
|
|
907
|
-
metadata?: Record<string, unknown> |
|
|
907
|
+
metadata?: Record<string, unknown> | undefined;
|
|
908
908
|
} | {
|
|
909
909
|
text: string;
|
|
910
910
|
kind: "text";
|
|
911
|
-
metadata?: Record<string, unknown> |
|
|
911
|
+
metadata?: Record<string, unknown> | undefined;
|
|
912
912
|
} | {
|
|
913
913
|
data: Record<string, unknown>;
|
|
914
914
|
kind: "data";
|
|
915
|
-
metadata?: Record<string, unknown> |
|
|
915
|
+
metadata?: Record<string, unknown> | undefined;
|
|
916
916
|
})[];
|
|
917
917
|
messageId: string;
|
|
918
|
-
metadata?: Record<string, unknown> |
|
|
919
|
-
extensions?: string[] |
|
|
920
|
-
referenceTaskIds?: string[] |
|
|
921
|
-
taskId?: string |
|
|
922
|
-
contextId?: string |
|
|
918
|
+
metadata?: Record<string, unknown> | undefined;
|
|
919
|
+
extensions?: string[] | undefined;
|
|
920
|
+
referenceTaskIds?: string[] | undefined;
|
|
921
|
+
taskId?: string | undefined;
|
|
922
|
+
contextId?: string | undefined;
|
|
923
923
|
}, {
|
|
924
924
|
role: "user" | "agent";
|
|
925
925
|
kind: "data" | "message" | "file" | "text" | "artifact-update" | "status-update" | "task";
|
|
926
926
|
parts: ({
|
|
927
927
|
file: {
|
|
928
928
|
bytes: string;
|
|
929
|
-
name?: string |
|
|
930
|
-
mimeType?: string |
|
|
931
|
-
uri?:
|
|
929
|
+
name?: string | undefined;
|
|
930
|
+
mimeType?: string | undefined;
|
|
931
|
+
uri?: undefined;
|
|
932
932
|
} | {
|
|
933
933
|
uri: string;
|
|
934
|
-
name?: string |
|
|
935
|
-
bytes?:
|
|
936
|
-
mimeType?: string |
|
|
934
|
+
name?: string | undefined;
|
|
935
|
+
bytes?: undefined;
|
|
936
|
+
mimeType?: string | undefined;
|
|
937
937
|
};
|
|
938
938
|
kind: "data" | "message" | "file" | "text" | "artifact-update" | "status-update" | "task";
|
|
939
|
-
metadata?: Record<string, unknown> |
|
|
939
|
+
metadata?: Record<string, unknown> | undefined;
|
|
940
940
|
} | {
|
|
941
941
|
text: string;
|
|
942
942
|
kind: "data" | "message" | "file" | "text" | "artifact-update" | "status-update" | "task";
|
|
943
|
-
metadata?: Record<string, unknown> |
|
|
943
|
+
metadata?: Record<string, unknown> | undefined;
|
|
944
944
|
} | {
|
|
945
945
|
data: Record<string, unknown>;
|
|
946
946
|
kind: "data" | "message" | "file" | "text" | "artifact-update" | "status-update" | "task";
|
|
947
|
-
metadata?: Record<string, unknown> |
|
|
947
|
+
metadata?: Record<string, unknown> | undefined;
|
|
948
948
|
})[];
|
|
949
949
|
messageId: string;
|
|
950
|
-
metadata?: Record<string, unknown> |
|
|
951
|
-
extensions?: string[] |
|
|
952
|
-
referenceTaskIds?: string[] |
|
|
953
|
-
taskId?: string |
|
|
954
|
-
contextId?: string |
|
|
950
|
+
metadata?: Record<string, unknown> | undefined;
|
|
951
|
+
extensions?: string[] | undefined;
|
|
952
|
+
referenceTaskIds?: string[] | undefined;
|
|
953
|
+
taskId?: string | undefined;
|
|
954
|
+
contextId?: string | undefined;
|
|
955
955
|
}>;
|
|
956
956
|
export type Message = z.infer<typeof MessageSchema>;
|