@orq-ai/node 4.0.0-rc.20 → 4.0.0-rc.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +25 -21
- package/bin/mcp-server.js +4356 -3411
- package/bin/mcp-server.js.map +54 -50
- package/docs/sdks/agents/README.md +83 -3
- package/examples/package-lock.json +1 -1
- package/funcs/agentsDuplicate.d.ts +18 -0
- package/funcs/agentsDuplicate.d.ts.map +1 -0
- package/funcs/agentsDuplicate.js +123 -0
- package/funcs/agentsDuplicate.js.map +1 -0
- package/funcs/agentsList.d.ts +1 -1
- package/funcs/agentsList.js +1 -1
- package/jsr.json +1 -1
- package/lib/config.d.ts +3 -3
- package/lib/config.js +3 -3
- package/mcp-server/mcp-server.js +1 -1
- package/mcp-server/server.d.ts.map +1 -1
- package/mcp-server/server.js +3 -1
- package/mcp-server/server.js.map +1 -1
- package/mcp-server/tools/agentsDuplicate.d.ts +8 -0
- package/mcp-server/tools/agentsDuplicate.d.ts.map +1 -0
- package/mcp-server/tools/agentsDuplicate.js +64 -0
- package/mcp-server/tools/agentsDuplicate.js.map +1 -0
- package/mcp-server/tools/agentsList.js +1 -1
- package/mcp-server/tools/agentsList.js.map +1 -1
- package/models/errors/duplicateagent.d.ts +55 -0
- package/models/errors/duplicateagent.d.ts.map +1 -0
- package/models/errors/duplicateagent.js +106 -0
- package/models/errors/duplicateagent.js.map +1 -0
- package/models/errors/index.d.ts +1 -0
- package/models/errors/index.d.ts.map +1 -1
- package/models/errors/index.js +1 -0
- package/models/errors/index.js.map +1 -1
- package/models/operations/createagent.d.ts +19 -10
- package/models/operations/createagent.d.ts.map +1 -1
- package/models/operations/createagent.js +14 -11
- package/models/operations/createagent.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/createtool.js +10 -10
- package/models/operations/duplicateagent.d.ts +1267 -0
- package/models/operations/duplicateagent.d.ts.map +1 -0
- package/models/operations/duplicateagent.js +1278 -0
- package/models/operations/duplicateagent.js.map +1 -0
- package/models/operations/duplicatetool.js +10 -10
- package/models/operations/fileget.js +2 -2
- package/models/operations/filelist.js +2 -2
- package/models/operations/fileupload.js +2 -2
- package/models/operations/getagent.d.ts +12 -9
- package/models/operations/getagent.d.ts.map +1 -1
- package/models/operations/getagent.js +11 -11
- package/models/operations/getagent.js.map +1 -1
- package/models/operations/getagenttask.d.ts +321 -4
- package/models/operations/getagenttask.d.ts.map +1 -1
- package/models/operations/getagenttask.js +351 -5
- package/models/operations/getagenttask.js.map +1 -1
- package/models/operations/getalltools.js +10 -10
- package/models/operations/getbudget.js +2 -2
- package/models/operations/getevals.js +28 -28
- package/models/operations/index.d.ts +1 -0
- package/models/operations/index.d.ts.map +1 -1
- package/models/operations/index.js +1 -0
- package/models/operations/index.js.map +1 -1
- package/models/operations/invokeagent.d.ts +231 -2
- package/models/operations/invokeagent.d.ts.map +1 -1
- package/models/operations/invokeagent.js +261 -4
- package/models/operations/invokeagent.js.map +1 -1
- package/models/operations/listagents.d.ts +14 -11
- package/models/operations/listagents.d.ts.map +1 -1
- package/models/operations/listagents.js +14 -13
- package/models/operations/listagents.js.map +1 -1
- package/models/operations/listagenttasks.d.ts +250 -1094
- package/models/operations/listagenttasks.d.ts.map +1 -1
- package/models/operations/listagenttasks.js +276 -1117
- package/models/operations/listagenttasks.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/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 +10 -10
- package/models/operations/runagent.d.ts +232 -3
- package/models/operations/runagent.d.ts.map +1 -1
- package/models/operations/runagent.js +267 -8
- package/models/operations/runagent.js.map +1 -1
- package/models/operations/streamrunagent.d.ts +1 -1
- package/models/operations/updateagent.d.ts +41 -9
- package/models/operations/updateagent.d.ts.map +1 -1
- package/models/operations/updateagent.js +34 -16
- 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/updatetool.js +10 -10
- package/package.json +1 -1
- package/sdk/agents.d.ts +8 -1
- package/sdk/agents.d.ts.map +1 -1
- package/sdk/agents.js +11 -1
- package/sdk/agents.js.map +1 -1
- package/src/funcs/agentsDuplicate.ts +179 -0
- package/src/funcs/agentsList.ts +1 -1
- package/src/lib/config.ts +3 -3
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +3 -1
- package/src/mcp-server/tools/agentsDuplicate.ts +37 -0
- package/src/mcp-server/tools/agentsList.ts +1 -1
- package/src/models/errors/duplicateagent.ts +128 -0
- package/src/models/errors/index.ts +1 -0
- package/src/models/operations/createagent.ts +33 -16
- 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/createtool.ts +10 -10
- package/src/models/operations/duplicateagent.ts +3280 -0
- package/src/models/operations/duplicatetool.ts +10 -10
- 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/getagent.ts +29 -17
- package/src/models/operations/getagenttask.ts +750 -8
- package/src/models/operations/getalltools.ts +10 -10
- package/src/models/operations/getbudget.ts +2 -2
- package/src/models/operations/getevals.ts +28 -28
- package/src/models/operations/index.ts +1 -0
- package/src/models/operations/invokeagent.ts +632 -4
- package/src/models/operations/listagents.ts +32 -21
- package/src/models/operations/listagenttasks.ts +640 -2908
- 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/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 +10 -10
- package/src/models/operations/runagent.ts +606 -5
- package/src/models/operations/streamrunagent.ts +1 -1
- package/src/models/operations/updateagent.ts +72 -18
- 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/updatetool.ts +10 -10
- package/src/sdk/agents.ts +19 -1
|
@@ -277,6 +277,118 @@ export const InvokeAgentAgentsRole = {
|
|
|
277
277
|
*/
|
|
278
278
|
export type InvokeAgentAgentsRole = ClosedEnum<typeof InvokeAgentAgentsRole>;
|
|
279
279
|
|
|
280
|
+
export const InvokeAgentPartsAgentsResponse200ApplicationJSONKind = {
|
|
281
|
+
ToolResult: "tool_result",
|
|
282
|
+
} as const;
|
|
283
|
+
export type InvokeAgentPartsAgentsResponse200ApplicationJSONKind = ClosedEnum<
|
|
284
|
+
typeof InvokeAgentPartsAgentsResponse200ApplicationJSONKind
|
|
285
|
+
>;
|
|
286
|
+
|
|
287
|
+
export type InvokeAgentParts5 = {
|
|
288
|
+
kind: InvokeAgentPartsAgentsResponse200ApplicationJSONKind;
|
|
289
|
+
toolCallId: string;
|
|
290
|
+
result?: any | undefined;
|
|
291
|
+
metadata?: { [k: string]: any } | undefined;
|
|
292
|
+
};
|
|
293
|
+
|
|
294
|
+
export const InvokeAgentPartsAgentsResponse200Kind = {
|
|
295
|
+
ToolCall: "tool_call",
|
|
296
|
+
} as const;
|
|
297
|
+
export type InvokeAgentPartsAgentsResponse200Kind = ClosedEnum<
|
|
298
|
+
typeof InvokeAgentPartsAgentsResponse200Kind
|
|
299
|
+
>;
|
|
300
|
+
|
|
301
|
+
export type InvokeAgentParts4 = {
|
|
302
|
+
kind: InvokeAgentPartsAgentsResponse200Kind;
|
|
303
|
+
toolName: string;
|
|
304
|
+
toolCallId: string;
|
|
305
|
+
arguments: { [k: string]: any };
|
|
306
|
+
metadata?: { [k: string]: any } | undefined;
|
|
307
|
+
};
|
|
308
|
+
|
|
309
|
+
export const InvokeAgentPartsAgentsResponseKind = {
|
|
310
|
+
File: "file",
|
|
311
|
+
} as const;
|
|
312
|
+
export type InvokeAgentPartsAgentsResponseKind = ClosedEnum<
|
|
313
|
+
typeof InvokeAgentPartsAgentsResponseKind
|
|
314
|
+
>;
|
|
315
|
+
|
|
316
|
+
/**
|
|
317
|
+
* File in URI format. Check in the model's documentation for the supported mime types for the URI format
|
|
318
|
+
*/
|
|
319
|
+
export type InvokeAgentFileFileInURIFormat = {
|
|
320
|
+
/**
|
|
321
|
+
* URL for the File content
|
|
322
|
+
*/
|
|
323
|
+
uri: string;
|
|
324
|
+
/**
|
|
325
|
+
* Optional mimeType for the file
|
|
326
|
+
*/
|
|
327
|
+
mimeType?: string | undefined;
|
|
328
|
+
/**
|
|
329
|
+
* Optional name for the file
|
|
330
|
+
*/
|
|
331
|
+
name?: string | undefined;
|
|
332
|
+
};
|
|
333
|
+
|
|
334
|
+
/**
|
|
335
|
+
* Binary in base64 format. Check in the model's documentation for the supported mime types for the binary format.
|
|
336
|
+
*/
|
|
337
|
+
export type InvokeAgentFileBinaryFormat = {
|
|
338
|
+
/**
|
|
339
|
+
* base64 encoded content of the file
|
|
340
|
+
*/
|
|
341
|
+
bytes: string;
|
|
342
|
+
/**
|
|
343
|
+
* Optional mimeType for the file
|
|
344
|
+
*/
|
|
345
|
+
mimeType?: string | undefined;
|
|
346
|
+
/**
|
|
347
|
+
* Optional name for the file
|
|
348
|
+
*/
|
|
349
|
+
name?: string | undefined;
|
|
350
|
+
};
|
|
351
|
+
|
|
352
|
+
export type InvokeAgentPartsFile =
|
|
353
|
+
| InvokeAgentFileBinaryFormat
|
|
354
|
+
| InvokeAgentFileFileInURIFormat;
|
|
355
|
+
|
|
356
|
+
export type InvokeAgentParts3 = {
|
|
357
|
+
kind: InvokeAgentPartsAgentsResponseKind;
|
|
358
|
+
file: InvokeAgentFileBinaryFormat | InvokeAgentFileFileInURIFormat;
|
|
359
|
+
metadata?: { [k: string]: any } | undefined;
|
|
360
|
+
};
|
|
361
|
+
|
|
362
|
+
export const InvokeAgentPartsAgentsKind = {
|
|
363
|
+
Data: "data",
|
|
364
|
+
} as const;
|
|
365
|
+
export type InvokeAgentPartsAgentsKind = ClosedEnum<
|
|
366
|
+
typeof InvokeAgentPartsAgentsKind
|
|
367
|
+
>;
|
|
368
|
+
|
|
369
|
+
export type InvokeAgentParts2 = {
|
|
370
|
+
kind: InvokeAgentPartsAgentsKind;
|
|
371
|
+
data: { [k: string]: any };
|
|
372
|
+
metadata?: { [k: string]: any } | undefined;
|
|
373
|
+
};
|
|
374
|
+
|
|
375
|
+
export const InvokeAgentPartsKind = {
|
|
376
|
+
Text: "text",
|
|
377
|
+
} as const;
|
|
378
|
+
export type InvokeAgentPartsKind = ClosedEnum<typeof InvokeAgentPartsKind>;
|
|
379
|
+
|
|
380
|
+
export type InvokeAgentParts1 = {
|
|
381
|
+
kind: InvokeAgentPartsKind;
|
|
382
|
+
text: string;
|
|
383
|
+
};
|
|
384
|
+
|
|
385
|
+
export type InvokeAgentParts =
|
|
386
|
+
| InvokeAgentParts4
|
|
387
|
+
| InvokeAgentParts1
|
|
388
|
+
| InvokeAgentParts2
|
|
389
|
+
| InvokeAgentParts3
|
|
390
|
+
| InvokeAgentParts5;
|
|
391
|
+
|
|
280
392
|
/**
|
|
281
393
|
* Optional status message
|
|
282
394
|
*/
|
|
@@ -287,7 +399,13 @@ export type InvokeAgentMessage = {
|
|
|
287
399
|
* Extended A2A message role
|
|
288
400
|
*/
|
|
289
401
|
role: InvokeAgentAgentsRole;
|
|
290
|
-
parts: Array<
|
|
402
|
+
parts: Array<
|
|
403
|
+
| InvokeAgentParts4
|
|
404
|
+
| InvokeAgentParts1
|
|
405
|
+
| InvokeAgentParts2
|
|
406
|
+
| InvokeAgentParts3
|
|
407
|
+
| InvokeAgentParts5
|
|
408
|
+
>;
|
|
291
409
|
};
|
|
292
410
|
|
|
293
411
|
/**
|
|
@@ -1061,6 +1179,494 @@ export const InvokeAgentAgentsRole$outboundSchema: z.ZodNativeEnum<
|
|
|
1061
1179
|
typeof InvokeAgentAgentsRole
|
|
1062
1180
|
> = InvokeAgentAgentsRole$inboundSchema;
|
|
1063
1181
|
|
|
1182
|
+
/** @internal */
|
|
1183
|
+
export const InvokeAgentPartsAgentsResponse200ApplicationJSONKind$inboundSchema:
|
|
1184
|
+
z.ZodNativeEnum<typeof InvokeAgentPartsAgentsResponse200ApplicationJSONKind> =
|
|
1185
|
+
z.nativeEnum(InvokeAgentPartsAgentsResponse200ApplicationJSONKind);
|
|
1186
|
+
/** @internal */
|
|
1187
|
+
export const InvokeAgentPartsAgentsResponse200ApplicationJSONKind$outboundSchema:
|
|
1188
|
+
z.ZodNativeEnum<typeof InvokeAgentPartsAgentsResponse200ApplicationJSONKind> =
|
|
1189
|
+
InvokeAgentPartsAgentsResponse200ApplicationJSONKind$inboundSchema;
|
|
1190
|
+
|
|
1191
|
+
/** @internal */
|
|
1192
|
+
export const InvokeAgentParts5$inboundSchema: z.ZodType<
|
|
1193
|
+
InvokeAgentParts5,
|
|
1194
|
+
z.ZodTypeDef,
|
|
1195
|
+
unknown
|
|
1196
|
+
> = z.object({
|
|
1197
|
+
kind: InvokeAgentPartsAgentsResponse200ApplicationJSONKind$inboundSchema,
|
|
1198
|
+
tool_call_id: z.string(),
|
|
1199
|
+
result: z.any().optional(),
|
|
1200
|
+
metadata: z.record(z.any()).optional(),
|
|
1201
|
+
}).transform((v) => {
|
|
1202
|
+
return remap$(v, {
|
|
1203
|
+
"tool_call_id": "toolCallId",
|
|
1204
|
+
});
|
|
1205
|
+
});
|
|
1206
|
+
/** @internal */
|
|
1207
|
+
export type InvokeAgentParts5$Outbound = {
|
|
1208
|
+
kind: string;
|
|
1209
|
+
tool_call_id: string;
|
|
1210
|
+
result?: any | undefined;
|
|
1211
|
+
metadata?: { [k: string]: any } | undefined;
|
|
1212
|
+
};
|
|
1213
|
+
|
|
1214
|
+
/** @internal */
|
|
1215
|
+
export const InvokeAgentParts5$outboundSchema: z.ZodType<
|
|
1216
|
+
InvokeAgentParts5$Outbound,
|
|
1217
|
+
z.ZodTypeDef,
|
|
1218
|
+
InvokeAgentParts5
|
|
1219
|
+
> = z.object({
|
|
1220
|
+
kind: InvokeAgentPartsAgentsResponse200ApplicationJSONKind$outboundSchema,
|
|
1221
|
+
toolCallId: z.string(),
|
|
1222
|
+
result: z.any().optional(),
|
|
1223
|
+
metadata: z.record(z.any()).optional(),
|
|
1224
|
+
}).transform((v) => {
|
|
1225
|
+
return remap$(v, {
|
|
1226
|
+
toolCallId: "tool_call_id",
|
|
1227
|
+
});
|
|
1228
|
+
});
|
|
1229
|
+
|
|
1230
|
+
export function invokeAgentParts5ToJSON(
|
|
1231
|
+
invokeAgentParts5: InvokeAgentParts5,
|
|
1232
|
+
): string {
|
|
1233
|
+
return JSON.stringify(
|
|
1234
|
+
InvokeAgentParts5$outboundSchema.parse(invokeAgentParts5),
|
|
1235
|
+
);
|
|
1236
|
+
}
|
|
1237
|
+
export function invokeAgentParts5FromJSON(
|
|
1238
|
+
jsonString: string,
|
|
1239
|
+
): SafeParseResult<InvokeAgentParts5, SDKValidationError> {
|
|
1240
|
+
return safeParse(
|
|
1241
|
+
jsonString,
|
|
1242
|
+
(x) => InvokeAgentParts5$inboundSchema.parse(JSON.parse(x)),
|
|
1243
|
+
`Failed to parse 'InvokeAgentParts5' from JSON`,
|
|
1244
|
+
);
|
|
1245
|
+
}
|
|
1246
|
+
|
|
1247
|
+
/** @internal */
|
|
1248
|
+
export const InvokeAgentPartsAgentsResponse200Kind$inboundSchema:
|
|
1249
|
+
z.ZodNativeEnum<typeof InvokeAgentPartsAgentsResponse200Kind> = z.nativeEnum(
|
|
1250
|
+
InvokeAgentPartsAgentsResponse200Kind,
|
|
1251
|
+
);
|
|
1252
|
+
/** @internal */
|
|
1253
|
+
export const InvokeAgentPartsAgentsResponse200Kind$outboundSchema:
|
|
1254
|
+
z.ZodNativeEnum<typeof InvokeAgentPartsAgentsResponse200Kind> =
|
|
1255
|
+
InvokeAgentPartsAgentsResponse200Kind$inboundSchema;
|
|
1256
|
+
|
|
1257
|
+
/** @internal */
|
|
1258
|
+
export const InvokeAgentParts4$inboundSchema: z.ZodType<
|
|
1259
|
+
InvokeAgentParts4,
|
|
1260
|
+
z.ZodTypeDef,
|
|
1261
|
+
unknown
|
|
1262
|
+
> = z.object({
|
|
1263
|
+
kind: InvokeAgentPartsAgentsResponse200Kind$inboundSchema,
|
|
1264
|
+
tool_name: z.string(),
|
|
1265
|
+
tool_call_id: z.string(),
|
|
1266
|
+
arguments: z.record(z.any()),
|
|
1267
|
+
metadata: z.record(z.any()).optional(),
|
|
1268
|
+
}).transform((v) => {
|
|
1269
|
+
return remap$(v, {
|
|
1270
|
+
"tool_name": "toolName",
|
|
1271
|
+
"tool_call_id": "toolCallId",
|
|
1272
|
+
});
|
|
1273
|
+
});
|
|
1274
|
+
/** @internal */
|
|
1275
|
+
export type InvokeAgentParts4$Outbound = {
|
|
1276
|
+
kind: string;
|
|
1277
|
+
tool_name: string;
|
|
1278
|
+
tool_call_id: string;
|
|
1279
|
+
arguments: { [k: string]: any };
|
|
1280
|
+
metadata?: { [k: string]: any } | undefined;
|
|
1281
|
+
};
|
|
1282
|
+
|
|
1283
|
+
/** @internal */
|
|
1284
|
+
export const InvokeAgentParts4$outboundSchema: z.ZodType<
|
|
1285
|
+
InvokeAgentParts4$Outbound,
|
|
1286
|
+
z.ZodTypeDef,
|
|
1287
|
+
InvokeAgentParts4
|
|
1288
|
+
> = z.object({
|
|
1289
|
+
kind: InvokeAgentPartsAgentsResponse200Kind$outboundSchema,
|
|
1290
|
+
toolName: z.string(),
|
|
1291
|
+
toolCallId: z.string(),
|
|
1292
|
+
arguments: z.record(z.any()),
|
|
1293
|
+
metadata: z.record(z.any()).optional(),
|
|
1294
|
+
}).transform((v) => {
|
|
1295
|
+
return remap$(v, {
|
|
1296
|
+
toolName: "tool_name",
|
|
1297
|
+
toolCallId: "tool_call_id",
|
|
1298
|
+
});
|
|
1299
|
+
});
|
|
1300
|
+
|
|
1301
|
+
export function invokeAgentParts4ToJSON(
|
|
1302
|
+
invokeAgentParts4: InvokeAgentParts4,
|
|
1303
|
+
): string {
|
|
1304
|
+
return JSON.stringify(
|
|
1305
|
+
InvokeAgentParts4$outboundSchema.parse(invokeAgentParts4),
|
|
1306
|
+
);
|
|
1307
|
+
}
|
|
1308
|
+
export function invokeAgentParts4FromJSON(
|
|
1309
|
+
jsonString: string,
|
|
1310
|
+
): SafeParseResult<InvokeAgentParts4, SDKValidationError> {
|
|
1311
|
+
return safeParse(
|
|
1312
|
+
jsonString,
|
|
1313
|
+
(x) => InvokeAgentParts4$inboundSchema.parse(JSON.parse(x)),
|
|
1314
|
+
`Failed to parse 'InvokeAgentParts4' from JSON`,
|
|
1315
|
+
);
|
|
1316
|
+
}
|
|
1317
|
+
|
|
1318
|
+
/** @internal */
|
|
1319
|
+
export const InvokeAgentPartsAgentsResponseKind$inboundSchema: z.ZodNativeEnum<
|
|
1320
|
+
typeof InvokeAgentPartsAgentsResponseKind
|
|
1321
|
+
> = z.nativeEnum(InvokeAgentPartsAgentsResponseKind);
|
|
1322
|
+
/** @internal */
|
|
1323
|
+
export const InvokeAgentPartsAgentsResponseKind$outboundSchema: z.ZodNativeEnum<
|
|
1324
|
+
typeof InvokeAgentPartsAgentsResponseKind
|
|
1325
|
+
> = InvokeAgentPartsAgentsResponseKind$inboundSchema;
|
|
1326
|
+
|
|
1327
|
+
/** @internal */
|
|
1328
|
+
export const InvokeAgentFileFileInURIFormat$inboundSchema: z.ZodType<
|
|
1329
|
+
InvokeAgentFileFileInURIFormat,
|
|
1330
|
+
z.ZodTypeDef,
|
|
1331
|
+
unknown
|
|
1332
|
+
> = z.object({
|
|
1333
|
+
uri: z.string(),
|
|
1334
|
+
mimeType: z.string().optional(),
|
|
1335
|
+
name: z.string().optional(),
|
|
1336
|
+
});
|
|
1337
|
+
/** @internal */
|
|
1338
|
+
export type InvokeAgentFileFileInURIFormat$Outbound = {
|
|
1339
|
+
uri: string;
|
|
1340
|
+
mimeType?: string | undefined;
|
|
1341
|
+
name?: string | undefined;
|
|
1342
|
+
};
|
|
1343
|
+
|
|
1344
|
+
/** @internal */
|
|
1345
|
+
export const InvokeAgentFileFileInURIFormat$outboundSchema: z.ZodType<
|
|
1346
|
+
InvokeAgentFileFileInURIFormat$Outbound,
|
|
1347
|
+
z.ZodTypeDef,
|
|
1348
|
+
InvokeAgentFileFileInURIFormat
|
|
1349
|
+
> = z.object({
|
|
1350
|
+
uri: z.string(),
|
|
1351
|
+
mimeType: z.string().optional(),
|
|
1352
|
+
name: z.string().optional(),
|
|
1353
|
+
});
|
|
1354
|
+
|
|
1355
|
+
export function invokeAgentFileFileInURIFormatToJSON(
|
|
1356
|
+
invokeAgentFileFileInURIFormat: InvokeAgentFileFileInURIFormat,
|
|
1357
|
+
): string {
|
|
1358
|
+
return JSON.stringify(
|
|
1359
|
+
InvokeAgentFileFileInURIFormat$outboundSchema.parse(
|
|
1360
|
+
invokeAgentFileFileInURIFormat,
|
|
1361
|
+
),
|
|
1362
|
+
);
|
|
1363
|
+
}
|
|
1364
|
+
export function invokeAgentFileFileInURIFormatFromJSON(
|
|
1365
|
+
jsonString: string,
|
|
1366
|
+
): SafeParseResult<InvokeAgentFileFileInURIFormat, SDKValidationError> {
|
|
1367
|
+
return safeParse(
|
|
1368
|
+
jsonString,
|
|
1369
|
+
(x) => InvokeAgentFileFileInURIFormat$inboundSchema.parse(JSON.parse(x)),
|
|
1370
|
+
`Failed to parse 'InvokeAgentFileFileInURIFormat' from JSON`,
|
|
1371
|
+
);
|
|
1372
|
+
}
|
|
1373
|
+
|
|
1374
|
+
/** @internal */
|
|
1375
|
+
export const InvokeAgentFileBinaryFormat$inboundSchema: z.ZodType<
|
|
1376
|
+
InvokeAgentFileBinaryFormat,
|
|
1377
|
+
z.ZodTypeDef,
|
|
1378
|
+
unknown
|
|
1379
|
+
> = z.object({
|
|
1380
|
+
bytes: z.string(),
|
|
1381
|
+
mimeType: z.string().optional(),
|
|
1382
|
+
name: z.string().optional(),
|
|
1383
|
+
});
|
|
1384
|
+
/** @internal */
|
|
1385
|
+
export type InvokeAgentFileBinaryFormat$Outbound = {
|
|
1386
|
+
bytes: string;
|
|
1387
|
+
mimeType?: string | undefined;
|
|
1388
|
+
name?: string | undefined;
|
|
1389
|
+
};
|
|
1390
|
+
|
|
1391
|
+
/** @internal */
|
|
1392
|
+
export const InvokeAgentFileBinaryFormat$outboundSchema: z.ZodType<
|
|
1393
|
+
InvokeAgentFileBinaryFormat$Outbound,
|
|
1394
|
+
z.ZodTypeDef,
|
|
1395
|
+
InvokeAgentFileBinaryFormat
|
|
1396
|
+
> = z.object({
|
|
1397
|
+
bytes: z.string(),
|
|
1398
|
+
mimeType: z.string().optional(),
|
|
1399
|
+
name: z.string().optional(),
|
|
1400
|
+
});
|
|
1401
|
+
|
|
1402
|
+
export function invokeAgentFileBinaryFormatToJSON(
|
|
1403
|
+
invokeAgentFileBinaryFormat: InvokeAgentFileBinaryFormat,
|
|
1404
|
+
): string {
|
|
1405
|
+
return JSON.stringify(
|
|
1406
|
+
InvokeAgentFileBinaryFormat$outboundSchema.parse(
|
|
1407
|
+
invokeAgentFileBinaryFormat,
|
|
1408
|
+
),
|
|
1409
|
+
);
|
|
1410
|
+
}
|
|
1411
|
+
export function invokeAgentFileBinaryFormatFromJSON(
|
|
1412
|
+
jsonString: string,
|
|
1413
|
+
): SafeParseResult<InvokeAgentFileBinaryFormat, SDKValidationError> {
|
|
1414
|
+
return safeParse(
|
|
1415
|
+
jsonString,
|
|
1416
|
+
(x) => InvokeAgentFileBinaryFormat$inboundSchema.parse(JSON.parse(x)),
|
|
1417
|
+
`Failed to parse 'InvokeAgentFileBinaryFormat' from JSON`,
|
|
1418
|
+
);
|
|
1419
|
+
}
|
|
1420
|
+
|
|
1421
|
+
/** @internal */
|
|
1422
|
+
export const InvokeAgentPartsFile$inboundSchema: z.ZodType<
|
|
1423
|
+
InvokeAgentPartsFile,
|
|
1424
|
+
z.ZodTypeDef,
|
|
1425
|
+
unknown
|
|
1426
|
+
> = z.union([
|
|
1427
|
+
z.lazy(() => InvokeAgentFileBinaryFormat$inboundSchema),
|
|
1428
|
+
z.lazy(() => InvokeAgentFileFileInURIFormat$inboundSchema),
|
|
1429
|
+
]);
|
|
1430
|
+
/** @internal */
|
|
1431
|
+
export type InvokeAgentPartsFile$Outbound =
|
|
1432
|
+
| InvokeAgentFileBinaryFormat$Outbound
|
|
1433
|
+
| InvokeAgentFileFileInURIFormat$Outbound;
|
|
1434
|
+
|
|
1435
|
+
/** @internal */
|
|
1436
|
+
export const InvokeAgentPartsFile$outboundSchema: z.ZodType<
|
|
1437
|
+
InvokeAgentPartsFile$Outbound,
|
|
1438
|
+
z.ZodTypeDef,
|
|
1439
|
+
InvokeAgentPartsFile
|
|
1440
|
+
> = z.union([
|
|
1441
|
+
z.lazy(() => InvokeAgentFileBinaryFormat$outboundSchema),
|
|
1442
|
+
z.lazy(() => InvokeAgentFileFileInURIFormat$outboundSchema),
|
|
1443
|
+
]);
|
|
1444
|
+
|
|
1445
|
+
export function invokeAgentPartsFileToJSON(
|
|
1446
|
+
invokeAgentPartsFile: InvokeAgentPartsFile,
|
|
1447
|
+
): string {
|
|
1448
|
+
return JSON.stringify(
|
|
1449
|
+
InvokeAgentPartsFile$outboundSchema.parse(invokeAgentPartsFile),
|
|
1450
|
+
);
|
|
1451
|
+
}
|
|
1452
|
+
export function invokeAgentPartsFileFromJSON(
|
|
1453
|
+
jsonString: string,
|
|
1454
|
+
): SafeParseResult<InvokeAgentPartsFile, SDKValidationError> {
|
|
1455
|
+
return safeParse(
|
|
1456
|
+
jsonString,
|
|
1457
|
+
(x) => InvokeAgentPartsFile$inboundSchema.parse(JSON.parse(x)),
|
|
1458
|
+
`Failed to parse 'InvokeAgentPartsFile' from JSON`,
|
|
1459
|
+
);
|
|
1460
|
+
}
|
|
1461
|
+
|
|
1462
|
+
/** @internal */
|
|
1463
|
+
export const InvokeAgentParts3$inboundSchema: z.ZodType<
|
|
1464
|
+
InvokeAgentParts3,
|
|
1465
|
+
z.ZodTypeDef,
|
|
1466
|
+
unknown
|
|
1467
|
+
> = z.object({
|
|
1468
|
+
kind: InvokeAgentPartsAgentsResponseKind$inboundSchema,
|
|
1469
|
+
file: z.union([
|
|
1470
|
+
z.lazy(() => InvokeAgentFileBinaryFormat$inboundSchema),
|
|
1471
|
+
z.lazy(() => InvokeAgentFileFileInURIFormat$inboundSchema),
|
|
1472
|
+
]),
|
|
1473
|
+
metadata: z.record(z.any()).optional(),
|
|
1474
|
+
});
|
|
1475
|
+
/** @internal */
|
|
1476
|
+
export type InvokeAgentParts3$Outbound = {
|
|
1477
|
+
kind: string;
|
|
1478
|
+
file:
|
|
1479
|
+
| InvokeAgentFileBinaryFormat$Outbound
|
|
1480
|
+
| InvokeAgentFileFileInURIFormat$Outbound;
|
|
1481
|
+
metadata?: { [k: string]: any } | undefined;
|
|
1482
|
+
};
|
|
1483
|
+
|
|
1484
|
+
/** @internal */
|
|
1485
|
+
export const InvokeAgentParts3$outboundSchema: z.ZodType<
|
|
1486
|
+
InvokeAgentParts3$Outbound,
|
|
1487
|
+
z.ZodTypeDef,
|
|
1488
|
+
InvokeAgentParts3
|
|
1489
|
+
> = z.object({
|
|
1490
|
+
kind: InvokeAgentPartsAgentsResponseKind$outboundSchema,
|
|
1491
|
+
file: z.union([
|
|
1492
|
+
z.lazy(() => InvokeAgentFileBinaryFormat$outboundSchema),
|
|
1493
|
+
z.lazy(() => InvokeAgentFileFileInURIFormat$outboundSchema),
|
|
1494
|
+
]),
|
|
1495
|
+
metadata: z.record(z.any()).optional(),
|
|
1496
|
+
});
|
|
1497
|
+
|
|
1498
|
+
export function invokeAgentParts3ToJSON(
|
|
1499
|
+
invokeAgentParts3: InvokeAgentParts3,
|
|
1500
|
+
): string {
|
|
1501
|
+
return JSON.stringify(
|
|
1502
|
+
InvokeAgentParts3$outboundSchema.parse(invokeAgentParts3),
|
|
1503
|
+
);
|
|
1504
|
+
}
|
|
1505
|
+
export function invokeAgentParts3FromJSON(
|
|
1506
|
+
jsonString: string,
|
|
1507
|
+
): SafeParseResult<InvokeAgentParts3, SDKValidationError> {
|
|
1508
|
+
return safeParse(
|
|
1509
|
+
jsonString,
|
|
1510
|
+
(x) => InvokeAgentParts3$inboundSchema.parse(JSON.parse(x)),
|
|
1511
|
+
`Failed to parse 'InvokeAgentParts3' from JSON`,
|
|
1512
|
+
);
|
|
1513
|
+
}
|
|
1514
|
+
|
|
1515
|
+
/** @internal */
|
|
1516
|
+
export const InvokeAgentPartsAgentsKind$inboundSchema: z.ZodNativeEnum<
|
|
1517
|
+
typeof InvokeAgentPartsAgentsKind
|
|
1518
|
+
> = z.nativeEnum(InvokeAgentPartsAgentsKind);
|
|
1519
|
+
/** @internal */
|
|
1520
|
+
export const InvokeAgentPartsAgentsKind$outboundSchema: z.ZodNativeEnum<
|
|
1521
|
+
typeof InvokeAgentPartsAgentsKind
|
|
1522
|
+
> = InvokeAgentPartsAgentsKind$inboundSchema;
|
|
1523
|
+
|
|
1524
|
+
/** @internal */
|
|
1525
|
+
export const InvokeAgentParts2$inboundSchema: z.ZodType<
|
|
1526
|
+
InvokeAgentParts2,
|
|
1527
|
+
z.ZodTypeDef,
|
|
1528
|
+
unknown
|
|
1529
|
+
> = z.object({
|
|
1530
|
+
kind: InvokeAgentPartsAgentsKind$inboundSchema,
|
|
1531
|
+
data: z.record(z.any()),
|
|
1532
|
+
metadata: z.record(z.any()).optional(),
|
|
1533
|
+
});
|
|
1534
|
+
/** @internal */
|
|
1535
|
+
export type InvokeAgentParts2$Outbound = {
|
|
1536
|
+
kind: string;
|
|
1537
|
+
data: { [k: string]: any };
|
|
1538
|
+
metadata?: { [k: string]: any } | undefined;
|
|
1539
|
+
};
|
|
1540
|
+
|
|
1541
|
+
/** @internal */
|
|
1542
|
+
export const InvokeAgentParts2$outboundSchema: z.ZodType<
|
|
1543
|
+
InvokeAgentParts2$Outbound,
|
|
1544
|
+
z.ZodTypeDef,
|
|
1545
|
+
InvokeAgentParts2
|
|
1546
|
+
> = z.object({
|
|
1547
|
+
kind: InvokeAgentPartsAgentsKind$outboundSchema,
|
|
1548
|
+
data: z.record(z.any()),
|
|
1549
|
+
metadata: z.record(z.any()).optional(),
|
|
1550
|
+
});
|
|
1551
|
+
|
|
1552
|
+
export function invokeAgentParts2ToJSON(
|
|
1553
|
+
invokeAgentParts2: InvokeAgentParts2,
|
|
1554
|
+
): string {
|
|
1555
|
+
return JSON.stringify(
|
|
1556
|
+
InvokeAgentParts2$outboundSchema.parse(invokeAgentParts2),
|
|
1557
|
+
);
|
|
1558
|
+
}
|
|
1559
|
+
export function invokeAgentParts2FromJSON(
|
|
1560
|
+
jsonString: string,
|
|
1561
|
+
): SafeParseResult<InvokeAgentParts2, SDKValidationError> {
|
|
1562
|
+
return safeParse(
|
|
1563
|
+
jsonString,
|
|
1564
|
+
(x) => InvokeAgentParts2$inboundSchema.parse(JSON.parse(x)),
|
|
1565
|
+
`Failed to parse 'InvokeAgentParts2' from JSON`,
|
|
1566
|
+
);
|
|
1567
|
+
}
|
|
1568
|
+
|
|
1569
|
+
/** @internal */
|
|
1570
|
+
export const InvokeAgentPartsKind$inboundSchema: z.ZodNativeEnum<
|
|
1571
|
+
typeof InvokeAgentPartsKind
|
|
1572
|
+
> = z.nativeEnum(InvokeAgentPartsKind);
|
|
1573
|
+
/** @internal */
|
|
1574
|
+
export const InvokeAgentPartsKind$outboundSchema: z.ZodNativeEnum<
|
|
1575
|
+
typeof InvokeAgentPartsKind
|
|
1576
|
+
> = InvokeAgentPartsKind$inboundSchema;
|
|
1577
|
+
|
|
1578
|
+
/** @internal */
|
|
1579
|
+
export const InvokeAgentParts1$inboundSchema: z.ZodType<
|
|
1580
|
+
InvokeAgentParts1,
|
|
1581
|
+
z.ZodTypeDef,
|
|
1582
|
+
unknown
|
|
1583
|
+
> = z.object({
|
|
1584
|
+
kind: InvokeAgentPartsKind$inboundSchema,
|
|
1585
|
+
text: z.string(),
|
|
1586
|
+
});
|
|
1587
|
+
/** @internal */
|
|
1588
|
+
export type InvokeAgentParts1$Outbound = {
|
|
1589
|
+
kind: string;
|
|
1590
|
+
text: string;
|
|
1591
|
+
};
|
|
1592
|
+
|
|
1593
|
+
/** @internal */
|
|
1594
|
+
export const InvokeAgentParts1$outboundSchema: z.ZodType<
|
|
1595
|
+
InvokeAgentParts1$Outbound,
|
|
1596
|
+
z.ZodTypeDef,
|
|
1597
|
+
InvokeAgentParts1
|
|
1598
|
+
> = z.object({
|
|
1599
|
+
kind: InvokeAgentPartsKind$outboundSchema,
|
|
1600
|
+
text: z.string(),
|
|
1601
|
+
});
|
|
1602
|
+
|
|
1603
|
+
export function invokeAgentParts1ToJSON(
|
|
1604
|
+
invokeAgentParts1: InvokeAgentParts1,
|
|
1605
|
+
): string {
|
|
1606
|
+
return JSON.stringify(
|
|
1607
|
+
InvokeAgentParts1$outboundSchema.parse(invokeAgentParts1),
|
|
1608
|
+
);
|
|
1609
|
+
}
|
|
1610
|
+
export function invokeAgentParts1FromJSON(
|
|
1611
|
+
jsonString: string,
|
|
1612
|
+
): SafeParseResult<InvokeAgentParts1, SDKValidationError> {
|
|
1613
|
+
return safeParse(
|
|
1614
|
+
jsonString,
|
|
1615
|
+
(x) => InvokeAgentParts1$inboundSchema.parse(JSON.parse(x)),
|
|
1616
|
+
`Failed to parse 'InvokeAgentParts1' from JSON`,
|
|
1617
|
+
);
|
|
1618
|
+
}
|
|
1619
|
+
|
|
1620
|
+
/** @internal */
|
|
1621
|
+
export const InvokeAgentParts$inboundSchema: z.ZodType<
|
|
1622
|
+
InvokeAgentParts,
|
|
1623
|
+
z.ZodTypeDef,
|
|
1624
|
+
unknown
|
|
1625
|
+
> = z.union([
|
|
1626
|
+
z.lazy(() => InvokeAgentParts4$inboundSchema),
|
|
1627
|
+
z.lazy(() => InvokeAgentParts1$inboundSchema),
|
|
1628
|
+
z.lazy(() => InvokeAgentParts2$inboundSchema),
|
|
1629
|
+
z.lazy(() => InvokeAgentParts3$inboundSchema),
|
|
1630
|
+
z.lazy(() => InvokeAgentParts5$inboundSchema),
|
|
1631
|
+
]);
|
|
1632
|
+
/** @internal */
|
|
1633
|
+
export type InvokeAgentParts$Outbound =
|
|
1634
|
+
| InvokeAgentParts4$Outbound
|
|
1635
|
+
| InvokeAgentParts1$Outbound
|
|
1636
|
+
| InvokeAgentParts2$Outbound
|
|
1637
|
+
| InvokeAgentParts3$Outbound
|
|
1638
|
+
| InvokeAgentParts5$Outbound;
|
|
1639
|
+
|
|
1640
|
+
/** @internal */
|
|
1641
|
+
export const InvokeAgentParts$outboundSchema: z.ZodType<
|
|
1642
|
+
InvokeAgentParts$Outbound,
|
|
1643
|
+
z.ZodTypeDef,
|
|
1644
|
+
InvokeAgentParts
|
|
1645
|
+
> = z.union([
|
|
1646
|
+
z.lazy(() => InvokeAgentParts4$outboundSchema),
|
|
1647
|
+
z.lazy(() => InvokeAgentParts1$outboundSchema),
|
|
1648
|
+
z.lazy(() => InvokeAgentParts2$outboundSchema),
|
|
1649
|
+
z.lazy(() => InvokeAgentParts3$outboundSchema),
|
|
1650
|
+
z.lazy(() => InvokeAgentParts5$outboundSchema),
|
|
1651
|
+
]);
|
|
1652
|
+
|
|
1653
|
+
export function invokeAgentPartsToJSON(
|
|
1654
|
+
invokeAgentParts: InvokeAgentParts,
|
|
1655
|
+
): string {
|
|
1656
|
+
return JSON.stringify(
|
|
1657
|
+
InvokeAgentParts$outboundSchema.parse(invokeAgentParts),
|
|
1658
|
+
);
|
|
1659
|
+
}
|
|
1660
|
+
export function invokeAgentPartsFromJSON(
|
|
1661
|
+
jsonString: string,
|
|
1662
|
+
): SafeParseResult<InvokeAgentParts, SDKValidationError> {
|
|
1663
|
+
return safeParse(
|
|
1664
|
+
jsonString,
|
|
1665
|
+
(x) => InvokeAgentParts$inboundSchema.parse(JSON.parse(x)),
|
|
1666
|
+
`Failed to parse 'InvokeAgentParts' from JSON`,
|
|
1667
|
+
);
|
|
1668
|
+
}
|
|
1669
|
+
|
|
1064
1670
|
/** @internal */
|
|
1065
1671
|
export const InvokeAgentMessage$inboundSchema: z.ZodType<
|
|
1066
1672
|
InvokeAgentMessage,
|
|
@@ -1070,14 +1676,28 @@ export const InvokeAgentMessage$inboundSchema: z.ZodType<
|
|
|
1070
1676
|
kind: InvokeAgentAgentsKind$inboundSchema,
|
|
1071
1677
|
messageId: z.string(),
|
|
1072
1678
|
role: InvokeAgentAgentsRole$inboundSchema,
|
|
1073
|
-
parts: z.array(
|
|
1679
|
+
parts: z.array(
|
|
1680
|
+
z.union([
|
|
1681
|
+
z.lazy(() => InvokeAgentParts4$inboundSchema),
|
|
1682
|
+
z.lazy(() => InvokeAgentParts1$inboundSchema),
|
|
1683
|
+
z.lazy(() => InvokeAgentParts2$inboundSchema),
|
|
1684
|
+
z.lazy(() => InvokeAgentParts3$inboundSchema),
|
|
1685
|
+
z.lazy(() => InvokeAgentParts5$inboundSchema),
|
|
1686
|
+
]),
|
|
1687
|
+
),
|
|
1074
1688
|
});
|
|
1075
1689
|
/** @internal */
|
|
1076
1690
|
export type InvokeAgentMessage$Outbound = {
|
|
1077
1691
|
kind: string;
|
|
1078
1692
|
messageId: string;
|
|
1079
1693
|
role: string;
|
|
1080
|
-
parts: Array<
|
|
1694
|
+
parts: Array<
|
|
1695
|
+
| InvokeAgentParts4$Outbound
|
|
1696
|
+
| InvokeAgentParts1$Outbound
|
|
1697
|
+
| InvokeAgentParts2$Outbound
|
|
1698
|
+
| InvokeAgentParts3$Outbound
|
|
1699
|
+
| InvokeAgentParts5$Outbound
|
|
1700
|
+
>;
|
|
1081
1701
|
};
|
|
1082
1702
|
|
|
1083
1703
|
/** @internal */
|
|
@@ -1089,7 +1709,15 @@ export const InvokeAgentMessage$outboundSchema: z.ZodType<
|
|
|
1089
1709
|
kind: InvokeAgentAgentsKind$outboundSchema,
|
|
1090
1710
|
messageId: z.string(),
|
|
1091
1711
|
role: InvokeAgentAgentsRole$outboundSchema,
|
|
1092
|
-
parts: z.array(
|
|
1712
|
+
parts: z.array(
|
|
1713
|
+
z.union([
|
|
1714
|
+
z.lazy(() => InvokeAgentParts4$outboundSchema),
|
|
1715
|
+
z.lazy(() => InvokeAgentParts1$outboundSchema),
|
|
1716
|
+
z.lazy(() => InvokeAgentParts2$outboundSchema),
|
|
1717
|
+
z.lazy(() => InvokeAgentParts3$outboundSchema),
|
|
1718
|
+
z.lazy(() => InvokeAgentParts5$outboundSchema),
|
|
1719
|
+
]),
|
|
1720
|
+
),
|
|
1093
1721
|
});
|
|
1094
1722
|
|
|
1095
1723
|
export function invokeAgentMessageToJSON(
|