@orq-ai/node 4.0.4 → 4.0.5
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 +213 -213
- package/bin/mcp-server.js.map +36 -36
- package/examples/package-lock.json +1 -1
- package/jsr.json +1 -1
- package/lib/config.d.ts +2 -2
- package/lib/config.js +2 -2
- package/mcp-server/mcp-server.js +1 -1
- package/mcp-server/server.js +1 -1
- package/models/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 +12 -12
- package/models/operations/fileget.js +2 -2
- package/models/operations/filelist.js +2 -2
- package/models/operations/fileupload.js +2 -2
- package/models/operations/getalltools.js +12 -12
- package/models/operations/getbudget.js +2 -2
- package/models/operations/getevals.js +28 -28
- 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 +12 -12
- package/models/operations/runagent.js +2 -2
- package/models/operations/streamrunagent.js +2 -2
- 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 +14 -14
- package/package.json +1 -1
- package/packages/orq-rc/README.md +38 -47
- package/packages/orq-rc/docs/sdks/agents/README.md +230 -529
- package/packages/orq-rc/docs/sdks/responses/README.md +60 -65
- package/packages/orq-rc/examples/package-lock.json +1 -1
- package/packages/orq-rc/jsr.json +1 -1
- package/packages/orq-rc/package-lock.json +2 -2
- package/packages/orq-rc/package.json +1 -1
- package/packages/orq-rc/src/funcs/agentsCreate.ts +16 -14
- package/packages/orq-rc/src/funcs/agentsDelete.ts +10 -6
- package/packages/orq-rc/src/funcs/agentsInvoke.ts +16 -6
- package/packages/orq-rc/src/funcs/agentsList.ts +18 -6
- package/packages/orq-rc/src/funcs/agentsResponsesCreate.ts +23 -12
- package/packages/orq-rc/src/funcs/agentsRetrieve.ts +21 -16
- package/packages/orq-rc/src/funcs/agentsRun.ts +4 -2
- package/packages/orq-rc/src/funcs/agentsStream.ts +16 -6
- package/packages/orq-rc/src/funcs/agentsStreamRun.ts +4 -2
- package/packages/orq-rc/src/funcs/agentsUpdate.ts +14 -6
- package/packages/orq-rc/src/lib/config.ts +2 -2
- package/packages/orq-rc/src/mcp-server/mcp-server.ts +1 -1
- package/packages/orq-rc/src/mcp-server/server.ts +1 -9
- package/packages/orq-rc/src/mcp-server/tools/agentsCreate.ts +3 -3
- package/packages/orq-rc/src/mcp-server/tools/agentsDelete.ts +5 -5
- package/packages/orq-rc/src/mcp-server/tools/agentsInvoke.ts +7 -4
- package/packages/orq-rc/src/mcp-server/tools/agentsList.ts +9 -5
- package/packages/orq-rc/src/mcp-server/tools/agentsResponsesCreate.ts +8 -4
- package/packages/orq-rc/src/mcp-server/tools/agentsRetrieve.ts +5 -5
- package/packages/orq-rc/src/mcp-server/tools/agentsRun.ts +2 -2
- package/packages/orq-rc/src/mcp-server/tools/agentsStream.ts +7 -4
- package/packages/orq-rc/src/mcp-server/tools/agentsStreamRun.ts +2 -2
- package/packages/orq-rc/src/mcp-server/tools/agentsUpdate.ts +8 -4
- package/packages/orq-rc/src/models/errors/createagentrequest.ts +67 -0
- package/packages/orq-rc/src/models/errors/deleteagent.ts +2 -2
- package/packages/orq-rc/src/models/errors/index.ts +2 -3
- package/packages/orq-rc/src/models/errors/{listagenttasks.ts → retrieveagentrequest.ts} +15 -15
- package/packages/orq-rc/src/models/errors/updateagent.ts +2 -2
- package/packages/orq-rc/src/models/operations/{createagent.ts → createagentrequest.ts} +1643 -1485
- package/packages/orq-rc/src/models/operations/{createagentresponse.ts → createagentresponserequest.ts} +141 -127
- package/packages/orq-rc/src/models/operations/createbudget.ts +2 -2
- package/packages/orq-rc/src/models/operations/createcontact.ts +2 -2
- package/packages/orq-rc/src/models/operations/createdataset.ts +2 -2
- package/packages/orq-rc/src/models/operations/createdatasetitem.ts +8 -8
- package/packages/orq-rc/src/models/operations/createdatasource.ts +2 -2
- package/packages/orq-rc/src/models/operations/createeval.ts +28 -28
- package/packages/orq-rc/src/models/operations/createprompt.ts +4 -4
- package/packages/orq-rc/src/models/operations/createtool.ts +12 -12
- package/packages/orq-rc/src/models/operations/fileget.ts +2 -2
- package/packages/orq-rc/src/models/operations/filelist.ts +2 -2
- package/packages/orq-rc/src/models/operations/fileupload.ts +2 -2
- package/packages/orq-rc/src/models/operations/getalltools.ts +12 -12
- package/packages/orq-rc/src/models/operations/getbudget.ts +2 -2
- package/packages/orq-rc/src/models/operations/getevals.ts +28 -28
- package/packages/orq-rc/src/models/operations/index.ts +3 -7
- package/packages/orq-rc/src/models/operations/invokeagent.ts +153 -190
- package/packages/orq-rc/src/models/operations/listagents.ts +9 -21
- package/packages/orq-rc/src/models/operations/listbudgets.ts +2 -2
- package/packages/orq-rc/src/models/operations/listcontacts.ts +2 -2
- package/packages/orq-rc/src/models/operations/listdatasetdatapoints.ts +8 -8
- package/packages/orq-rc/src/models/operations/listdatasets.ts +2 -2
- package/packages/orq-rc/src/models/operations/listdatasources.ts +2 -2
- package/packages/orq-rc/src/models/operations/retrieveagentrequest.ts +3741 -0
- package/packages/orq-rc/src/models/operations/retrievecontact.ts +2 -2
- package/packages/orq-rc/src/models/operations/retrievedatapoint.ts +8 -8
- package/packages/orq-rc/src/models/operations/retrievedataset.ts +2 -2
- package/packages/orq-rc/src/models/operations/retrievedatasource.ts +2 -2
- package/packages/orq-rc/src/models/operations/retrievetool.ts +12 -12
- package/packages/orq-rc/src/models/operations/runagent.ts +53 -57
- package/packages/orq-rc/src/models/operations/streamagent.ts +1 -1
- package/packages/orq-rc/src/models/operations/streamrunagent.ts +68 -82
- package/packages/orq-rc/src/models/operations/updateagent.ts +17 -17
- package/packages/orq-rc/src/models/operations/updatebudget.ts +2 -2
- package/packages/orq-rc/src/models/operations/updatecontact.ts +2 -2
- package/packages/orq-rc/src/models/operations/updatedatapoint.ts +8 -8
- package/packages/orq-rc/src/models/operations/updatedataset.ts +2 -2
- package/packages/orq-rc/src/models/operations/updatedatasource.ts +2 -2
- package/packages/orq-rc/src/models/operations/updateeval.ts +28 -28
- package/packages/orq-rc/src/models/operations/updateprompt.ts +4 -4
- package/packages/orq-rc/src/models/operations/updatetool.ts +14 -14
- package/packages/orq-rc/src/sdk/agents.ts +51 -99
- package/packages/orq-rc/src/sdk/responses.ts +7 -5
- package/src/lib/config.ts +2 -2
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +1 -1
- package/src/models/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 +12 -12
- 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/getalltools.ts +12 -12
- package/src/models/operations/getbudget.ts +2 -2
- package/src/models/operations/getevals.ts +28 -28
- 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 +12 -12
- package/src/models/operations/runagent.ts +2 -2
- package/src/models/operations/streamrunagent.ts +2 -2
- 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 +14 -14
- package/packages/orq-rc/src/funcs/agentsListActions.ts +0 -169
- package/packages/orq-rc/src/funcs/agentsListTasks.ts +0 -183
- package/packages/orq-rc/src/funcs/agentsRetrieveAction.ts +0 -173
- package/packages/orq-rc/src/funcs/agentsRetrieveTask.ts +0 -179
- package/packages/orq-rc/src/mcp-server/tools/agentsListActions.ts +0 -35
- package/packages/orq-rc/src/mcp-server/tools/agentsListTasks.ts +0 -37
- package/packages/orq-rc/src/mcp-server/tools/agentsRetrieveAction.ts +0 -35
- package/packages/orq-rc/src/mcp-server/tools/agentsRetrieveTask.ts +0 -37
- package/packages/orq-rc/src/models/errors/createagent.ts +0 -67
- package/packages/orq-rc/src/models/errors/getagent.ts +0 -67
- package/packages/orq-rc/src/models/operations/getagent.ts +0 -3480
- package/packages/orq-rc/src/models/operations/getagenttask.ts +0 -2389
- package/packages/orq-rc/src/models/operations/listactions.ts +0 -427
- package/packages/orq-rc/src/models/operations/listagenttasks.ts +0 -2614
- package/packages/orq-rc/src/models/operations/retrieveaction.ts +0 -354
|
@@ -290,7 +290,7 @@ export type InvokeAgentAgentsKind = ClosedEnum<typeof InvokeAgentAgentsKind>;
|
|
|
290
290
|
/**
|
|
291
291
|
* Role of the message sender in the A2A protocol. Values: user (end user), agent (AI agent), tool (tool execution result), system (system instructions/prompts).
|
|
292
292
|
*/
|
|
293
|
-
export const
|
|
293
|
+
export const ExtendedMessageRole = {
|
|
294
294
|
User: "user",
|
|
295
295
|
Agent: "agent",
|
|
296
296
|
Tool: "tool",
|
|
@@ -299,9 +299,7 @@ export const InvokeAgentExtendedMessageRole = {
|
|
|
299
299
|
/**
|
|
300
300
|
* Role of the message sender in the A2A protocol. Values: user (end user), agent (AI agent), tool (tool execution result), system (system instructions/prompts).
|
|
301
301
|
*/
|
|
302
|
-
export type
|
|
303
|
-
typeof InvokeAgentExtendedMessageRole
|
|
304
|
-
>;
|
|
302
|
+
export type ExtendedMessageRole = ClosedEnum<typeof ExtendedMessageRole>;
|
|
305
303
|
|
|
306
304
|
export const InvokeAgentPartsAgentsResponse200Kind = {
|
|
307
305
|
ToolResult: "tool_result",
|
|
@@ -313,7 +311,7 @@ export type InvokeAgentPartsAgentsResponse200Kind = ClosedEnum<
|
|
|
313
311
|
/**
|
|
314
312
|
* The result of a tool execution. Contains the tool call ID for correlation and the result data from the tool invocation.
|
|
315
313
|
*/
|
|
316
|
-
export type
|
|
314
|
+
export type PartsToolResultPart = {
|
|
317
315
|
kind: InvokeAgentPartsAgentsResponse200Kind;
|
|
318
316
|
toolCallId: string;
|
|
319
317
|
result?: any | undefined;
|
|
@@ -330,7 +328,7 @@ export type InvokeAgentPartsAgentsResponseKind = ClosedEnum<
|
|
|
330
328
|
/**
|
|
331
329
|
* A tool invocation request from an agent. Contains the tool name, unique call ID, and arguments for the tool execution.
|
|
332
330
|
*/
|
|
333
|
-
export type
|
|
331
|
+
export type ToolCallPart = {
|
|
334
332
|
kind: InvokeAgentPartsAgentsResponseKind;
|
|
335
333
|
toolName: string;
|
|
336
334
|
toolCallId: string;
|
|
@@ -381,14 +379,14 @@ export type InvokeAgentFileBinaryFormat = {
|
|
|
381
379
|
name?: string | undefined;
|
|
382
380
|
};
|
|
383
381
|
|
|
384
|
-
export type
|
|
382
|
+
export type PartsFile =
|
|
385
383
|
| InvokeAgentFileBinaryFormat
|
|
386
384
|
| InvokeAgentFileFileInURIFormat;
|
|
387
385
|
|
|
388
386
|
/**
|
|
389
387
|
* 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.
|
|
390
388
|
*/
|
|
391
|
-
export type
|
|
389
|
+
export type PartsFilePart = {
|
|
392
390
|
kind: InvokeAgentPartsAgentsKind;
|
|
393
391
|
file: InvokeAgentFileBinaryFormat | InvokeAgentFileFileInURIFormat;
|
|
394
392
|
metadata?: { [k: string]: any } | undefined;
|
|
@@ -402,33 +400,31 @@ export type InvokeAgentPartsKind = ClosedEnum<typeof InvokeAgentPartsKind>;
|
|
|
402
400
|
/**
|
|
403
401
|
* A structured data part containing JSON-serializable key-value pairs. Used for passing structured information between agents and tools.
|
|
404
402
|
*/
|
|
405
|
-
export type
|
|
403
|
+
export type DataPart = {
|
|
406
404
|
kind: InvokeAgentPartsKind;
|
|
407
405
|
data: { [k: string]: any };
|
|
408
406
|
metadata?: { [k: string]: any } | undefined;
|
|
409
407
|
};
|
|
410
408
|
|
|
411
|
-
export const
|
|
409
|
+
export const PartsKind = {
|
|
412
410
|
Text: "text",
|
|
413
411
|
} as const;
|
|
414
|
-
export type
|
|
415
|
-
typeof InvokeAgentPartsAgentsResponse200ApplicationJSONKind
|
|
416
|
-
>;
|
|
412
|
+
export type PartsKind = ClosedEnum<typeof PartsKind>;
|
|
417
413
|
|
|
418
414
|
/**
|
|
419
415
|
* A text content part containing plain text or markdown. Used for agent messages, user input, and text-based responses.
|
|
420
416
|
*/
|
|
421
|
-
export type
|
|
422
|
-
kind:
|
|
417
|
+
export type PartsTextPart = {
|
|
418
|
+
kind: PartsKind;
|
|
423
419
|
text: string;
|
|
424
420
|
};
|
|
425
421
|
|
|
426
|
-
export type
|
|
427
|
-
|
|
|
428
|
-
|
|
|
429
|
-
|
|
|
430
|
-
|
|
|
431
|
-
|
|
|
422
|
+
export type Parts =
|
|
423
|
+
| ToolCallPart
|
|
424
|
+
| PartsTextPart
|
|
425
|
+
| DataPart
|
|
426
|
+
| PartsFilePart
|
|
427
|
+
| PartsToolResultPart;
|
|
432
428
|
|
|
433
429
|
/**
|
|
434
430
|
* Optional A2A message providing additional context about the current status
|
|
@@ -439,13 +435,13 @@ export type TaskStatusMessage = {
|
|
|
439
435
|
/**
|
|
440
436
|
* Role of the message sender in the A2A protocol. Values: user (end user), agent (AI agent), tool (tool execution result), system (system instructions/prompts).
|
|
441
437
|
*/
|
|
442
|
-
role:
|
|
438
|
+
role: ExtendedMessageRole;
|
|
443
439
|
parts: Array<
|
|
444
|
-
|
|
|
445
|
-
|
|
|
446
|
-
|
|
|
447
|
-
|
|
|
448
|
-
|
|
|
440
|
+
| ToolCallPart
|
|
441
|
+
| PartsTextPart
|
|
442
|
+
| DataPart
|
|
443
|
+
| PartsFilePart
|
|
444
|
+
| PartsToolResultPart
|
|
449
445
|
>;
|
|
450
446
|
};
|
|
451
447
|
|
|
@@ -1267,13 +1263,13 @@ export const InvokeAgentAgentsKind$outboundSchema: z.ZodNativeEnum<
|
|
|
1267
1263
|
> = InvokeAgentAgentsKind$inboundSchema;
|
|
1268
1264
|
|
|
1269
1265
|
/** @internal */
|
|
1270
|
-
export const
|
|
1271
|
-
typeof
|
|
1272
|
-
> = z.nativeEnum(
|
|
1266
|
+
export const ExtendedMessageRole$inboundSchema: z.ZodNativeEnum<
|
|
1267
|
+
typeof ExtendedMessageRole
|
|
1268
|
+
> = z.nativeEnum(ExtendedMessageRole);
|
|
1273
1269
|
/** @internal */
|
|
1274
|
-
export const
|
|
1275
|
-
typeof
|
|
1276
|
-
> =
|
|
1270
|
+
export const ExtendedMessageRole$outboundSchema: z.ZodNativeEnum<
|
|
1271
|
+
typeof ExtendedMessageRole
|
|
1272
|
+
> = ExtendedMessageRole$inboundSchema;
|
|
1277
1273
|
|
|
1278
1274
|
/** @internal */
|
|
1279
1275
|
export const InvokeAgentPartsAgentsResponse200Kind$inboundSchema:
|
|
@@ -1286,8 +1282,8 @@ export const InvokeAgentPartsAgentsResponse200Kind$outboundSchema:
|
|
|
1286
1282
|
InvokeAgentPartsAgentsResponse200Kind$inboundSchema;
|
|
1287
1283
|
|
|
1288
1284
|
/** @internal */
|
|
1289
|
-
export const
|
|
1290
|
-
|
|
1285
|
+
export const PartsToolResultPart$inboundSchema: z.ZodType<
|
|
1286
|
+
PartsToolResultPart,
|
|
1291
1287
|
z.ZodTypeDef,
|
|
1292
1288
|
unknown
|
|
1293
1289
|
> = z.object({
|
|
@@ -1301,7 +1297,7 @@ export const InvokeAgentPartsToolResultPart$inboundSchema: z.ZodType<
|
|
|
1301
1297
|
});
|
|
1302
1298
|
});
|
|
1303
1299
|
/** @internal */
|
|
1304
|
-
export type
|
|
1300
|
+
export type PartsToolResultPart$Outbound = {
|
|
1305
1301
|
kind: string;
|
|
1306
1302
|
tool_call_id: string;
|
|
1307
1303
|
result?: any | undefined;
|
|
@@ -1309,10 +1305,10 @@ export type InvokeAgentPartsToolResultPart$Outbound = {
|
|
|
1309
1305
|
};
|
|
1310
1306
|
|
|
1311
1307
|
/** @internal */
|
|
1312
|
-
export const
|
|
1313
|
-
|
|
1308
|
+
export const PartsToolResultPart$outboundSchema: z.ZodType<
|
|
1309
|
+
PartsToolResultPart$Outbound,
|
|
1314
1310
|
z.ZodTypeDef,
|
|
1315
|
-
|
|
1311
|
+
PartsToolResultPart
|
|
1316
1312
|
> = z.object({
|
|
1317
1313
|
kind: InvokeAgentPartsAgentsResponse200Kind$outboundSchema,
|
|
1318
1314
|
toolCallId: z.string(),
|
|
@@ -1324,22 +1320,20 @@ export const InvokeAgentPartsToolResultPart$outboundSchema: z.ZodType<
|
|
|
1324
1320
|
});
|
|
1325
1321
|
});
|
|
1326
1322
|
|
|
1327
|
-
export function
|
|
1328
|
-
|
|
1323
|
+
export function partsToolResultPartToJSON(
|
|
1324
|
+
partsToolResultPart: PartsToolResultPart,
|
|
1329
1325
|
): string {
|
|
1330
1326
|
return JSON.stringify(
|
|
1331
|
-
|
|
1332
|
-
invokeAgentPartsToolResultPart,
|
|
1333
|
-
),
|
|
1327
|
+
PartsToolResultPart$outboundSchema.parse(partsToolResultPart),
|
|
1334
1328
|
);
|
|
1335
1329
|
}
|
|
1336
|
-
export function
|
|
1330
|
+
export function partsToolResultPartFromJSON(
|
|
1337
1331
|
jsonString: string,
|
|
1338
|
-
): SafeParseResult<
|
|
1332
|
+
): SafeParseResult<PartsToolResultPart, SDKValidationError> {
|
|
1339
1333
|
return safeParse(
|
|
1340
1334
|
jsonString,
|
|
1341
|
-
(x) =>
|
|
1342
|
-
`Failed to parse '
|
|
1335
|
+
(x) => PartsToolResultPart$inboundSchema.parse(JSON.parse(x)),
|
|
1336
|
+
`Failed to parse 'PartsToolResultPart' from JSON`,
|
|
1343
1337
|
);
|
|
1344
1338
|
}
|
|
1345
1339
|
|
|
@@ -1353,8 +1347,8 @@ export const InvokeAgentPartsAgentsResponseKind$outboundSchema: z.ZodNativeEnum<
|
|
|
1353
1347
|
> = InvokeAgentPartsAgentsResponseKind$inboundSchema;
|
|
1354
1348
|
|
|
1355
1349
|
/** @internal */
|
|
1356
|
-
export const
|
|
1357
|
-
|
|
1350
|
+
export const ToolCallPart$inboundSchema: z.ZodType<
|
|
1351
|
+
ToolCallPart,
|
|
1358
1352
|
z.ZodTypeDef,
|
|
1359
1353
|
unknown
|
|
1360
1354
|
> = z.object({
|
|
@@ -1370,7 +1364,7 @@ export const InvokeAgentPartsToolCallPart$inboundSchema: z.ZodType<
|
|
|
1370
1364
|
});
|
|
1371
1365
|
});
|
|
1372
1366
|
/** @internal */
|
|
1373
|
-
export type
|
|
1367
|
+
export type ToolCallPart$Outbound = {
|
|
1374
1368
|
kind: string;
|
|
1375
1369
|
tool_name: string;
|
|
1376
1370
|
tool_call_id: string;
|
|
@@ -1379,10 +1373,10 @@ export type InvokeAgentPartsToolCallPart$Outbound = {
|
|
|
1379
1373
|
};
|
|
1380
1374
|
|
|
1381
1375
|
/** @internal */
|
|
1382
|
-
export const
|
|
1383
|
-
|
|
1376
|
+
export const ToolCallPart$outboundSchema: z.ZodType<
|
|
1377
|
+
ToolCallPart$Outbound,
|
|
1384
1378
|
z.ZodTypeDef,
|
|
1385
|
-
|
|
1379
|
+
ToolCallPart
|
|
1386
1380
|
> = z.object({
|
|
1387
1381
|
kind: InvokeAgentPartsAgentsResponseKind$outboundSchema,
|
|
1388
1382
|
toolName: z.string(),
|
|
@@ -1396,22 +1390,16 @@ export const InvokeAgentPartsToolCallPart$outboundSchema: z.ZodType<
|
|
|
1396
1390
|
});
|
|
1397
1391
|
});
|
|
1398
1392
|
|
|
1399
|
-
export function
|
|
1400
|
-
|
|
1401
|
-
): string {
|
|
1402
|
-
return JSON.stringify(
|
|
1403
|
-
InvokeAgentPartsToolCallPart$outboundSchema.parse(
|
|
1404
|
-
invokeAgentPartsToolCallPart,
|
|
1405
|
-
),
|
|
1406
|
-
);
|
|
1393
|
+
export function toolCallPartToJSON(toolCallPart: ToolCallPart): string {
|
|
1394
|
+
return JSON.stringify(ToolCallPart$outboundSchema.parse(toolCallPart));
|
|
1407
1395
|
}
|
|
1408
|
-
export function
|
|
1396
|
+
export function toolCallPartFromJSON(
|
|
1409
1397
|
jsonString: string,
|
|
1410
|
-
): SafeParseResult<
|
|
1398
|
+
): SafeParseResult<ToolCallPart, SDKValidationError> {
|
|
1411
1399
|
return safeParse(
|
|
1412
1400
|
jsonString,
|
|
1413
|
-
(x) =>
|
|
1414
|
-
`Failed to parse '
|
|
1401
|
+
(x) => ToolCallPart$inboundSchema.parse(JSON.parse(x)),
|
|
1402
|
+
`Failed to parse 'ToolCallPart' from JSON`,
|
|
1415
1403
|
);
|
|
1416
1404
|
}
|
|
1417
1405
|
|
|
@@ -1519,8 +1507,8 @@ export function invokeAgentFileBinaryFormatFromJSON(
|
|
|
1519
1507
|
}
|
|
1520
1508
|
|
|
1521
1509
|
/** @internal */
|
|
1522
|
-
export const
|
|
1523
|
-
|
|
1510
|
+
export const PartsFile$inboundSchema: z.ZodType<
|
|
1511
|
+
PartsFile,
|
|
1524
1512
|
z.ZodTypeDef,
|
|
1525
1513
|
unknown
|
|
1526
1514
|
> = z.union([
|
|
@@ -1528,40 +1516,36 @@ export const InvokeAgentPartsFile$inboundSchema: z.ZodType<
|
|
|
1528
1516
|
z.lazy(() => InvokeAgentFileFileInURIFormat$inboundSchema),
|
|
1529
1517
|
]);
|
|
1530
1518
|
/** @internal */
|
|
1531
|
-
export type
|
|
1519
|
+
export type PartsFile$Outbound =
|
|
1532
1520
|
| InvokeAgentFileBinaryFormat$Outbound
|
|
1533
1521
|
| InvokeAgentFileFileInURIFormat$Outbound;
|
|
1534
1522
|
|
|
1535
1523
|
/** @internal */
|
|
1536
|
-
export const
|
|
1537
|
-
|
|
1524
|
+
export const PartsFile$outboundSchema: z.ZodType<
|
|
1525
|
+
PartsFile$Outbound,
|
|
1538
1526
|
z.ZodTypeDef,
|
|
1539
|
-
|
|
1527
|
+
PartsFile
|
|
1540
1528
|
> = z.union([
|
|
1541
1529
|
z.lazy(() => InvokeAgentFileBinaryFormat$outboundSchema),
|
|
1542
1530
|
z.lazy(() => InvokeAgentFileFileInURIFormat$outboundSchema),
|
|
1543
1531
|
]);
|
|
1544
1532
|
|
|
1545
|
-
export function
|
|
1546
|
-
|
|
1547
|
-
): string {
|
|
1548
|
-
return JSON.stringify(
|
|
1549
|
-
InvokeAgentPartsFile$outboundSchema.parse(invokeAgentPartsFile),
|
|
1550
|
-
);
|
|
1533
|
+
export function partsFileToJSON(partsFile: PartsFile): string {
|
|
1534
|
+
return JSON.stringify(PartsFile$outboundSchema.parse(partsFile));
|
|
1551
1535
|
}
|
|
1552
|
-
export function
|
|
1536
|
+
export function partsFileFromJSON(
|
|
1553
1537
|
jsonString: string,
|
|
1554
|
-
): SafeParseResult<
|
|
1538
|
+
): SafeParseResult<PartsFile, SDKValidationError> {
|
|
1555
1539
|
return safeParse(
|
|
1556
1540
|
jsonString,
|
|
1557
|
-
(x) =>
|
|
1558
|
-
`Failed to parse '
|
|
1541
|
+
(x) => PartsFile$inboundSchema.parse(JSON.parse(x)),
|
|
1542
|
+
`Failed to parse 'PartsFile' from JSON`,
|
|
1559
1543
|
);
|
|
1560
1544
|
}
|
|
1561
1545
|
|
|
1562
1546
|
/** @internal */
|
|
1563
|
-
export const
|
|
1564
|
-
|
|
1547
|
+
export const PartsFilePart$inboundSchema: z.ZodType<
|
|
1548
|
+
PartsFilePart,
|
|
1565
1549
|
z.ZodTypeDef,
|
|
1566
1550
|
unknown
|
|
1567
1551
|
> = z.object({
|
|
@@ -1573,7 +1557,7 @@ export const InvokeAgentPartsFilePart$inboundSchema: z.ZodType<
|
|
|
1573
1557
|
metadata: z.record(z.any()).optional(),
|
|
1574
1558
|
});
|
|
1575
1559
|
/** @internal */
|
|
1576
|
-
export type
|
|
1560
|
+
export type PartsFilePart$Outbound = {
|
|
1577
1561
|
kind: string;
|
|
1578
1562
|
file:
|
|
1579
1563
|
| InvokeAgentFileBinaryFormat$Outbound
|
|
@@ -1582,10 +1566,10 @@ export type InvokeAgentPartsFilePart$Outbound = {
|
|
|
1582
1566
|
};
|
|
1583
1567
|
|
|
1584
1568
|
/** @internal */
|
|
1585
|
-
export const
|
|
1586
|
-
|
|
1569
|
+
export const PartsFilePart$outboundSchema: z.ZodType<
|
|
1570
|
+
PartsFilePart$Outbound,
|
|
1587
1571
|
z.ZodTypeDef,
|
|
1588
|
-
|
|
1572
|
+
PartsFilePart
|
|
1589
1573
|
> = z.object({
|
|
1590
1574
|
kind: InvokeAgentPartsAgentsKind$outboundSchema,
|
|
1591
1575
|
file: z.union([
|
|
@@ -1595,20 +1579,16 @@ export const InvokeAgentPartsFilePart$outboundSchema: z.ZodType<
|
|
|
1595
1579
|
metadata: z.record(z.any()).optional(),
|
|
1596
1580
|
});
|
|
1597
1581
|
|
|
1598
|
-
export function
|
|
1599
|
-
|
|
1600
|
-
): string {
|
|
1601
|
-
return JSON.stringify(
|
|
1602
|
-
InvokeAgentPartsFilePart$outboundSchema.parse(invokeAgentPartsFilePart),
|
|
1603
|
-
);
|
|
1582
|
+
export function partsFilePartToJSON(partsFilePart: PartsFilePart): string {
|
|
1583
|
+
return JSON.stringify(PartsFilePart$outboundSchema.parse(partsFilePart));
|
|
1604
1584
|
}
|
|
1605
|
-
export function
|
|
1585
|
+
export function partsFilePartFromJSON(
|
|
1606
1586
|
jsonString: string,
|
|
1607
|
-
): SafeParseResult<
|
|
1587
|
+
): SafeParseResult<PartsFilePart, SDKValidationError> {
|
|
1608
1588
|
return safeParse(
|
|
1609
1589
|
jsonString,
|
|
1610
|
-
(x) =>
|
|
1611
|
-
`Failed to parse '
|
|
1590
|
+
(x) => PartsFilePart$inboundSchema.parse(JSON.parse(x)),
|
|
1591
|
+
`Failed to parse 'PartsFilePart' from JSON`,
|
|
1612
1592
|
);
|
|
1613
1593
|
}
|
|
1614
1594
|
|
|
@@ -1622,8 +1602,8 @@ export const InvokeAgentPartsKind$outboundSchema: z.ZodNativeEnum<
|
|
|
1622
1602
|
> = InvokeAgentPartsKind$inboundSchema;
|
|
1623
1603
|
|
|
1624
1604
|
/** @internal */
|
|
1625
|
-
export const
|
|
1626
|
-
|
|
1605
|
+
export const DataPart$inboundSchema: z.ZodType<
|
|
1606
|
+
DataPart,
|
|
1627
1607
|
z.ZodTypeDef,
|
|
1628
1608
|
unknown
|
|
1629
1609
|
> = z.object({
|
|
@@ -1632,138 +1612,121 @@ export const InvokeAgentPartsDataPart$inboundSchema: z.ZodType<
|
|
|
1632
1612
|
metadata: z.record(z.any()).optional(),
|
|
1633
1613
|
});
|
|
1634
1614
|
/** @internal */
|
|
1635
|
-
export type
|
|
1615
|
+
export type DataPart$Outbound = {
|
|
1636
1616
|
kind: string;
|
|
1637
1617
|
data: { [k: string]: any };
|
|
1638
1618
|
metadata?: { [k: string]: any } | undefined;
|
|
1639
1619
|
};
|
|
1640
1620
|
|
|
1641
1621
|
/** @internal */
|
|
1642
|
-
export const
|
|
1643
|
-
|
|
1622
|
+
export const DataPart$outboundSchema: z.ZodType<
|
|
1623
|
+
DataPart$Outbound,
|
|
1644
1624
|
z.ZodTypeDef,
|
|
1645
|
-
|
|
1625
|
+
DataPart
|
|
1646
1626
|
> = z.object({
|
|
1647
1627
|
kind: InvokeAgentPartsKind$outboundSchema,
|
|
1648
1628
|
data: z.record(z.any()),
|
|
1649
1629
|
metadata: z.record(z.any()).optional(),
|
|
1650
1630
|
});
|
|
1651
1631
|
|
|
1652
|
-
export function
|
|
1653
|
-
|
|
1654
|
-
): string {
|
|
1655
|
-
return JSON.stringify(
|
|
1656
|
-
InvokeAgentPartsDataPart$outboundSchema.parse(invokeAgentPartsDataPart),
|
|
1657
|
-
);
|
|
1632
|
+
export function dataPartToJSON(dataPart: DataPart): string {
|
|
1633
|
+
return JSON.stringify(DataPart$outboundSchema.parse(dataPart));
|
|
1658
1634
|
}
|
|
1659
|
-
export function
|
|
1635
|
+
export function dataPartFromJSON(
|
|
1660
1636
|
jsonString: string,
|
|
1661
|
-
): SafeParseResult<
|
|
1637
|
+
): SafeParseResult<DataPart, SDKValidationError> {
|
|
1662
1638
|
return safeParse(
|
|
1663
1639
|
jsonString,
|
|
1664
|
-
(x) =>
|
|
1665
|
-
`Failed to parse '
|
|
1640
|
+
(x) => DataPart$inboundSchema.parse(JSON.parse(x)),
|
|
1641
|
+
`Failed to parse 'DataPart' from JSON`,
|
|
1666
1642
|
);
|
|
1667
1643
|
}
|
|
1668
1644
|
|
|
1669
1645
|
/** @internal */
|
|
1670
|
-
export const
|
|
1671
|
-
|
|
1672
|
-
z.nativeEnum(InvokeAgentPartsAgentsResponse200ApplicationJSONKind);
|
|
1646
|
+
export const PartsKind$inboundSchema: z.ZodNativeEnum<typeof PartsKind> = z
|
|
1647
|
+
.nativeEnum(PartsKind);
|
|
1673
1648
|
/** @internal */
|
|
1674
|
-
export const
|
|
1675
|
-
|
|
1676
|
-
InvokeAgentPartsAgentsResponse200ApplicationJSONKind$inboundSchema;
|
|
1649
|
+
export const PartsKind$outboundSchema: z.ZodNativeEnum<typeof PartsKind> =
|
|
1650
|
+
PartsKind$inboundSchema;
|
|
1677
1651
|
|
|
1678
1652
|
/** @internal */
|
|
1679
|
-
export const
|
|
1680
|
-
|
|
1653
|
+
export const PartsTextPart$inboundSchema: z.ZodType<
|
|
1654
|
+
PartsTextPart,
|
|
1681
1655
|
z.ZodTypeDef,
|
|
1682
1656
|
unknown
|
|
1683
1657
|
> = z.object({
|
|
1684
|
-
kind:
|
|
1658
|
+
kind: PartsKind$inboundSchema,
|
|
1685
1659
|
text: z.string(),
|
|
1686
1660
|
});
|
|
1687
1661
|
/** @internal */
|
|
1688
|
-
export type
|
|
1662
|
+
export type PartsTextPart$Outbound = {
|
|
1689
1663
|
kind: string;
|
|
1690
1664
|
text: string;
|
|
1691
1665
|
};
|
|
1692
1666
|
|
|
1693
1667
|
/** @internal */
|
|
1694
|
-
export const
|
|
1695
|
-
|
|
1668
|
+
export const PartsTextPart$outboundSchema: z.ZodType<
|
|
1669
|
+
PartsTextPart$Outbound,
|
|
1696
1670
|
z.ZodTypeDef,
|
|
1697
|
-
|
|
1671
|
+
PartsTextPart
|
|
1698
1672
|
> = z.object({
|
|
1699
|
-
kind:
|
|
1673
|
+
kind: PartsKind$outboundSchema,
|
|
1700
1674
|
text: z.string(),
|
|
1701
1675
|
});
|
|
1702
1676
|
|
|
1703
|
-
export function
|
|
1704
|
-
|
|
1705
|
-
): string {
|
|
1706
|
-
return JSON.stringify(
|
|
1707
|
-
InvokeAgentPartsTextPart$outboundSchema.parse(invokeAgentPartsTextPart),
|
|
1708
|
-
);
|
|
1677
|
+
export function partsTextPartToJSON(partsTextPart: PartsTextPart): string {
|
|
1678
|
+
return JSON.stringify(PartsTextPart$outboundSchema.parse(partsTextPart));
|
|
1709
1679
|
}
|
|
1710
|
-
export function
|
|
1680
|
+
export function partsTextPartFromJSON(
|
|
1711
1681
|
jsonString: string,
|
|
1712
|
-
): SafeParseResult<
|
|
1682
|
+
): SafeParseResult<PartsTextPart, SDKValidationError> {
|
|
1713
1683
|
return safeParse(
|
|
1714
1684
|
jsonString,
|
|
1715
|
-
(x) =>
|
|
1716
|
-
`Failed to parse '
|
|
1685
|
+
(x) => PartsTextPart$inboundSchema.parse(JSON.parse(x)),
|
|
1686
|
+
`Failed to parse 'PartsTextPart' from JSON`,
|
|
1717
1687
|
);
|
|
1718
1688
|
}
|
|
1719
1689
|
|
|
1720
1690
|
/** @internal */
|
|
1721
|
-
export const
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
z.lazy(() => InvokeAgentPartsFilePart$inboundSchema),
|
|
1730
|
-
z.lazy(() => InvokeAgentPartsToolResultPart$inboundSchema),
|
|
1731
|
-
]);
|
|
1691
|
+
export const Parts$inboundSchema: z.ZodType<Parts, z.ZodTypeDef, unknown> = z
|
|
1692
|
+
.union([
|
|
1693
|
+
z.lazy(() => ToolCallPart$inboundSchema),
|
|
1694
|
+
z.lazy(() => PartsTextPart$inboundSchema),
|
|
1695
|
+
z.lazy(() => DataPart$inboundSchema),
|
|
1696
|
+
z.lazy(() => PartsFilePart$inboundSchema),
|
|
1697
|
+
z.lazy(() => PartsToolResultPart$inboundSchema),
|
|
1698
|
+
]);
|
|
1732
1699
|
/** @internal */
|
|
1733
|
-
export type
|
|
1734
|
-
|
|
|
1735
|
-
|
|
|
1736
|
-
|
|
|
1737
|
-
|
|
|
1738
|
-
|
|
|
1700
|
+
export type Parts$Outbound =
|
|
1701
|
+
| ToolCallPart$Outbound
|
|
1702
|
+
| PartsTextPart$Outbound
|
|
1703
|
+
| DataPart$Outbound
|
|
1704
|
+
| PartsFilePart$Outbound
|
|
1705
|
+
| PartsToolResultPart$Outbound;
|
|
1739
1706
|
|
|
1740
1707
|
/** @internal */
|
|
1741
|
-
export const
|
|
1742
|
-
|
|
1708
|
+
export const Parts$outboundSchema: z.ZodType<
|
|
1709
|
+
Parts$Outbound,
|
|
1743
1710
|
z.ZodTypeDef,
|
|
1744
|
-
|
|
1711
|
+
Parts
|
|
1745
1712
|
> = z.union([
|
|
1746
|
-
z.lazy(() =>
|
|
1747
|
-
z.lazy(() =>
|
|
1748
|
-
z.lazy(() =>
|
|
1749
|
-
z.lazy(() =>
|
|
1750
|
-
z.lazy(() =>
|
|
1713
|
+
z.lazy(() => ToolCallPart$outboundSchema),
|
|
1714
|
+
z.lazy(() => PartsTextPart$outboundSchema),
|
|
1715
|
+
z.lazy(() => DataPart$outboundSchema),
|
|
1716
|
+
z.lazy(() => PartsFilePart$outboundSchema),
|
|
1717
|
+
z.lazy(() => PartsToolResultPart$outboundSchema),
|
|
1751
1718
|
]);
|
|
1752
1719
|
|
|
1753
|
-
export function
|
|
1754
|
-
|
|
1755
|
-
): string {
|
|
1756
|
-
return JSON.stringify(
|
|
1757
|
-
InvokeAgentParts$outboundSchema.parse(invokeAgentParts),
|
|
1758
|
-
);
|
|
1720
|
+
export function partsToJSON(parts: Parts): string {
|
|
1721
|
+
return JSON.stringify(Parts$outboundSchema.parse(parts));
|
|
1759
1722
|
}
|
|
1760
|
-
export function
|
|
1723
|
+
export function partsFromJSON(
|
|
1761
1724
|
jsonString: string,
|
|
1762
|
-
): SafeParseResult<
|
|
1725
|
+
): SafeParseResult<Parts, SDKValidationError> {
|
|
1763
1726
|
return safeParse(
|
|
1764
1727
|
jsonString,
|
|
1765
|
-
(x) =>
|
|
1766
|
-
`Failed to parse '
|
|
1728
|
+
(x) => Parts$inboundSchema.parse(JSON.parse(x)),
|
|
1729
|
+
`Failed to parse 'Parts' from JSON`,
|
|
1767
1730
|
);
|
|
1768
1731
|
}
|
|
1769
1732
|
|
|
@@ -1775,14 +1738,14 @@ export const TaskStatusMessage$inboundSchema: z.ZodType<
|
|
|
1775
1738
|
> = z.object({
|
|
1776
1739
|
kind: InvokeAgentAgentsKind$inboundSchema,
|
|
1777
1740
|
messageId: z.string(),
|
|
1778
|
-
role:
|
|
1741
|
+
role: ExtendedMessageRole$inboundSchema,
|
|
1779
1742
|
parts: z.array(
|
|
1780
1743
|
z.union([
|
|
1781
|
-
z.lazy(() =>
|
|
1782
|
-
z.lazy(() =>
|
|
1783
|
-
z.lazy(() =>
|
|
1784
|
-
z.lazy(() =>
|
|
1785
|
-
z.lazy(() =>
|
|
1744
|
+
z.lazy(() => ToolCallPart$inboundSchema),
|
|
1745
|
+
z.lazy(() => PartsTextPart$inboundSchema),
|
|
1746
|
+
z.lazy(() => DataPart$inboundSchema),
|
|
1747
|
+
z.lazy(() => PartsFilePart$inboundSchema),
|
|
1748
|
+
z.lazy(() => PartsToolResultPart$inboundSchema),
|
|
1786
1749
|
]),
|
|
1787
1750
|
),
|
|
1788
1751
|
});
|
|
@@ -1792,11 +1755,11 @@ export type TaskStatusMessage$Outbound = {
|
|
|
1792
1755
|
messageId: string;
|
|
1793
1756
|
role: string;
|
|
1794
1757
|
parts: Array<
|
|
1795
|
-
|
|
|
1796
|
-
|
|
|
1797
|
-
|
|
|
1798
|
-
|
|
|
1799
|
-
|
|
|
1758
|
+
| ToolCallPart$Outbound
|
|
1759
|
+
| PartsTextPart$Outbound
|
|
1760
|
+
| DataPart$Outbound
|
|
1761
|
+
| PartsFilePart$Outbound
|
|
1762
|
+
| PartsToolResultPart$Outbound
|
|
1800
1763
|
>;
|
|
1801
1764
|
};
|
|
1802
1765
|
|
|
@@ -1808,14 +1771,14 @@ export const TaskStatusMessage$outboundSchema: z.ZodType<
|
|
|
1808
1771
|
> = z.object({
|
|
1809
1772
|
kind: InvokeAgentAgentsKind$outboundSchema,
|
|
1810
1773
|
messageId: z.string(),
|
|
1811
|
-
role:
|
|
1774
|
+
role: ExtendedMessageRole$outboundSchema,
|
|
1812
1775
|
parts: z.array(
|
|
1813
1776
|
z.union([
|
|
1814
|
-
z.lazy(() =>
|
|
1815
|
-
z.lazy(() =>
|
|
1816
|
-
z.lazy(() =>
|
|
1817
|
-
z.lazy(() =>
|
|
1818
|
-
z.lazy(() =>
|
|
1777
|
+
z.lazy(() => ToolCallPart$outboundSchema),
|
|
1778
|
+
z.lazy(() => PartsTextPart$outboundSchema),
|
|
1779
|
+
z.lazy(() => DataPart$outboundSchema),
|
|
1780
|
+
z.lazy(() => PartsFilePart$outboundSchema),
|
|
1781
|
+
z.lazy(() => PartsToolResultPart$outboundSchema),
|
|
1819
1782
|
]),
|
|
1820
1783
|
),
|
|
1821
1784
|
});
|