@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
|
@@ -1460,7 +1460,7 @@ export type RunAgentRequestBody = {
|
|
|
1460
1460
|
*/
|
|
1461
1461
|
systemPrompt?: string | undefined;
|
|
1462
1462
|
/**
|
|
1463
|
-
*
|
|
1463
|
+
* Array of memory store identifiers that are accessible to the agent. Accepts both memory store IDs and keys.
|
|
1464
1464
|
*/
|
|
1465
1465
|
memoryStores?: Array<string> | undefined;
|
|
1466
1466
|
/**
|
|
@@ -1527,6 +1527,118 @@ export const RunAgentAgentsRole = {
|
|
|
1527
1527
|
*/
|
|
1528
1528
|
export type RunAgentAgentsRole = ClosedEnum<typeof RunAgentAgentsRole>;
|
|
1529
1529
|
|
|
1530
|
+
export const RunAgentPartsAgentsResponse200ApplicationJSONKind = {
|
|
1531
|
+
ToolResult: "tool_result",
|
|
1532
|
+
} as const;
|
|
1533
|
+
export type RunAgentPartsAgentsResponse200ApplicationJSONKind = ClosedEnum<
|
|
1534
|
+
typeof RunAgentPartsAgentsResponse200ApplicationJSONKind
|
|
1535
|
+
>;
|
|
1536
|
+
|
|
1537
|
+
export type RunAgentParts5 = {
|
|
1538
|
+
kind: RunAgentPartsAgentsResponse200ApplicationJSONKind;
|
|
1539
|
+
toolCallId: string;
|
|
1540
|
+
result?: any | undefined;
|
|
1541
|
+
metadata?: { [k: string]: any } | undefined;
|
|
1542
|
+
};
|
|
1543
|
+
|
|
1544
|
+
export const RunAgentPartsAgentsResponse200Kind = {
|
|
1545
|
+
ToolCall: "tool_call",
|
|
1546
|
+
} as const;
|
|
1547
|
+
export type RunAgentPartsAgentsResponse200Kind = ClosedEnum<
|
|
1548
|
+
typeof RunAgentPartsAgentsResponse200Kind
|
|
1549
|
+
>;
|
|
1550
|
+
|
|
1551
|
+
export type RunAgentParts4 = {
|
|
1552
|
+
kind: RunAgentPartsAgentsResponse200Kind;
|
|
1553
|
+
toolName: string;
|
|
1554
|
+
toolCallId: string;
|
|
1555
|
+
arguments: { [k: string]: any };
|
|
1556
|
+
metadata?: { [k: string]: any } | undefined;
|
|
1557
|
+
};
|
|
1558
|
+
|
|
1559
|
+
export const RunAgentPartsAgentsResponseKind = {
|
|
1560
|
+
File: "file",
|
|
1561
|
+
} as const;
|
|
1562
|
+
export type RunAgentPartsAgentsResponseKind = ClosedEnum<
|
|
1563
|
+
typeof RunAgentPartsAgentsResponseKind
|
|
1564
|
+
>;
|
|
1565
|
+
|
|
1566
|
+
/**
|
|
1567
|
+
* File in URI format. Check in the model's documentation for the supported mime types for the URI format
|
|
1568
|
+
*/
|
|
1569
|
+
export type RunAgentFileFileInURIFormat = {
|
|
1570
|
+
/**
|
|
1571
|
+
* URL for the File content
|
|
1572
|
+
*/
|
|
1573
|
+
uri: string;
|
|
1574
|
+
/**
|
|
1575
|
+
* Optional mimeType for the file
|
|
1576
|
+
*/
|
|
1577
|
+
mimeType?: string | undefined;
|
|
1578
|
+
/**
|
|
1579
|
+
* Optional name for the file
|
|
1580
|
+
*/
|
|
1581
|
+
name?: string | undefined;
|
|
1582
|
+
};
|
|
1583
|
+
|
|
1584
|
+
/**
|
|
1585
|
+
* Binary in base64 format. Check in the model's documentation for the supported mime types for the binary format.
|
|
1586
|
+
*/
|
|
1587
|
+
export type RunAgentFileBinaryFormat = {
|
|
1588
|
+
/**
|
|
1589
|
+
* base64 encoded content of the file
|
|
1590
|
+
*/
|
|
1591
|
+
bytes: string;
|
|
1592
|
+
/**
|
|
1593
|
+
* Optional mimeType for the file
|
|
1594
|
+
*/
|
|
1595
|
+
mimeType?: string | undefined;
|
|
1596
|
+
/**
|
|
1597
|
+
* Optional name for the file
|
|
1598
|
+
*/
|
|
1599
|
+
name?: string | undefined;
|
|
1600
|
+
};
|
|
1601
|
+
|
|
1602
|
+
export type RunAgentPartsFile =
|
|
1603
|
+
| RunAgentFileBinaryFormat
|
|
1604
|
+
| RunAgentFileFileInURIFormat;
|
|
1605
|
+
|
|
1606
|
+
export type RunAgentParts3 = {
|
|
1607
|
+
kind: RunAgentPartsAgentsResponseKind;
|
|
1608
|
+
file: RunAgentFileBinaryFormat | RunAgentFileFileInURIFormat;
|
|
1609
|
+
metadata?: { [k: string]: any } | undefined;
|
|
1610
|
+
};
|
|
1611
|
+
|
|
1612
|
+
export const RunAgentPartsAgentsKind = {
|
|
1613
|
+
Data: "data",
|
|
1614
|
+
} as const;
|
|
1615
|
+
export type RunAgentPartsAgentsKind = ClosedEnum<
|
|
1616
|
+
typeof RunAgentPartsAgentsKind
|
|
1617
|
+
>;
|
|
1618
|
+
|
|
1619
|
+
export type RunAgentParts2 = {
|
|
1620
|
+
kind: RunAgentPartsAgentsKind;
|
|
1621
|
+
data: { [k: string]: any };
|
|
1622
|
+
metadata?: { [k: string]: any } | undefined;
|
|
1623
|
+
};
|
|
1624
|
+
|
|
1625
|
+
export const RunAgentPartsKind = {
|
|
1626
|
+
Text: "text",
|
|
1627
|
+
} as const;
|
|
1628
|
+
export type RunAgentPartsKind = ClosedEnum<typeof RunAgentPartsKind>;
|
|
1629
|
+
|
|
1630
|
+
export type RunAgentParts1 = {
|
|
1631
|
+
kind: RunAgentPartsKind;
|
|
1632
|
+
text: string;
|
|
1633
|
+
};
|
|
1634
|
+
|
|
1635
|
+
export type RunAgentParts =
|
|
1636
|
+
| RunAgentParts4
|
|
1637
|
+
| RunAgentParts1
|
|
1638
|
+
| RunAgentParts2
|
|
1639
|
+
| RunAgentParts3
|
|
1640
|
+
| RunAgentParts5;
|
|
1641
|
+
|
|
1530
1642
|
/**
|
|
1531
1643
|
* Optional status message
|
|
1532
1644
|
*/
|
|
@@ -1537,7 +1649,13 @@ export type RunAgentAgentsMessage = {
|
|
|
1537
1649
|
* Extended A2A message role
|
|
1538
1650
|
*/
|
|
1539
1651
|
role: RunAgentAgentsRole;
|
|
1540
|
-
parts: Array<
|
|
1652
|
+
parts: Array<
|
|
1653
|
+
| RunAgentParts4
|
|
1654
|
+
| RunAgentParts1
|
|
1655
|
+
| RunAgentParts2
|
|
1656
|
+
| RunAgentParts3
|
|
1657
|
+
| RunAgentParts5
|
|
1658
|
+
>;
|
|
1541
1659
|
};
|
|
1542
1660
|
|
|
1543
1661
|
/**
|
|
@@ -5834,6 +5952,467 @@ export const RunAgentAgentsRole$outboundSchema: z.ZodNativeEnum<
|
|
|
5834
5952
|
typeof RunAgentAgentsRole
|
|
5835
5953
|
> = RunAgentAgentsRole$inboundSchema;
|
|
5836
5954
|
|
|
5955
|
+
/** @internal */
|
|
5956
|
+
export const RunAgentPartsAgentsResponse200ApplicationJSONKind$inboundSchema:
|
|
5957
|
+
z.ZodNativeEnum<typeof RunAgentPartsAgentsResponse200ApplicationJSONKind> = z
|
|
5958
|
+
.nativeEnum(RunAgentPartsAgentsResponse200ApplicationJSONKind);
|
|
5959
|
+
/** @internal */
|
|
5960
|
+
export const RunAgentPartsAgentsResponse200ApplicationJSONKind$outboundSchema:
|
|
5961
|
+
z.ZodNativeEnum<typeof RunAgentPartsAgentsResponse200ApplicationJSONKind> =
|
|
5962
|
+
RunAgentPartsAgentsResponse200ApplicationJSONKind$inboundSchema;
|
|
5963
|
+
|
|
5964
|
+
/** @internal */
|
|
5965
|
+
export const RunAgentParts5$inboundSchema: z.ZodType<
|
|
5966
|
+
RunAgentParts5,
|
|
5967
|
+
z.ZodTypeDef,
|
|
5968
|
+
unknown
|
|
5969
|
+
> = z.object({
|
|
5970
|
+
kind: RunAgentPartsAgentsResponse200ApplicationJSONKind$inboundSchema,
|
|
5971
|
+
tool_call_id: z.string(),
|
|
5972
|
+
result: z.any().optional(),
|
|
5973
|
+
metadata: z.record(z.any()).optional(),
|
|
5974
|
+
}).transform((v) => {
|
|
5975
|
+
return remap$(v, {
|
|
5976
|
+
"tool_call_id": "toolCallId",
|
|
5977
|
+
});
|
|
5978
|
+
});
|
|
5979
|
+
/** @internal */
|
|
5980
|
+
export type RunAgentParts5$Outbound = {
|
|
5981
|
+
kind: string;
|
|
5982
|
+
tool_call_id: string;
|
|
5983
|
+
result?: any | undefined;
|
|
5984
|
+
metadata?: { [k: string]: any } | undefined;
|
|
5985
|
+
};
|
|
5986
|
+
|
|
5987
|
+
/** @internal */
|
|
5988
|
+
export const RunAgentParts5$outboundSchema: z.ZodType<
|
|
5989
|
+
RunAgentParts5$Outbound,
|
|
5990
|
+
z.ZodTypeDef,
|
|
5991
|
+
RunAgentParts5
|
|
5992
|
+
> = z.object({
|
|
5993
|
+
kind: RunAgentPartsAgentsResponse200ApplicationJSONKind$outboundSchema,
|
|
5994
|
+
toolCallId: z.string(),
|
|
5995
|
+
result: z.any().optional(),
|
|
5996
|
+
metadata: z.record(z.any()).optional(),
|
|
5997
|
+
}).transform((v) => {
|
|
5998
|
+
return remap$(v, {
|
|
5999
|
+
toolCallId: "tool_call_id",
|
|
6000
|
+
});
|
|
6001
|
+
});
|
|
6002
|
+
|
|
6003
|
+
export function runAgentParts5ToJSON(runAgentParts5: RunAgentParts5): string {
|
|
6004
|
+
return JSON.stringify(RunAgentParts5$outboundSchema.parse(runAgentParts5));
|
|
6005
|
+
}
|
|
6006
|
+
export function runAgentParts5FromJSON(
|
|
6007
|
+
jsonString: string,
|
|
6008
|
+
): SafeParseResult<RunAgentParts5, SDKValidationError> {
|
|
6009
|
+
return safeParse(
|
|
6010
|
+
jsonString,
|
|
6011
|
+
(x) => RunAgentParts5$inboundSchema.parse(JSON.parse(x)),
|
|
6012
|
+
`Failed to parse 'RunAgentParts5' from JSON`,
|
|
6013
|
+
);
|
|
6014
|
+
}
|
|
6015
|
+
|
|
6016
|
+
/** @internal */
|
|
6017
|
+
export const RunAgentPartsAgentsResponse200Kind$inboundSchema: z.ZodNativeEnum<
|
|
6018
|
+
typeof RunAgentPartsAgentsResponse200Kind
|
|
6019
|
+
> = z.nativeEnum(RunAgentPartsAgentsResponse200Kind);
|
|
6020
|
+
/** @internal */
|
|
6021
|
+
export const RunAgentPartsAgentsResponse200Kind$outboundSchema: z.ZodNativeEnum<
|
|
6022
|
+
typeof RunAgentPartsAgentsResponse200Kind
|
|
6023
|
+
> = RunAgentPartsAgentsResponse200Kind$inboundSchema;
|
|
6024
|
+
|
|
6025
|
+
/** @internal */
|
|
6026
|
+
export const RunAgentParts4$inboundSchema: z.ZodType<
|
|
6027
|
+
RunAgentParts4,
|
|
6028
|
+
z.ZodTypeDef,
|
|
6029
|
+
unknown
|
|
6030
|
+
> = z.object({
|
|
6031
|
+
kind: RunAgentPartsAgentsResponse200Kind$inboundSchema,
|
|
6032
|
+
tool_name: z.string(),
|
|
6033
|
+
tool_call_id: z.string(),
|
|
6034
|
+
arguments: z.record(z.any()),
|
|
6035
|
+
metadata: z.record(z.any()).optional(),
|
|
6036
|
+
}).transform((v) => {
|
|
6037
|
+
return remap$(v, {
|
|
6038
|
+
"tool_name": "toolName",
|
|
6039
|
+
"tool_call_id": "toolCallId",
|
|
6040
|
+
});
|
|
6041
|
+
});
|
|
6042
|
+
/** @internal */
|
|
6043
|
+
export type RunAgentParts4$Outbound = {
|
|
6044
|
+
kind: string;
|
|
6045
|
+
tool_name: string;
|
|
6046
|
+
tool_call_id: string;
|
|
6047
|
+
arguments: { [k: string]: any };
|
|
6048
|
+
metadata?: { [k: string]: any } | undefined;
|
|
6049
|
+
};
|
|
6050
|
+
|
|
6051
|
+
/** @internal */
|
|
6052
|
+
export const RunAgentParts4$outboundSchema: z.ZodType<
|
|
6053
|
+
RunAgentParts4$Outbound,
|
|
6054
|
+
z.ZodTypeDef,
|
|
6055
|
+
RunAgentParts4
|
|
6056
|
+
> = z.object({
|
|
6057
|
+
kind: RunAgentPartsAgentsResponse200Kind$outboundSchema,
|
|
6058
|
+
toolName: z.string(),
|
|
6059
|
+
toolCallId: z.string(),
|
|
6060
|
+
arguments: z.record(z.any()),
|
|
6061
|
+
metadata: z.record(z.any()).optional(),
|
|
6062
|
+
}).transform((v) => {
|
|
6063
|
+
return remap$(v, {
|
|
6064
|
+
toolName: "tool_name",
|
|
6065
|
+
toolCallId: "tool_call_id",
|
|
6066
|
+
});
|
|
6067
|
+
});
|
|
6068
|
+
|
|
6069
|
+
export function runAgentParts4ToJSON(runAgentParts4: RunAgentParts4): string {
|
|
6070
|
+
return JSON.stringify(RunAgentParts4$outboundSchema.parse(runAgentParts4));
|
|
6071
|
+
}
|
|
6072
|
+
export function runAgentParts4FromJSON(
|
|
6073
|
+
jsonString: string,
|
|
6074
|
+
): SafeParseResult<RunAgentParts4, SDKValidationError> {
|
|
6075
|
+
return safeParse(
|
|
6076
|
+
jsonString,
|
|
6077
|
+
(x) => RunAgentParts4$inboundSchema.parse(JSON.parse(x)),
|
|
6078
|
+
`Failed to parse 'RunAgentParts4' from JSON`,
|
|
6079
|
+
);
|
|
6080
|
+
}
|
|
6081
|
+
|
|
6082
|
+
/** @internal */
|
|
6083
|
+
export const RunAgentPartsAgentsResponseKind$inboundSchema: z.ZodNativeEnum<
|
|
6084
|
+
typeof RunAgentPartsAgentsResponseKind
|
|
6085
|
+
> = z.nativeEnum(RunAgentPartsAgentsResponseKind);
|
|
6086
|
+
/** @internal */
|
|
6087
|
+
export const RunAgentPartsAgentsResponseKind$outboundSchema: z.ZodNativeEnum<
|
|
6088
|
+
typeof RunAgentPartsAgentsResponseKind
|
|
6089
|
+
> = RunAgentPartsAgentsResponseKind$inboundSchema;
|
|
6090
|
+
|
|
6091
|
+
/** @internal */
|
|
6092
|
+
export const RunAgentFileFileInURIFormat$inboundSchema: z.ZodType<
|
|
6093
|
+
RunAgentFileFileInURIFormat,
|
|
6094
|
+
z.ZodTypeDef,
|
|
6095
|
+
unknown
|
|
6096
|
+
> = z.object({
|
|
6097
|
+
uri: z.string(),
|
|
6098
|
+
mimeType: z.string().optional(),
|
|
6099
|
+
name: z.string().optional(),
|
|
6100
|
+
});
|
|
6101
|
+
/** @internal */
|
|
6102
|
+
export type RunAgentFileFileInURIFormat$Outbound = {
|
|
6103
|
+
uri: string;
|
|
6104
|
+
mimeType?: string | undefined;
|
|
6105
|
+
name?: string | undefined;
|
|
6106
|
+
};
|
|
6107
|
+
|
|
6108
|
+
/** @internal */
|
|
6109
|
+
export const RunAgentFileFileInURIFormat$outboundSchema: z.ZodType<
|
|
6110
|
+
RunAgentFileFileInURIFormat$Outbound,
|
|
6111
|
+
z.ZodTypeDef,
|
|
6112
|
+
RunAgentFileFileInURIFormat
|
|
6113
|
+
> = z.object({
|
|
6114
|
+
uri: z.string(),
|
|
6115
|
+
mimeType: z.string().optional(),
|
|
6116
|
+
name: z.string().optional(),
|
|
6117
|
+
});
|
|
6118
|
+
|
|
6119
|
+
export function runAgentFileFileInURIFormatToJSON(
|
|
6120
|
+
runAgentFileFileInURIFormat: RunAgentFileFileInURIFormat,
|
|
6121
|
+
): string {
|
|
6122
|
+
return JSON.stringify(
|
|
6123
|
+
RunAgentFileFileInURIFormat$outboundSchema.parse(
|
|
6124
|
+
runAgentFileFileInURIFormat,
|
|
6125
|
+
),
|
|
6126
|
+
);
|
|
6127
|
+
}
|
|
6128
|
+
export function runAgentFileFileInURIFormatFromJSON(
|
|
6129
|
+
jsonString: string,
|
|
6130
|
+
): SafeParseResult<RunAgentFileFileInURIFormat, SDKValidationError> {
|
|
6131
|
+
return safeParse(
|
|
6132
|
+
jsonString,
|
|
6133
|
+
(x) => RunAgentFileFileInURIFormat$inboundSchema.parse(JSON.parse(x)),
|
|
6134
|
+
`Failed to parse 'RunAgentFileFileInURIFormat' from JSON`,
|
|
6135
|
+
);
|
|
6136
|
+
}
|
|
6137
|
+
|
|
6138
|
+
/** @internal */
|
|
6139
|
+
export const RunAgentFileBinaryFormat$inboundSchema: z.ZodType<
|
|
6140
|
+
RunAgentFileBinaryFormat,
|
|
6141
|
+
z.ZodTypeDef,
|
|
6142
|
+
unknown
|
|
6143
|
+
> = z.object({
|
|
6144
|
+
bytes: z.string(),
|
|
6145
|
+
mimeType: z.string().optional(),
|
|
6146
|
+
name: z.string().optional(),
|
|
6147
|
+
});
|
|
6148
|
+
/** @internal */
|
|
6149
|
+
export type RunAgentFileBinaryFormat$Outbound = {
|
|
6150
|
+
bytes: string;
|
|
6151
|
+
mimeType?: string | undefined;
|
|
6152
|
+
name?: string | undefined;
|
|
6153
|
+
};
|
|
6154
|
+
|
|
6155
|
+
/** @internal */
|
|
6156
|
+
export const RunAgentFileBinaryFormat$outboundSchema: z.ZodType<
|
|
6157
|
+
RunAgentFileBinaryFormat$Outbound,
|
|
6158
|
+
z.ZodTypeDef,
|
|
6159
|
+
RunAgentFileBinaryFormat
|
|
6160
|
+
> = z.object({
|
|
6161
|
+
bytes: z.string(),
|
|
6162
|
+
mimeType: z.string().optional(),
|
|
6163
|
+
name: z.string().optional(),
|
|
6164
|
+
});
|
|
6165
|
+
|
|
6166
|
+
export function runAgentFileBinaryFormatToJSON(
|
|
6167
|
+
runAgentFileBinaryFormat: RunAgentFileBinaryFormat,
|
|
6168
|
+
): string {
|
|
6169
|
+
return JSON.stringify(
|
|
6170
|
+
RunAgentFileBinaryFormat$outboundSchema.parse(runAgentFileBinaryFormat),
|
|
6171
|
+
);
|
|
6172
|
+
}
|
|
6173
|
+
export function runAgentFileBinaryFormatFromJSON(
|
|
6174
|
+
jsonString: string,
|
|
6175
|
+
): SafeParseResult<RunAgentFileBinaryFormat, SDKValidationError> {
|
|
6176
|
+
return safeParse(
|
|
6177
|
+
jsonString,
|
|
6178
|
+
(x) => RunAgentFileBinaryFormat$inboundSchema.parse(JSON.parse(x)),
|
|
6179
|
+
`Failed to parse 'RunAgentFileBinaryFormat' from JSON`,
|
|
6180
|
+
);
|
|
6181
|
+
}
|
|
6182
|
+
|
|
6183
|
+
/** @internal */
|
|
6184
|
+
export const RunAgentPartsFile$inboundSchema: z.ZodType<
|
|
6185
|
+
RunAgentPartsFile,
|
|
6186
|
+
z.ZodTypeDef,
|
|
6187
|
+
unknown
|
|
6188
|
+
> = z.union([
|
|
6189
|
+
z.lazy(() => RunAgentFileBinaryFormat$inboundSchema),
|
|
6190
|
+
z.lazy(() => RunAgentFileFileInURIFormat$inboundSchema),
|
|
6191
|
+
]);
|
|
6192
|
+
/** @internal */
|
|
6193
|
+
export type RunAgentPartsFile$Outbound =
|
|
6194
|
+
| RunAgentFileBinaryFormat$Outbound
|
|
6195
|
+
| RunAgentFileFileInURIFormat$Outbound;
|
|
6196
|
+
|
|
6197
|
+
/** @internal */
|
|
6198
|
+
export const RunAgentPartsFile$outboundSchema: z.ZodType<
|
|
6199
|
+
RunAgentPartsFile$Outbound,
|
|
6200
|
+
z.ZodTypeDef,
|
|
6201
|
+
RunAgentPartsFile
|
|
6202
|
+
> = z.union([
|
|
6203
|
+
z.lazy(() => RunAgentFileBinaryFormat$outboundSchema),
|
|
6204
|
+
z.lazy(() => RunAgentFileFileInURIFormat$outboundSchema),
|
|
6205
|
+
]);
|
|
6206
|
+
|
|
6207
|
+
export function runAgentPartsFileToJSON(
|
|
6208
|
+
runAgentPartsFile: RunAgentPartsFile,
|
|
6209
|
+
): string {
|
|
6210
|
+
return JSON.stringify(
|
|
6211
|
+
RunAgentPartsFile$outboundSchema.parse(runAgentPartsFile),
|
|
6212
|
+
);
|
|
6213
|
+
}
|
|
6214
|
+
export function runAgentPartsFileFromJSON(
|
|
6215
|
+
jsonString: string,
|
|
6216
|
+
): SafeParseResult<RunAgentPartsFile, SDKValidationError> {
|
|
6217
|
+
return safeParse(
|
|
6218
|
+
jsonString,
|
|
6219
|
+
(x) => RunAgentPartsFile$inboundSchema.parse(JSON.parse(x)),
|
|
6220
|
+
`Failed to parse 'RunAgentPartsFile' from JSON`,
|
|
6221
|
+
);
|
|
6222
|
+
}
|
|
6223
|
+
|
|
6224
|
+
/** @internal */
|
|
6225
|
+
export const RunAgentParts3$inboundSchema: z.ZodType<
|
|
6226
|
+
RunAgentParts3,
|
|
6227
|
+
z.ZodTypeDef,
|
|
6228
|
+
unknown
|
|
6229
|
+
> = z.object({
|
|
6230
|
+
kind: RunAgentPartsAgentsResponseKind$inboundSchema,
|
|
6231
|
+
file: z.union([
|
|
6232
|
+
z.lazy(() => RunAgentFileBinaryFormat$inboundSchema),
|
|
6233
|
+
z.lazy(() => RunAgentFileFileInURIFormat$inboundSchema),
|
|
6234
|
+
]),
|
|
6235
|
+
metadata: z.record(z.any()).optional(),
|
|
6236
|
+
});
|
|
6237
|
+
/** @internal */
|
|
6238
|
+
export type RunAgentParts3$Outbound = {
|
|
6239
|
+
kind: string;
|
|
6240
|
+
file:
|
|
6241
|
+
| RunAgentFileBinaryFormat$Outbound
|
|
6242
|
+
| RunAgentFileFileInURIFormat$Outbound;
|
|
6243
|
+
metadata?: { [k: string]: any } | undefined;
|
|
6244
|
+
};
|
|
6245
|
+
|
|
6246
|
+
/** @internal */
|
|
6247
|
+
export const RunAgentParts3$outboundSchema: z.ZodType<
|
|
6248
|
+
RunAgentParts3$Outbound,
|
|
6249
|
+
z.ZodTypeDef,
|
|
6250
|
+
RunAgentParts3
|
|
6251
|
+
> = z.object({
|
|
6252
|
+
kind: RunAgentPartsAgentsResponseKind$outboundSchema,
|
|
6253
|
+
file: z.union([
|
|
6254
|
+
z.lazy(() => RunAgentFileBinaryFormat$outboundSchema),
|
|
6255
|
+
z.lazy(() => RunAgentFileFileInURIFormat$outboundSchema),
|
|
6256
|
+
]),
|
|
6257
|
+
metadata: z.record(z.any()).optional(),
|
|
6258
|
+
});
|
|
6259
|
+
|
|
6260
|
+
export function runAgentParts3ToJSON(runAgentParts3: RunAgentParts3): string {
|
|
6261
|
+
return JSON.stringify(RunAgentParts3$outboundSchema.parse(runAgentParts3));
|
|
6262
|
+
}
|
|
6263
|
+
export function runAgentParts3FromJSON(
|
|
6264
|
+
jsonString: string,
|
|
6265
|
+
): SafeParseResult<RunAgentParts3, SDKValidationError> {
|
|
6266
|
+
return safeParse(
|
|
6267
|
+
jsonString,
|
|
6268
|
+
(x) => RunAgentParts3$inboundSchema.parse(JSON.parse(x)),
|
|
6269
|
+
`Failed to parse 'RunAgentParts3' from JSON`,
|
|
6270
|
+
);
|
|
6271
|
+
}
|
|
6272
|
+
|
|
6273
|
+
/** @internal */
|
|
6274
|
+
export const RunAgentPartsAgentsKind$inboundSchema: z.ZodNativeEnum<
|
|
6275
|
+
typeof RunAgentPartsAgentsKind
|
|
6276
|
+
> = z.nativeEnum(RunAgentPartsAgentsKind);
|
|
6277
|
+
/** @internal */
|
|
6278
|
+
export const RunAgentPartsAgentsKind$outboundSchema: z.ZodNativeEnum<
|
|
6279
|
+
typeof RunAgentPartsAgentsKind
|
|
6280
|
+
> = RunAgentPartsAgentsKind$inboundSchema;
|
|
6281
|
+
|
|
6282
|
+
/** @internal */
|
|
6283
|
+
export const RunAgentParts2$inboundSchema: z.ZodType<
|
|
6284
|
+
RunAgentParts2,
|
|
6285
|
+
z.ZodTypeDef,
|
|
6286
|
+
unknown
|
|
6287
|
+
> = z.object({
|
|
6288
|
+
kind: RunAgentPartsAgentsKind$inboundSchema,
|
|
6289
|
+
data: z.record(z.any()),
|
|
6290
|
+
metadata: z.record(z.any()).optional(),
|
|
6291
|
+
});
|
|
6292
|
+
/** @internal */
|
|
6293
|
+
export type RunAgentParts2$Outbound = {
|
|
6294
|
+
kind: string;
|
|
6295
|
+
data: { [k: string]: any };
|
|
6296
|
+
metadata?: { [k: string]: any } | undefined;
|
|
6297
|
+
};
|
|
6298
|
+
|
|
6299
|
+
/** @internal */
|
|
6300
|
+
export const RunAgentParts2$outboundSchema: z.ZodType<
|
|
6301
|
+
RunAgentParts2$Outbound,
|
|
6302
|
+
z.ZodTypeDef,
|
|
6303
|
+
RunAgentParts2
|
|
6304
|
+
> = z.object({
|
|
6305
|
+
kind: RunAgentPartsAgentsKind$outboundSchema,
|
|
6306
|
+
data: z.record(z.any()),
|
|
6307
|
+
metadata: z.record(z.any()).optional(),
|
|
6308
|
+
});
|
|
6309
|
+
|
|
6310
|
+
export function runAgentParts2ToJSON(runAgentParts2: RunAgentParts2): string {
|
|
6311
|
+
return JSON.stringify(RunAgentParts2$outboundSchema.parse(runAgentParts2));
|
|
6312
|
+
}
|
|
6313
|
+
export function runAgentParts2FromJSON(
|
|
6314
|
+
jsonString: string,
|
|
6315
|
+
): SafeParseResult<RunAgentParts2, SDKValidationError> {
|
|
6316
|
+
return safeParse(
|
|
6317
|
+
jsonString,
|
|
6318
|
+
(x) => RunAgentParts2$inboundSchema.parse(JSON.parse(x)),
|
|
6319
|
+
`Failed to parse 'RunAgentParts2' from JSON`,
|
|
6320
|
+
);
|
|
6321
|
+
}
|
|
6322
|
+
|
|
6323
|
+
/** @internal */
|
|
6324
|
+
export const RunAgentPartsKind$inboundSchema: z.ZodNativeEnum<
|
|
6325
|
+
typeof RunAgentPartsKind
|
|
6326
|
+
> = z.nativeEnum(RunAgentPartsKind);
|
|
6327
|
+
/** @internal */
|
|
6328
|
+
export const RunAgentPartsKind$outboundSchema: z.ZodNativeEnum<
|
|
6329
|
+
typeof RunAgentPartsKind
|
|
6330
|
+
> = RunAgentPartsKind$inboundSchema;
|
|
6331
|
+
|
|
6332
|
+
/** @internal */
|
|
6333
|
+
export const RunAgentParts1$inboundSchema: z.ZodType<
|
|
6334
|
+
RunAgentParts1,
|
|
6335
|
+
z.ZodTypeDef,
|
|
6336
|
+
unknown
|
|
6337
|
+
> = z.object({
|
|
6338
|
+
kind: RunAgentPartsKind$inboundSchema,
|
|
6339
|
+
text: z.string(),
|
|
6340
|
+
});
|
|
6341
|
+
/** @internal */
|
|
6342
|
+
export type RunAgentParts1$Outbound = {
|
|
6343
|
+
kind: string;
|
|
6344
|
+
text: string;
|
|
6345
|
+
};
|
|
6346
|
+
|
|
6347
|
+
/** @internal */
|
|
6348
|
+
export const RunAgentParts1$outboundSchema: z.ZodType<
|
|
6349
|
+
RunAgentParts1$Outbound,
|
|
6350
|
+
z.ZodTypeDef,
|
|
6351
|
+
RunAgentParts1
|
|
6352
|
+
> = z.object({
|
|
6353
|
+
kind: RunAgentPartsKind$outboundSchema,
|
|
6354
|
+
text: z.string(),
|
|
6355
|
+
});
|
|
6356
|
+
|
|
6357
|
+
export function runAgentParts1ToJSON(runAgentParts1: RunAgentParts1): string {
|
|
6358
|
+
return JSON.stringify(RunAgentParts1$outboundSchema.parse(runAgentParts1));
|
|
6359
|
+
}
|
|
6360
|
+
export function runAgentParts1FromJSON(
|
|
6361
|
+
jsonString: string,
|
|
6362
|
+
): SafeParseResult<RunAgentParts1, SDKValidationError> {
|
|
6363
|
+
return safeParse(
|
|
6364
|
+
jsonString,
|
|
6365
|
+
(x) => RunAgentParts1$inboundSchema.parse(JSON.parse(x)),
|
|
6366
|
+
`Failed to parse 'RunAgentParts1' from JSON`,
|
|
6367
|
+
);
|
|
6368
|
+
}
|
|
6369
|
+
|
|
6370
|
+
/** @internal */
|
|
6371
|
+
export const RunAgentParts$inboundSchema: z.ZodType<
|
|
6372
|
+
RunAgentParts,
|
|
6373
|
+
z.ZodTypeDef,
|
|
6374
|
+
unknown
|
|
6375
|
+
> = z.union([
|
|
6376
|
+
z.lazy(() => RunAgentParts4$inboundSchema),
|
|
6377
|
+
z.lazy(() => RunAgentParts1$inboundSchema),
|
|
6378
|
+
z.lazy(() => RunAgentParts2$inboundSchema),
|
|
6379
|
+
z.lazy(() => RunAgentParts3$inboundSchema),
|
|
6380
|
+
z.lazy(() => RunAgentParts5$inboundSchema),
|
|
6381
|
+
]);
|
|
6382
|
+
/** @internal */
|
|
6383
|
+
export type RunAgentParts$Outbound =
|
|
6384
|
+
| RunAgentParts4$Outbound
|
|
6385
|
+
| RunAgentParts1$Outbound
|
|
6386
|
+
| RunAgentParts2$Outbound
|
|
6387
|
+
| RunAgentParts3$Outbound
|
|
6388
|
+
| RunAgentParts5$Outbound;
|
|
6389
|
+
|
|
6390
|
+
/** @internal */
|
|
6391
|
+
export const RunAgentParts$outboundSchema: z.ZodType<
|
|
6392
|
+
RunAgentParts$Outbound,
|
|
6393
|
+
z.ZodTypeDef,
|
|
6394
|
+
RunAgentParts
|
|
6395
|
+
> = z.union([
|
|
6396
|
+
z.lazy(() => RunAgentParts4$outboundSchema),
|
|
6397
|
+
z.lazy(() => RunAgentParts1$outboundSchema),
|
|
6398
|
+
z.lazy(() => RunAgentParts2$outboundSchema),
|
|
6399
|
+
z.lazy(() => RunAgentParts3$outboundSchema),
|
|
6400
|
+
z.lazy(() => RunAgentParts5$outboundSchema),
|
|
6401
|
+
]);
|
|
6402
|
+
|
|
6403
|
+
export function runAgentPartsToJSON(runAgentParts: RunAgentParts): string {
|
|
6404
|
+
return JSON.stringify(RunAgentParts$outboundSchema.parse(runAgentParts));
|
|
6405
|
+
}
|
|
6406
|
+
export function runAgentPartsFromJSON(
|
|
6407
|
+
jsonString: string,
|
|
6408
|
+
): SafeParseResult<RunAgentParts, SDKValidationError> {
|
|
6409
|
+
return safeParse(
|
|
6410
|
+
jsonString,
|
|
6411
|
+
(x) => RunAgentParts$inboundSchema.parse(JSON.parse(x)),
|
|
6412
|
+
`Failed to parse 'RunAgentParts' from JSON`,
|
|
6413
|
+
);
|
|
6414
|
+
}
|
|
6415
|
+
|
|
5837
6416
|
/** @internal */
|
|
5838
6417
|
export const RunAgentAgentsMessage$inboundSchema: z.ZodType<
|
|
5839
6418
|
RunAgentAgentsMessage,
|
|
@@ -5843,14 +6422,28 @@ export const RunAgentAgentsMessage$inboundSchema: z.ZodType<
|
|
|
5843
6422
|
kind: RunAgentAgentsKind$inboundSchema,
|
|
5844
6423
|
messageId: z.string(),
|
|
5845
6424
|
role: RunAgentAgentsRole$inboundSchema,
|
|
5846
|
-
parts: z.array(
|
|
6425
|
+
parts: z.array(
|
|
6426
|
+
z.union([
|
|
6427
|
+
z.lazy(() => RunAgentParts4$inboundSchema),
|
|
6428
|
+
z.lazy(() => RunAgentParts1$inboundSchema),
|
|
6429
|
+
z.lazy(() => RunAgentParts2$inboundSchema),
|
|
6430
|
+
z.lazy(() => RunAgentParts3$inboundSchema),
|
|
6431
|
+
z.lazy(() => RunAgentParts5$inboundSchema),
|
|
6432
|
+
]),
|
|
6433
|
+
),
|
|
5847
6434
|
});
|
|
5848
6435
|
/** @internal */
|
|
5849
6436
|
export type RunAgentAgentsMessage$Outbound = {
|
|
5850
6437
|
kind: string;
|
|
5851
6438
|
messageId: string;
|
|
5852
6439
|
role: string;
|
|
5853
|
-
parts: Array<
|
|
6440
|
+
parts: Array<
|
|
6441
|
+
| RunAgentParts4$Outbound
|
|
6442
|
+
| RunAgentParts1$Outbound
|
|
6443
|
+
| RunAgentParts2$Outbound
|
|
6444
|
+
| RunAgentParts3$Outbound
|
|
6445
|
+
| RunAgentParts5$Outbound
|
|
6446
|
+
>;
|
|
5854
6447
|
};
|
|
5855
6448
|
|
|
5856
6449
|
/** @internal */
|
|
@@ -5862,7 +6455,15 @@ export const RunAgentAgentsMessage$outboundSchema: z.ZodType<
|
|
|
5862
6455
|
kind: RunAgentAgentsKind$outboundSchema,
|
|
5863
6456
|
messageId: z.string(),
|
|
5864
6457
|
role: RunAgentAgentsRole$outboundSchema,
|
|
5865
|
-
parts: z.array(
|
|
6458
|
+
parts: z.array(
|
|
6459
|
+
z.union([
|
|
6460
|
+
z.lazy(() => RunAgentParts4$outboundSchema),
|
|
6461
|
+
z.lazy(() => RunAgentParts1$outboundSchema),
|
|
6462
|
+
z.lazy(() => RunAgentParts2$outboundSchema),
|
|
6463
|
+
z.lazy(() => RunAgentParts3$outboundSchema),
|
|
6464
|
+
z.lazy(() => RunAgentParts5$outboundSchema),
|
|
6465
|
+
]),
|
|
6466
|
+
),
|
|
5866
6467
|
});
|
|
5867
6468
|
|
|
5868
6469
|
export function runAgentAgentsMessageToJSON(
|
|
@@ -1497,7 +1497,7 @@ export type StreamRunAgentRequestBody = {
|
|
|
1497
1497
|
*/
|
|
1498
1498
|
systemPrompt?: string | undefined;
|
|
1499
1499
|
/**
|
|
1500
|
-
*
|
|
1500
|
+
* Array of memory store identifiers that are accessible to the agent. Accepts both memory store IDs and keys.
|
|
1501
1501
|
*/
|
|
1502
1502
|
memoryStores?: Array<string> | undefined;
|
|
1503
1503
|
/**
|