@orq-ai/node 4.1.0-rc.3 → 4.1.0-rc.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/mcp-server.js +37458 -38314
- package/bin/mcp-server.js.map +59 -54
- 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/components/datapart.d.ts +41 -0
- package/models/components/datapart.d.ts.map +1 -0
- package/models/components/datapart.js +69 -0
- package/models/components/datapart.js.map +1 -0
- package/models/components/filepart.d.ts +104 -0
- package/models/components/filepart.d.ts.map +1 -0
- package/models/components/filepart.js +134 -0
- package/models/components/filepart.js.map +1 -0
- package/models/components/index.d.ts +5 -0
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +5 -0
- package/models/components/index.js.map +1 -1
- package/models/components/invokedeploymentrequest.d.ts +8 -8
- package/models/components/invokedeploymentrequest.d.ts.map +1 -1
- package/models/components/invokedeploymentrequest.js +11 -12
- package/models/components/invokedeploymentrequest.js.map +1 -1
- package/models/components/textpart.d.ts +31 -0
- package/models/components/textpart.d.ts.map +1 -0
- package/models/components/textpart.js +67 -0
- package/models/components/textpart.js.map +1 -0
- package/models/components/toolcallpart.d.ts +45 -0
- package/models/components/toolcallpart.d.ts.map +1 -0
- package/models/components/toolcallpart.js +84 -0
- package/models/components/toolcallpart.js.map +1 -0
- package/models/components/toolresultpart.d.ts +39 -0
- package/models/components/toolresultpart.d.ts.map +1 -0
- package/models/components/toolresultpart.js +80 -0
- package/models/components/toolresultpart.js.map +1 -0
- package/models/operations/createagentresponserequest.d.ts +66 -42
- package/models/operations/createagentresponserequest.d.ts.map +1 -1
- package/models/operations/createagentresponserequest.js +90 -44
- package/models/operations/createagentresponserequest.js.map +1 -1
- package/models/operations/createbudget.js +2 -2
- package/models/operations/createcontact.js +2 -2
- package/models/operations/createdataset.js +2 -2
- package/models/operations/createdatasetitem.js +8 -8
- package/models/operations/createdatasource.js +2 -2
- package/models/operations/createeval.js +28 -28
- package/models/operations/createprompt.d.ts +9 -11
- package/models/operations/createprompt.d.ts.map +1 -1
- package/models/operations/createprompt.js +9 -11
- package/models/operations/createprompt.js.map +1 -1
- package/models/operations/createtool.js +12 -12
- package/models/operations/deploymentinvoke.d.ts +9 -11
- package/models/operations/deploymentinvoke.d.ts.map +1 -1
- package/models/operations/deploymentinvoke.js +9 -11
- package/models/operations/deploymentinvoke.js.map +1 -1
- package/models/operations/deployments.d.ts +9 -11
- package/models/operations/deployments.d.ts.map +1 -1
- package/models/operations/deployments.js +9 -11
- package/models/operations/deployments.js.map +1 -1
- package/models/operations/deploymentstream.d.ts +9 -11
- package/models/operations/deploymentstream.d.ts.map +1 -1
- package/models/operations/deploymentstream.js +9 -11
- package/models/operations/deploymentstream.js.map +1 -1
- package/models/operations/fileget.js +2 -2
- package/models/operations/filelist.js +2 -2
- package/models/operations/fileupload.js +2 -2
- package/models/operations/getallprompts.d.ts +9 -11
- package/models/operations/getallprompts.d.ts.map +1 -1
- package/models/operations/getallprompts.js +9 -11
- package/models/operations/getallprompts.js.map +1 -1
- package/models/operations/getalltools.js +12 -12
- package/models/operations/getbudget.js +2 -2
- package/models/operations/getevals.js +28 -28
- package/models/operations/getoneprompt.d.ts +9 -11
- package/models/operations/getoneprompt.d.ts.map +1 -1
- package/models/operations/getoneprompt.js +9 -11
- package/models/operations/getoneprompt.js.map +1 -1
- package/models/operations/getpromptversion.d.ts +9 -11
- package/models/operations/getpromptversion.d.ts.map +1 -1
- package/models/operations/getpromptversion.js +9 -11
- package/models/operations/getpromptversion.js.map +1 -1
- package/models/operations/invokeagent.d.ts +63 -283
- package/models/operations/invokeagent.d.ts.map +1 -1
- package/models/operations/invokeagent.js +73 -293
- package/models/operations/invokeagent.js.map +1 -1
- package/models/operations/listbudgets.js +2 -2
- package/models/operations/listcontacts.js +2 -2
- package/models/operations/listdatasetdatapoints.js +8 -8
- package/models/operations/listdatasets.js +2 -2
- package/models/operations/listdatasources.js +2 -2
- package/models/operations/listpromptversions.d.ts +9 -11
- package/models/operations/listpromptversions.d.ts.map +1 -1
- package/models/operations/listpromptversions.js +9 -11
- package/models/operations/listpromptversions.js.map +1 -1
- package/models/operations/retrievecontact.js +2 -2
- package/models/operations/retrievedatapoint.js +8 -8
- package/models/operations/retrievedataset.js +2 -2
- package/models/operations/retrievedatasource.js +2 -2
- package/models/operations/retrievetool.js +12 -12
- package/models/operations/runagent.d.ts +59 -279
- package/models/operations/runagent.d.ts.map +1 -1
- package/models/operations/runagent.js +72 -292
- package/models/operations/runagent.js.map +1 -1
- package/models/operations/streamagent.d.ts +212 -1003
- package/models/operations/streamagent.d.ts.map +1 -1
- package/models/operations/streamagent.js +227 -1017
- package/models/operations/streamagent.js.map +1 -1
- package/models/operations/streamrunagent.d.ts +215 -1006
- package/models/operations/streamrunagent.d.ts.map +1 -1
- package/models/operations/streamrunagent.js +236 -1026
- package/models/operations/streamrunagent.js.map +1 -1
- package/models/operations/updatebudget.js +2 -2
- package/models/operations/updatecontact.js +2 -2
- package/models/operations/updatedatapoint.js +8 -8
- package/models/operations/updatedataset.js +2 -2
- package/models/operations/updatedatasource.js +2 -2
- package/models/operations/updateeval.js +28 -28
- package/models/operations/updatememorystore.d.ts +9 -20
- package/models/operations/updatememorystore.d.ts.map +1 -1
- package/models/operations/updatememorystore.js +9 -14
- package/models/operations/updatememorystore.js.map +1 -1
- package/models/operations/updateprompt.d.ts +18 -22
- package/models/operations/updateprompt.d.ts.map +1 -1
- package/models/operations/updateprompt.js +18 -22
- package/models/operations/updateprompt.js.map +1 -1
- package/models/operations/updatetool.js +14 -14
- package/package.json +1 -1
- package/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/components/datapart.ts +71 -0
- package/src/models/components/filepart.ts +231 -0
- package/src/models/components/index.ts +5 -0
- package/src/models/components/invokedeploymentrequest.ts +34 -25
- package/src/models/components/textpart.ts +68 -0
- package/src/models/components/toolcallpart.ts +92 -0
- package/src/models/components/toolresultpart.ts +86 -0
- package/src/models/operations/createagentresponserequest.ts +188 -95
- package/src/models/operations/createbudget.ts +2 -2
- package/src/models/operations/createcontact.ts +2 -2
- package/src/models/operations/createdataset.ts +2 -2
- package/src/models/operations/createdatasetitem.ts +8 -8
- package/src/models/operations/createdatasource.ts +2 -2
- package/src/models/operations/createeval.ts +28 -28
- package/src/models/operations/createprompt.ts +9 -11
- package/src/models/operations/createtool.ts +12 -12
- package/src/models/operations/deploymentinvoke.ts +9 -11
- package/src/models/operations/deployments.ts +9 -11
- package/src/models/operations/deploymentstream.ts +9 -11
- package/src/models/operations/fileget.ts +2 -2
- package/src/models/operations/filelist.ts +2 -2
- package/src/models/operations/fileupload.ts +2 -2
- package/src/models/operations/getallprompts.ts +9 -11
- package/src/models/operations/getalltools.ts +12 -12
- package/src/models/operations/getbudget.ts +2 -2
- package/src/models/operations/getevals.ts +28 -28
- package/src/models/operations/getoneprompt.ts +9 -11
- package/src/models/operations/getpromptversion.ts +9 -11
- package/src/models/operations/invokeagent.ts +158 -682
- package/src/models/operations/listbudgets.ts +2 -2
- package/src/models/operations/listcontacts.ts +2 -2
- package/src/models/operations/listdatasetdatapoints.ts +8 -8
- package/src/models/operations/listdatasets.ts +2 -2
- package/src/models/operations/listdatasources.ts +2 -2
- package/src/models/operations/listpromptversions.ts +9 -11
- package/src/models/operations/retrievecontact.ts +2 -2
- package/src/models/operations/retrievedatapoint.ts +8 -8
- package/src/models/operations/retrievedataset.ts +2 -2
- package/src/models/operations/retrievedatasource.ts +2 -2
- package/src/models/operations/retrievetool.ts +12 -12
- package/src/models/operations/runagent.ts +143 -697
- package/src/models/operations/streamagent.ts +2222 -4559
- package/src/models/operations/streamrunagent.ts +2189 -4615
- package/src/models/operations/updatebudget.ts +2 -2
- package/src/models/operations/updatecontact.ts +2 -2
- package/src/models/operations/updatedatapoint.ts +8 -8
- package/src/models/operations/updatedataset.ts +2 -2
- package/src/models/operations/updatedatasource.ts +2 -2
- package/src/models/operations/updateeval.ts +28 -28
- package/src/models/operations/updatememorystore.ts +9 -20
- package/src/models/operations/updateprompt.ts +18 -22
- package/src/models/operations/updatetool.ts +14 -14
|
@@ -10,6 +10,7 @@ import {
|
|
|
10
10
|
} from "../../lib/schemas.js";
|
|
11
11
|
import { ClosedEnum } from "../../types/enums.js";
|
|
12
12
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
13
|
+
import * as components from "../components/index.js";
|
|
13
14
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
14
15
|
|
|
15
16
|
/**
|
|
@@ -773,28 +774,28 @@ export type RunAgentRoleUserMessage = ClosedEnum<
|
|
|
773
774
|
*/
|
|
774
775
|
export type RunAgentRole = RunAgentRoleUserMessage | RunAgentRoleToolMessage;
|
|
775
776
|
|
|
776
|
-
export const
|
|
777
|
+
export const RunAgentPublicMessagePartAgentsKind = {
|
|
777
778
|
ToolResult: "tool_result",
|
|
778
779
|
} as const;
|
|
779
|
-
export type
|
|
780
|
-
typeof
|
|
780
|
+
export type RunAgentPublicMessagePartAgentsKind = ClosedEnum<
|
|
781
|
+
typeof RunAgentPublicMessagePartAgentsKind
|
|
781
782
|
>;
|
|
782
783
|
|
|
783
784
|
/**
|
|
784
785
|
* Tool execution result part. Use this ONLY when providing results for a pending tool call from the agent. The tool_call_id must match the ID from the agent's tool call request.
|
|
785
786
|
*/
|
|
786
787
|
export type RunAgentPublicMessagePartToolResultPart = {
|
|
787
|
-
kind:
|
|
788
|
+
kind: RunAgentPublicMessagePartAgentsKind;
|
|
788
789
|
toolCallId: string;
|
|
789
790
|
result?: any | undefined;
|
|
790
791
|
metadata?: { [k: string]: any } | undefined;
|
|
791
792
|
};
|
|
792
793
|
|
|
793
|
-
export const
|
|
794
|
+
export const RunAgentPublicMessagePartKind = {
|
|
794
795
|
File: "file",
|
|
795
796
|
} as const;
|
|
796
|
-
export type
|
|
797
|
-
typeof
|
|
797
|
+
export type RunAgentPublicMessagePartKind = ClosedEnum<
|
|
798
|
+
typeof RunAgentPublicMessagePartKind
|
|
798
799
|
>;
|
|
799
800
|
|
|
800
801
|
/**
|
|
@@ -841,31 +842,16 @@ export type RunAgentPublicMessagePartFile =
|
|
|
841
842
|
* File attachment part. Use this to send files (images, documents, etc.) to the agent for processing.
|
|
842
843
|
*/
|
|
843
844
|
export type RunAgentPublicMessagePartFilePart = {
|
|
844
|
-
kind:
|
|
845
|
+
kind: RunAgentPublicMessagePartKind;
|
|
845
846
|
file: RunAgentFileBinaryFormat | RunAgentFileFileInURIFormat;
|
|
846
847
|
metadata?: { [k: string]: any } | undefined;
|
|
847
848
|
};
|
|
848
849
|
|
|
849
|
-
export const RunAgentPublicMessagePartKind = {
|
|
850
|
-
Text: "text",
|
|
851
|
-
} as const;
|
|
852
|
-
export type RunAgentPublicMessagePartKind = ClosedEnum<
|
|
853
|
-
typeof RunAgentPublicMessagePartKind
|
|
854
|
-
>;
|
|
855
|
-
|
|
856
|
-
/**
|
|
857
|
-
* Text content part. Use this to send text messages to the agent.
|
|
858
|
-
*/
|
|
859
|
-
export type RunAgentPublicMessagePartTextPart = {
|
|
860
|
-
kind: RunAgentPublicMessagePartKind;
|
|
861
|
-
text: string;
|
|
862
|
-
};
|
|
863
|
-
|
|
864
850
|
/**
|
|
865
851
|
* Message part that can be provided by users. Use "text" for regular messages, "file" for attachments, or "tool_result" when responding to tool call requests.
|
|
866
852
|
*/
|
|
867
853
|
export type RunAgentPublicMessagePart =
|
|
868
|
-
|
|
|
854
|
+
| components.TextPart
|
|
869
855
|
| RunAgentPublicMessagePartFilePart
|
|
870
856
|
| RunAgentPublicMessagePartToolResultPart;
|
|
871
857
|
|
|
@@ -885,7 +871,7 @@ export type RunAgentA2AMessage = {
|
|
|
885
871
|
* A2A message parts (text, file, or tool_result only)
|
|
886
872
|
*/
|
|
887
873
|
parts: Array<
|
|
888
|
-
|
|
|
874
|
+
| components.TextPart
|
|
889
875
|
| RunAgentPublicMessagePartFilePart
|
|
890
876
|
| RunAgentPublicMessagePartToolResultPart
|
|
891
877
|
>;
|
|
@@ -1809,132 +1795,12 @@ export type RunAgentExtendedMessageRole = ClosedEnum<
|
|
|
1809
1795
|
typeof RunAgentExtendedMessageRole
|
|
1810
1796
|
>;
|
|
1811
1797
|
|
|
1812
|
-
export const RunAgentPartsAgentsResponse200ApplicationJSONKind = {
|
|
1813
|
-
ToolResult: "tool_result",
|
|
1814
|
-
} as const;
|
|
1815
|
-
export type RunAgentPartsAgentsResponse200ApplicationJSONKind = ClosedEnum<
|
|
1816
|
-
typeof RunAgentPartsAgentsResponse200ApplicationJSONKind
|
|
1817
|
-
>;
|
|
1818
|
-
|
|
1819
|
-
/**
|
|
1820
|
-
* The result of a tool execution. Contains the tool call ID for correlation and the result data from the tool invocation.
|
|
1821
|
-
*/
|
|
1822
|
-
export type RunAgentPartsToolResultPart = {
|
|
1823
|
-
kind: RunAgentPartsAgentsResponse200ApplicationJSONKind;
|
|
1824
|
-
toolCallId: string;
|
|
1825
|
-
result?: any | undefined;
|
|
1826
|
-
metadata?: { [k: string]: any } | undefined;
|
|
1827
|
-
};
|
|
1828
|
-
|
|
1829
|
-
export const RunAgentPartsAgentsResponse200Kind = {
|
|
1830
|
-
ToolCall: "tool_call",
|
|
1831
|
-
} as const;
|
|
1832
|
-
export type RunAgentPartsAgentsResponse200Kind = ClosedEnum<
|
|
1833
|
-
typeof RunAgentPartsAgentsResponse200Kind
|
|
1834
|
-
>;
|
|
1835
|
-
|
|
1836
|
-
/**
|
|
1837
|
-
* A tool invocation request from an agent. Contains the tool name, unique call ID, and arguments for the tool execution.
|
|
1838
|
-
*/
|
|
1839
|
-
export type PartsToolCallPart = {
|
|
1840
|
-
kind: RunAgentPartsAgentsResponse200Kind;
|
|
1841
|
-
toolName: string;
|
|
1842
|
-
toolCallId: string;
|
|
1843
|
-
arguments: { [k: string]: any };
|
|
1844
|
-
metadata?: { [k: string]: any } | undefined;
|
|
1845
|
-
};
|
|
1846
|
-
|
|
1847
|
-
export const RunAgentPartsAgentsResponseKind = {
|
|
1848
|
-
File: "file",
|
|
1849
|
-
} as const;
|
|
1850
|
-
export type RunAgentPartsAgentsResponseKind = ClosedEnum<
|
|
1851
|
-
typeof RunAgentPartsAgentsResponseKind
|
|
1852
|
-
>;
|
|
1853
|
-
|
|
1854
|
-
/**
|
|
1855
|
-
* File in URI format. Check in the model's documentation for the supported mime types for the URI format
|
|
1856
|
-
*/
|
|
1857
|
-
export type RunAgentFileAgentsFileInURIFormat = {
|
|
1858
|
-
/**
|
|
1859
|
-
* URL for the File content
|
|
1860
|
-
*/
|
|
1861
|
-
uri: string;
|
|
1862
|
-
/**
|
|
1863
|
-
* Optional mimeType for the file
|
|
1864
|
-
*/
|
|
1865
|
-
mimeType?: string | undefined;
|
|
1866
|
-
/**
|
|
1867
|
-
* Optional name for the file
|
|
1868
|
-
*/
|
|
1869
|
-
name?: string | undefined;
|
|
1870
|
-
};
|
|
1871
|
-
|
|
1872
|
-
/**
|
|
1873
|
-
* Binary in base64 format. Check in the model's documentation for the supported mime types for the binary format.
|
|
1874
|
-
*/
|
|
1875
|
-
export type RunAgentFileAgentsBinaryFormat = {
|
|
1876
|
-
/**
|
|
1877
|
-
* base64 encoded content of the file
|
|
1878
|
-
*/
|
|
1879
|
-
bytes: string;
|
|
1880
|
-
/**
|
|
1881
|
-
* Optional mimeType for the file
|
|
1882
|
-
*/
|
|
1883
|
-
mimeType?: string | undefined;
|
|
1884
|
-
/**
|
|
1885
|
-
* Optional name for the file
|
|
1886
|
-
*/
|
|
1887
|
-
name?: string | undefined;
|
|
1888
|
-
};
|
|
1889
|
-
|
|
1890
|
-
export type RunAgentPartsFile =
|
|
1891
|
-
| RunAgentFileAgentsBinaryFormat
|
|
1892
|
-
| RunAgentFileAgentsFileInURIFormat;
|
|
1893
|
-
|
|
1894
|
-
/**
|
|
1895
|
-
* 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.
|
|
1896
|
-
*/
|
|
1897
|
-
export type RunAgentPartsFilePart = {
|
|
1898
|
-
kind: RunAgentPartsAgentsResponseKind;
|
|
1899
|
-
file: RunAgentFileAgentsBinaryFormat | RunAgentFileAgentsFileInURIFormat;
|
|
1900
|
-
metadata?: { [k: string]: any } | undefined;
|
|
1901
|
-
};
|
|
1902
|
-
|
|
1903
|
-
export const RunAgentPartsAgentsKind = {
|
|
1904
|
-
Data: "data",
|
|
1905
|
-
} as const;
|
|
1906
|
-
export type RunAgentPartsAgentsKind = ClosedEnum<
|
|
1907
|
-
typeof RunAgentPartsAgentsKind
|
|
1908
|
-
>;
|
|
1909
|
-
|
|
1910
|
-
/**
|
|
1911
|
-
* A structured data part containing JSON-serializable key-value pairs. Used for passing structured information between agents and tools.
|
|
1912
|
-
*/
|
|
1913
|
-
export type PartsDataPart = {
|
|
1914
|
-
kind: RunAgentPartsAgentsKind;
|
|
1915
|
-
data: { [k: string]: any };
|
|
1916
|
-
metadata?: { [k: string]: any } | undefined;
|
|
1917
|
-
};
|
|
1918
|
-
|
|
1919
|
-
export const RunAgentPartsKind = {
|
|
1920
|
-
Text: "text",
|
|
1921
|
-
} as const;
|
|
1922
|
-
export type RunAgentPartsKind = ClosedEnum<typeof RunAgentPartsKind>;
|
|
1923
|
-
|
|
1924
|
-
/**
|
|
1925
|
-
* A text content part containing plain text or markdown. Used for agent messages, user input, and text-based responses.
|
|
1926
|
-
*/
|
|
1927
|
-
export type RunAgentPartsTextPart = {
|
|
1928
|
-
kind: RunAgentPartsKind;
|
|
1929
|
-
text: string;
|
|
1930
|
-
};
|
|
1931
|
-
|
|
1932
1798
|
export type RunAgentParts =
|
|
1933
|
-
|
|
|
1934
|
-
|
|
|
1935
|
-
|
|
|
1936
|
-
|
|
|
1937
|
-
|
|
|
1799
|
+
| (components.ToolCallPart & { kind: "tool_call" })
|
|
1800
|
+
| (components.TextPart & { kind: "text" })
|
|
1801
|
+
| (components.DataPart & { kind: "data" })
|
|
1802
|
+
| (components.FilePart & { kind: "file" })
|
|
1803
|
+
| (components.ToolResultPart & { kind: "tool_result" });
|
|
1938
1804
|
|
|
1939
1805
|
/**
|
|
1940
1806
|
* Optional A2A message providing additional context about the current status
|
|
@@ -1947,11 +1813,11 @@ export type RunAgentTaskStatusMessage = {
|
|
|
1947
1813
|
*/
|
|
1948
1814
|
role: RunAgentExtendedMessageRole;
|
|
1949
1815
|
parts: Array<
|
|
1950
|
-
|
|
|
1951
|
-
|
|
|
1952
|
-
|
|
|
1953
|
-
|
|
|
1954
|
-
|
|
|
1816
|
+
| (components.ToolCallPart & { kind: "tool_call" })
|
|
1817
|
+
| (components.TextPart & { kind: "text" })
|
|
1818
|
+
| (components.DataPart & { kind: "data" })
|
|
1819
|
+
| (components.FilePart & { kind: "file" })
|
|
1820
|
+
| (components.ToolResultPart & { kind: "tool_result" })
|
|
1955
1821
|
>;
|
|
1956
1822
|
};
|
|
1957
1823
|
|
|
@@ -4009,13 +3875,13 @@ export function runAgentRoleFromJSON(
|
|
|
4009
3875
|
}
|
|
4010
3876
|
|
|
4011
3877
|
/** @internal */
|
|
4012
|
-
export const
|
|
4013
|
-
|
|
4014
|
-
|
|
3878
|
+
export const RunAgentPublicMessagePartAgentsKind$inboundSchema: z.ZodNativeEnum<
|
|
3879
|
+
typeof RunAgentPublicMessagePartAgentsKind
|
|
3880
|
+
> = z.nativeEnum(RunAgentPublicMessagePartAgentsKind);
|
|
4015
3881
|
/** @internal */
|
|
4016
|
-
export const
|
|
4017
|
-
z.ZodNativeEnum<typeof
|
|
4018
|
-
|
|
3882
|
+
export const RunAgentPublicMessagePartAgentsKind$outboundSchema:
|
|
3883
|
+
z.ZodNativeEnum<typeof RunAgentPublicMessagePartAgentsKind> =
|
|
3884
|
+
RunAgentPublicMessagePartAgentsKind$inboundSchema;
|
|
4019
3885
|
|
|
4020
3886
|
/** @internal */
|
|
4021
3887
|
export const RunAgentPublicMessagePartToolResultPart$inboundSchema: z.ZodType<
|
|
@@ -4023,7 +3889,7 @@ export const RunAgentPublicMessagePartToolResultPart$inboundSchema: z.ZodType<
|
|
|
4023
3889
|
z.ZodTypeDef,
|
|
4024
3890
|
unknown
|
|
4025
3891
|
> = z.object({
|
|
4026
|
-
kind:
|
|
3892
|
+
kind: RunAgentPublicMessagePartAgentsKind$inboundSchema,
|
|
4027
3893
|
tool_call_id: z.string(),
|
|
4028
3894
|
result: z.any().optional(),
|
|
4029
3895
|
metadata: z.record(z.any()).optional(),
|
|
@@ -4046,7 +3912,7 @@ export const RunAgentPublicMessagePartToolResultPart$outboundSchema: z.ZodType<
|
|
|
4046
3912
|
z.ZodTypeDef,
|
|
4047
3913
|
RunAgentPublicMessagePartToolResultPart
|
|
4048
3914
|
> = z.object({
|
|
4049
|
-
kind:
|
|
3915
|
+
kind: RunAgentPublicMessagePartAgentsKind$outboundSchema,
|
|
4050
3916
|
toolCallId: z.string(),
|
|
4051
3917
|
result: z.any().optional(),
|
|
4052
3918
|
metadata: z.record(z.any()).optional(),
|
|
@@ -4083,13 +3949,13 @@ export function runAgentPublicMessagePartToolResultPartFromJSON(
|
|
|
4083
3949
|
}
|
|
4084
3950
|
|
|
4085
3951
|
/** @internal */
|
|
4086
|
-
export const
|
|
4087
|
-
typeof
|
|
4088
|
-
> = z.nativeEnum(
|
|
3952
|
+
export const RunAgentPublicMessagePartKind$inboundSchema: z.ZodNativeEnum<
|
|
3953
|
+
typeof RunAgentPublicMessagePartKind
|
|
3954
|
+
> = z.nativeEnum(RunAgentPublicMessagePartKind);
|
|
4089
3955
|
/** @internal */
|
|
4090
|
-
export const
|
|
4091
|
-
|
|
4092
|
-
|
|
3956
|
+
export const RunAgentPublicMessagePartKind$outboundSchema: z.ZodNativeEnum<
|
|
3957
|
+
typeof RunAgentPublicMessagePartKind
|
|
3958
|
+
> = RunAgentPublicMessagePartKind$inboundSchema;
|
|
4093
3959
|
|
|
4094
3960
|
/** @internal */
|
|
4095
3961
|
export const RunAgentFileFileInURIFormat$inboundSchema: z.ZodType<
|
|
@@ -4232,7 +4098,7 @@ export const RunAgentPublicMessagePartFilePart$inboundSchema: z.ZodType<
|
|
|
4232
4098
|
z.ZodTypeDef,
|
|
4233
4099
|
unknown
|
|
4234
4100
|
> = z.object({
|
|
4235
|
-
kind:
|
|
4101
|
+
kind: RunAgentPublicMessagePartKind$inboundSchema,
|
|
4236
4102
|
file: z.union([
|
|
4237
4103
|
z.lazy(() => RunAgentFileBinaryFormat$inboundSchema),
|
|
4238
4104
|
z.lazy(() => RunAgentFileFileInURIFormat$inboundSchema),
|
|
@@ -4254,7 +4120,7 @@ export const RunAgentPublicMessagePartFilePart$outboundSchema: z.ZodType<
|
|
|
4254
4120
|
z.ZodTypeDef,
|
|
4255
4121
|
RunAgentPublicMessagePartFilePart
|
|
4256
4122
|
> = z.object({
|
|
4257
|
-
kind:
|
|
4123
|
+
kind: RunAgentPublicMessagePartKind$outboundSchema,
|
|
4258
4124
|
file: z.union([
|
|
4259
4125
|
z.lazy(() => RunAgentFileBinaryFormat$outboundSchema),
|
|
4260
4126
|
z.lazy(() => RunAgentFileFileInURIFormat$outboundSchema),
|
|
@@ -4281,72 +4147,19 @@ export function runAgentPublicMessagePartFilePartFromJSON(
|
|
|
4281
4147
|
);
|
|
4282
4148
|
}
|
|
4283
4149
|
|
|
4284
|
-
/** @internal */
|
|
4285
|
-
export const RunAgentPublicMessagePartKind$inboundSchema: z.ZodNativeEnum<
|
|
4286
|
-
typeof RunAgentPublicMessagePartKind
|
|
4287
|
-
> = z.nativeEnum(RunAgentPublicMessagePartKind);
|
|
4288
|
-
/** @internal */
|
|
4289
|
-
export const RunAgentPublicMessagePartKind$outboundSchema: z.ZodNativeEnum<
|
|
4290
|
-
typeof RunAgentPublicMessagePartKind
|
|
4291
|
-
> = RunAgentPublicMessagePartKind$inboundSchema;
|
|
4292
|
-
|
|
4293
|
-
/** @internal */
|
|
4294
|
-
export const RunAgentPublicMessagePartTextPart$inboundSchema: z.ZodType<
|
|
4295
|
-
RunAgentPublicMessagePartTextPart,
|
|
4296
|
-
z.ZodTypeDef,
|
|
4297
|
-
unknown
|
|
4298
|
-
> = z.object({
|
|
4299
|
-
kind: RunAgentPublicMessagePartKind$inboundSchema,
|
|
4300
|
-
text: z.string(),
|
|
4301
|
-
});
|
|
4302
|
-
/** @internal */
|
|
4303
|
-
export type RunAgentPublicMessagePartTextPart$Outbound = {
|
|
4304
|
-
kind: string;
|
|
4305
|
-
text: string;
|
|
4306
|
-
};
|
|
4307
|
-
|
|
4308
|
-
/** @internal */
|
|
4309
|
-
export const RunAgentPublicMessagePartTextPart$outboundSchema: z.ZodType<
|
|
4310
|
-
RunAgentPublicMessagePartTextPart$Outbound,
|
|
4311
|
-
z.ZodTypeDef,
|
|
4312
|
-
RunAgentPublicMessagePartTextPart
|
|
4313
|
-
> = z.object({
|
|
4314
|
-
kind: RunAgentPublicMessagePartKind$outboundSchema,
|
|
4315
|
-
text: z.string(),
|
|
4316
|
-
});
|
|
4317
|
-
|
|
4318
|
-
export function runAgentPublicMessagePartTextPartToJSON(
|
|
4319
|
-
runAgentPublicMessagePartTextPart: RunAgentPublicMessagePartTextPart,
|
|
4320
|
-
): string {
|
|
4321
|
-
return JSON.stringify(
|
|
4322
|
-
RunAgentPublicMessagePartTextPart$outboundSchema.parse(
|
|
4323
|
-
runAgentPublicMessagePartTextPart,
|
|
4324
|
-
),
|
|
4325
|
-
);
|
|
4326
|
-
}
|
|
4327
|
-
export function runAgentPublicMessagePartTextPartFromJSON(
|
|
4328
|
-
jsonString: string,
|
|
4329
|
-
): SafeParseResult<RunAgentPublicMessagePartTextPart, SDKValidationError> {
|
|
4330
|
-
return safeParse(
|
|
4331
|
-
jsonString,
|
|
4332
|
-
(x) => RunAgentPublicMessagePartTextPart$inboundSchema.parse(JSON.parse(x)),
|
|
4333
|
-
`Failed to parse 'RunAgentPublicMessagePartTextPart' from JSON`,
|
|
4334
|
-
);
|
|
4335
|
-
}
|
|
4336
|
-
|
|
4337
4150
|
/** @internal */
|
|
4338
4151
|
export const RunAgentPublicMessagePart$inboundSchema: z.ZodType<
|
|
4339
4152
|
RunAgentPublicMessagePart,
|
|
4340
4153
|
z.ZodTypeDef,
|
|
4341
4154
|
unknown
|
|
4342
4155
|
> = z.union([
|
|
4343
|
-
|
|
4156
|
+
components.TextPart$inboundSchema,
|
|
4344
4157
|
z.lazy(() => RunAgentPublicMessagePartFilePart$inboundSchema),
|
|
4345
4158
|
z.lazy(() => RunAgentPublicMessagePartToolResultPart$inboundSchema),
|
|
4346
4159
|
]);
|
|
4347
4160
|
/** @internal */
|
|
4348
4161
|
export type RunAgentPublicMessagePart$Outbound =
|
|
4349
|
-
|
|
|
4162
|
+
| components.TextPart$Outbound
|
|
4350
4163
|
| RunAgentPublicMessagePartFilePart$Outbound
|
|
4351
4164
|
| RunAgentPublicMessagePartToolResultPart$Outbound;
|
|
4352
4165
|
|
|
@@ -4356,7 +4169,7 @@ export const RunAgentPublicMessagePart$outboundSchema: z.ZodType<
|
|
|
4356
4169
|
z.ZodTypeDef,
|
|
4357
4170
|
RunAgentPublicMessagePart
|
|
4358
4171
|
> = z.union([
|
|
4359
|
-
|
|
4172
|
+
components.TextPart$outboundSchema,
|
|
4360
4173
|
z.lazy(() => RunAgentPublicMessagePartFilePart$outboundSchema),
|
|
4361
4174
|
z.lazy(() => RunAgentPublicMessagePartToolResultPart$outboundSchema),
|
|
4362
4175
|
]);
|
|
@@ -4391,7 +4204,7 @@ export const RunAgentA2AMessage$inboundSchema: z.ZodType<
|
|
|
4391
4204
|
]),
|
|
4392
4205
|
parts: z.array(
|
|
4393
4206
|
z.union([
|
|
4394
|
-
|
|
4207
|
+
components.TextPart$inboundSchema,
|
|
4395
4208
|
z.lazy(() => RunAgentPublicMessagePartFilePart$inboundSchema),
|
|
4396
4209
|
z.lazy(() => RunAgentPublicMessagePartToolResultPart$inboundSchema),
|
|
4397
4210
|
]),
|
|
@@ -4402,7 +4215,7 @@ export type RunAgentA2AMessage$Outbound = {
|
|
|
4402
4215
|
messageId?: string | undefined;
|
|
4403
4216
|
role: string | string;
|
|
4404
4217
|
parts: Array<
|
|
4405
|
-
|
|
|
4218
|
+
| components.TextPart$Outbound
|
|
4406
4219
|
| RunAgentPublicMessagePartFilePart$Outbound
|
|
4407
4220
|
| RunAgentPublicMessagePartToolResultPart$Outbound
|
|
4408
4221
|
>;
|
|
@@ -4421,7 +4234,7 @@ export const RunAgentA2AMessage$outboundSchema: z.ZodType<
|
|
|
4421
4234
|
]),
|
|
4422
4235
|
parts: z.array(
|
|
4423
4236
|
z.union([
|
|
4424
|
-
|
|
4237
|
+
components.TextPart$outboundSchema,
|
|
4425
4238
|
z.lazy(() => RunAgentPublicMessagePartFilePart$outboundSchema),
|
|
4426
4239
|
z.lazy(() => RunAgentPublicMessagePartToolResultPart$outboundSchema),
|
|
4427
4240
|
]),
|
|
@@ -4790,7 +4603,7 @@ export function schemaFromJSON(
|
|
|
4790
4603
|
/** @internal */
|
|
4791
4604
|
export const Tools$inboundSchema: z.ZodType<Tools, z.ZodTypeDef, unknown> = z
|
|
4792
4605
|
.object({
|
|
4793
|
-
id: z.string().default("
|
|
4606
|
+
id: z.string().default("01KAXGPSKKRBSE57K4PEH7FGJD"),
|
|
4794
4607
|
name: z.string(),
|
|
4795
4608
|
description: z.string().optional(),
|
|
4796
4609
|
schema: z.lazy(() => Schema$inboundSchema),
|
|
@@ -4809,7 +4622,7 @@ export const Tools$outboundSchema: z.ZodType<
|
|
|
4809
4622
|
z.ZodTypeDef,
|
|
4810
4623
|
Tools
|
|
4811
4624
|
> = z.object({
|
|
4812
|
-
id: z.string().default("
|
|
4625
|
+
id: z.string().default("01KAXGPSKKRBSE57K4PEH7FGJD"),
|
|
4813
4626
|
name: z.string(),
|
|
4814
4627
|
description: z.string().optional(),
|
|
4815
4628
|
schema: z.lazy(() => Schema$outboundSchema),
|
|
@@ -6965,460 +6778,39 @@ export const RunAgentExtendedMessageRole$outboundSchema: z.ZodNativeEnum<
|
|
|
6965
6778
|
typeof RunAgentExtendedMessageRole
|
|
6966
6779
|
> = RunAgentExtendedMessageRole$inboundSchema;
|
|
6967
6780
|
|
|
6968
|
-
/** @internal */
|
|
6969
|
-
export const RunAgentPartsAgentsResponse200ApplicationJSONKind$inboundSchema:
|
|
6970
|
-
z.ZodNativeEnum<typeof RunAgentPartsAgentsResponse200ApplicationJSONKind> = z
|
|
6971
|
-
.nativeEnum(RunAgentPartsAgentsResponse200ApplicationJSONKind);
|
|
6972
|
-
/** @internal */
|
|
6973
|
-
export const RunAgentPartsAgentsResponse200ApplicationJSONKind$outboundSchema:
|
|
6974
|
-
z.ZodNativeEnum<typeof RunAgentPartsAgentsResponse200ApplicationJSONKind> =
|
|
6975
|
-
RunAgentPartsAgentsResponse200ApplicationJSONKind$inboundSchema;
|
|
6976
|
-
|
|
6977
|
-
/** @internal */
|
|
6978
|
-
export const RunAgentPartsToolResultPart$inboundSchema: z.ZodType<
|
|
6979
|
-
RunAgentPartsToolResultPart,
|
|
6980
|
-
z.ZodTypeDef,
|
|
6981
|
-
unknown
|
|
6982
|
-
> = z.object({
|
|
6983
|
-
kind: RunAgentPartsAgentsResponse200ApplicationJSONKind$inboundSchema,
|
|
6984
|
-
tool_call_id: z.string(),
|
|
6985
|
-
result: z.any().optional(),
|
|
6986
|
-
metadata: z.record(z.any()).optional(),
|
|
6987
|
-
}).transform((v) => {
|
|
6988
|
-
return remap$(v, {
|
|
6989
|
-
"tool_call_id": "toolCallId",
|
|
6990
|
-
});
|
|
6991
|
-
});
|
|
6992
|
-
/** @internal */
|
|
6993
|
-
export type RunAgentPartsToolResultPart$Outbound = {
|
|
6994
|
-
kind: string;
|
|
6995
|
-
tool_call_id: string;
|
|
6996
|
-
result?: any | undefined;
|
|
6997
|
-
metadata?: { [k: string]: any } | undefined;
|
|
6998
|
-
};
|
|
6999
|
-
|
|
7000
|
-
/** @internal */
|
|
7001
|
-
export const RunAgentPartsToolResultPart$outboundSchema: z.ZodType<
|
|
7002
|
-
RunAgentPartsToolResultPart$Outbound,
|
|
7003
|
-
z.ZodTypeDef,
|
|
7004
|
-
RunAgentPartsToolResultPart
|
|
7005
|
-
> = z.object({
|
|
7006
|
-
kind: RunAgentPartsAgentsResponse200ApplicationJSONKind$outboundSchema,
|
|
7007
|
-
toolCallId: z.string(),
|
|
7008
|
-
result: z.any().optional(),
|
|
7009
|
-
metadata: z.record(z.any()).optional(),
|
|
7010
|
-
}).transform((v) => {
|
|
7011
|
-
return remap$(v, {
|
|
7012
|
-
toolCallId: "tool_call_id",
|
|
7013
|
-
});
|
|
7014
|
-
});
|
|
7015
|
-
|
|
7016
|
-
export function runAgentPartsToolResultPartToJSON(
|
|
7017
|
-
runAgentPartsToolResultPart: RunAgentPartsToolResultPart,
|
|
7018
|
-
): string {
|
|
7019
|
-
return JSON.stringify(
|
|
7020
|
-
RunAgentPartsToolResultPart$outboundSchema.parse(
|
|
7021
|
-
runAgentPartsToolResultPart,
|
|
7022
|
-
),
|
|
7023
|
-
);
|
|
7024
|
-
}
|
|
7025
|
-
export function runAgentPartsToolResultPartFromJSON(
|
|
7026
|
-
jsonString: string,
|
|
7027
|
-
): SafeParseResult<RunAgentPartsToolResultPart, SDKValidationError> {
|
|
7028
|
-
return safeParse(
|
|
7029
|
-
jsonString,
|
|
7030
|
-
(x) => RunAgentPartsToolResultPart$inboundSchema.parse(JSON.parse(x)),
|
|
7031
|
-
`Failed to parse 'RunAgentPartsToolResultPart' from JSON`,
|
|
7032
|
-
);
|
|
7033
|
-
}
|
|
7034
|
-
|
|
7035
|
-
/** @internal */
|
|
7036
|
-
export const RunAgentPartsAgentsResponse200Kind$inboundSchema: z.ZodNativeEnum<
|
|
7037
|
-
typeof RunAgentPartsAgentsResponse200Kind
|
|
7038
|
-
> = z.nativeEnum(RunAgentPartsAgentsResponse200Kind);
|
|
7039
|
-
/** @internal */
|
|
7040
|
-
export const RunAgentPartsAgentsResponse200Kind$outboundSchema: z.ZodNativeEnum<
|
|
7041
|
-
typeof RunAgentPartsAgentsResponse200Kind
|
|
7042
|
-
> = RunAgentPartsAgentsResponse200Kind$inboundSchema;
|
|
7043
|
-
|
|
7044
|
-
/** @internal */
|
|
7045
|
-
export const PartsToolCallPart$inboundSchema: z.ZodType<
|
|
7046
|
-
PartsToolCallPart,
|
|
7047
|
-
z.ZodTypeDef,
|
|
7048
|
-
unknown
|
|
7049
|
-
> = z.object({
|
|
7050
|
-
kind: RunAgentPartsAgentsResponse200Kind$inboundSchema,
|
|
7051
|
-
tool_name: z.string(),
|
|
7052
|
-
tool_call_id: z.string(),
|
|
7053
|
-
arguments: z.record(z.any()),
|
|
7054
|
-
metadata: z.record(z.any()).optional(),
|
|
7055
|
-
}).transform((v) => {
|
|
7056
|
-
return remap$(v, {
|
|
7057
|
-
"tool_name": "toolName",
|
|
7058
|
-
"tool_call_id": "toolCallId",
|
|
7059
|
-
});
|
|
7060
|
-
});
|
|
7061
|
-
/** @internal */
|
|
7062
|
-
export type PartsToolCallPart$Outbound = {
|
|
7063
|
-
kind: string;
|
|
7064
|
-
tool_name: string;
|
|
7065
|
-
tool_call_id: string;
|
|
7066
|
-
arguments: { [k: string]: any };
|
|
7067
|
-
metadata?: { [k: string]: any } | undefined;
|
|
7068
|
-
};
|
|
7069
|
-
|
|
7070
|
-
/** @internal */
|
|
7071
|
-
export const PartsToolCallPart$outboundSchema: z.ZodType<
|
|
7072
|
-
PartsToolCallPart$Outbound,
|
|
7073
|
-
z.ZodTypeDef,
|
|
7074
|
-
PartsToolCallPart
|
|
7075
|
-
> = z.object({
|
|
7076
|
-
kind: RunAgentPartsAgentsResponse200Kind$outboundSchema,
|
|
7077
|
-
toolName: z.string(),
|
|
7078
|
-
toolCallId: z.string(),
|
|
7079
|
-
arguments: z.record(z.any()),
|
|
7080
|
-
metadata: z.record(z.any()).optional(),
|
|
7081
|
-
}).transform((v) => {
|
|
7082
|
-
return remap$(v, {
|
|
7083
|
-
toolName: "tool_name",
|
|
7084
|
-
toolCallId: "tool_call_id",
|
|
7085
|
-
});
|
|
7086
|
-
});
|
|
7087
|
-
|
|
7088
|
-
export function partsToolCallPartToJSON(
|
|
7089
|
-
partsToolCallPart: PartsToolCallPart,
|
|
7090
|
-
): string {
|
|
7091
|
-
return JSON.stringify(
|
|
7092
|
-
PartsToolCallPart$outboundSchema.parse(partsToolCallPart),
|
|
7093
|
-
);
|
|
7094
|
-
}
|
|
7095
|
-
export function partsToolCallPartFromJSON(
|
|
7096
|
-
jsonString: string,
|
|
7097
|
-
): SafeParseResult<PartsToolCallPart, SDKValidationError> {
|
|
7098
|
-
return safeParse(
|
|
7099
|
-
jsonString,
|
|
7100
|
-
(x) => PartsToolCallPart$inboundSchema.parse(JSON.parse(x)),
|
|
7101
|
-
`Failed to parse 'PartsToolCallPart' from JSON`,
|
|
7102
|
-
);
|
|
7103
|
-
}
|
|
7104
|
-
|
|
7105
|
-
/** @internal */
|
|
7106
|
-
export const RunAgentPartsAgentsResponseKind$inboundSchema: z.ZodNativeEnum<
|
|
7107
|
-
typeof RunAgentPartsAgentsResponseKind
|
|
7108
|
-
> = z.nativeEnum(RunAgentPartsAgentsResponseKind);
|
|
7109
|
-
/** @internal */
|
|
7110
|
-
export const RunAgentPartsAgentsResponseKind$outboundSchema: z.ZodNativeEnum<
|
|
7111
|
-
typeof RunAgentPartsAgentsResponseKind
|
|
7112
|
-
> = RunAgentPartsAgentsResponseKind$inboundSchema;
|
|
7113
|
-
|
|
7114
|
-
/** @internal */
|
|
7115
|
-
export const RunAgentFileAgentsFileInURIFormat$inboundSchema: z.ZodType<
|
|
7116
|
-
RunAgentFileAgentsFileInURIFormat,
|
|
7117
|
-
z.ZodTypeDef,
|
|
7118
|
-
unknown
|
|
7119
|
-
> = z.object({
|
|
7120
|
-
uri: z.string(),
|
|
7121
|
-
mimeType: z.string().optional(),
|
|
7122
|
-
name: z.string().optional(),
|
|
7123
|
-
});
|
|
7124
|
-
/** @internal */
|
|
7125
|
-
export type RunAgentFileAgentsFileInURIFormat$Outbound = {
|
|
7126
|
-
uri: string;
|
|
7127
|
-
mimeType?: string | undefined;
|
|
7128
|
-
name?: string | undefined;
|
|
7129
|
-
};
|
|
7130
|
-
|
|
7131
|
-
/** @internal */
|
|
7132
|
-
export const RunAgentFileAgentsFileInURIFormat$outboundSchema: z.ZodType<
|
|
7133
|
-
RunAgentFileAgentsFileInURIFormat$Outbound,
|
|
7134
|
-
z.ZodTypeDef,
|
|
7135
|
-
RunAgentFileAgentsFileInURIFormat
|
|
7136
|
-
> = z.object({
|
|
7137
|
-
uri: z.string(),
|
|
7138
|
-
mimeType: z.string().optional(),
|
|
7139
|
-
name: z.string().optional(),
|
|
7140
|
-
});
|
|
7141
|
-
|
|
7142
|
-
export function runAgentFileAgentsFileInURIFormatToJSON(
|
|
7143
|
-
runAgentFileAgentsFileInURIFormat: RunAgentFileAgentsFileInURIFormat,
|
|
7144
|
-
): string {
|
|
7145
|
-
return JSON.stringify(
|
|
7146
|
-
RunAgentFileAgentsFileInURIFormat$outboundSchema.parse(
|
|
7147
|
-
runAgentFileAgentsFileInURIFormat,
|
|
7148
|
-
),
|
|
7149
|
-
);
|
|
7150
|
-
}
|
|
7151
|
-
export function runAgentFileAgentsFileInURIFormatFromJSON(
|
|
7152
|
-
jsonString: string,
|
|
7153
|
-
): SafeParseResult<RunAgentFileAgentsFileInURIFormat, SDKValidationError> {
|
|
7154
|
-
return safeParse(
|
|
7155
|
-
jsonString,
|
|
7156
|
-
(x) => RunAgentFileAgentsFileInURIFormat$inboundSchema.parse(JSON.parse(x)),
|
|
7157
|
-
`Failed to parse 'RunAgentFileAgentsFileInURIFormat' from JSON`,
|
|
7158
|
-
);
|
|
7159
|
-
}
|
|
7160
|
-
|
|
7161
|
-
/** @internal */
|
|
7162
|
-
export const RunAgentFileAgentsBinaryFormat$inboundSchema: z.ZodType<
|
|
7163
|
-
RunAgentFileAgentsBinaryFormat,
|
|
7164
|
-
z.ZodTypeDef,
|
|
7165
|
-
unknown
|
|
7166
|
-
> = z.object({
|
|
7167
|
-
bytes: z.string(),
|
|
7168
|
-
mimeType: z.string().optional(),
|
|
7169
|
-
name: z.string().optional(),
|
|
7170
|
-
});
|
|
7171
|
-
/** @internal */
|
|
7172
|
-
export type RunAgentFileAgentsBinaryFormat$Outbound = {
|
|
7173
|
-
bytes: string;
|
|
7174
|
-
mimeType?: string | undefined;
|
|
7175
|
-
name?: string | undefined;
|
|
7176
|
-
};
|
|
7177
|
-
|
|
7178
|
-
/** @internal */
|
|
7179
|
-
export const RunAgentFileAgentsBinaryFormat$outboundSchema: z.ZodType<
|
|
7180
|
-
RunAgentFileAgentsBinaryFormat$Outbound,
|
|
7181
|
-
z.ZodTypeDef,
|
|
7182
|
-
RunAgentFileAgentsBinaryFormat
|
|
7183
|
-
> = z.object({
|
|
7184
|
-
bytes: z.string(),
|
|
7185
|
-
mimeType: z.string().optional(),
|
|
7186
|
-
name: z.string().optional(),
|
|
7187
|
-
});
|
|
7188
|
-
|
|
7189
|
-
export function runAgentFileAgentsBinaryFormatToJSON(
|
|
7190
|
-
runAgentFileAgentsBinaryFormat: RunAgentFileAgentsBinaryFormat,
|
|
7191
|
-
): string {
|
|
7192
|
-
return JSON.stringify(
|
|
7193
|
-
RunAgentFileAgentsBinaryFormat$outboundSchema.parse(
|
|
7194
|
-
runAgentFileAgentsBinaryFormat,
|
|
7195
|
-
),
|
|
7196
|
-
);
|
|
7197
|
-
}
|
|
7198
|
-
export function runAgentFileAgentsBinaryFormatFromJSON(
|
|
7199
|
-
jsonString: string,
|
|
7200
|
-
): SafeParseResult<RunAgentFileAgentsBinaryFormat, SDKValidationError> {
|
|
7201
|
-
return safeParse(
|
|
7202
|
-
jsonString,
|
|
7203
|
-
(x) => RunAgentFileAgentsBinaryFormat$inboundSchema.parse(JSON.parse(x)),
|
|
7204
|
-
`Failed to parse 'RunAgentFileAgentsBinaryFormat' from JSON`,
|
|
7205
|
-
);
|
|
7206
|
-
}
|
|
7207
|
-
|
|
7208
|
-
/** @internal */
|
|
7209
|
-
export const RunAgentPartsFile$inboundSchema: z.ZodType<
|
|
7210
|
-
RunAgentPartsFile,
|
|
7211
|
-
z.ZodTypeDef,
|
|
7212
|
-
unknown
|
|
7213
|
-
> = z.union([
|
|
7214
|
-
z.lazy(() => RunAgentFileAgentsBinaryFormat$inboundSchema),
|
|
7215
|
-
z.lazy(() => RunAgentFileAgentsFileInURIFormat$inboundSchema),
|
|
7216
|
-
]);
|
|
7217
|
-
/** @internal */
|
|
7218
|
-
export type RunAgentPartsFile$Outbound =
|
|
7219
|
-
| RunAgentFileAgentsBinaryFormat$Outbound
|
|
7220
|
-
| RunAgentFileAgentsFileInURIFormat$Outbound;
|
|
7221
|
-
|
|
7222
|
-
/** @internal */
|
|
7223
|
-
export const RunAgentPartsFile$outboundSchema: z.ZodType<
|
|
7224
|
-
RunAgentPartsFile$Outbound,
|
|
7225
|
-
z.ZodTypeDef,
|
|
7226
|
-
RunAgentPartsFile
|
|
7227
|
-
> = z.union([
|
|
7228
|
-
z.lazy(() => RunAgentFileAgentsBinaryFormat$outboundSchema),
|
|
7229
|
-
z.lazy(() => RunAgentFileAgentsFileInURIFormat$outboundSchema),
|
|
7230
|
-
]);
|
|
7231
|
-
|
|
7232
|
-
export function runAgentPartsFileToJSON(
|
|
7233
|
-
runAgentPartsFile: RunAgentPartsFile,
|
|
7234
|
-
): string {
|
|
7235
|
-
return JSON.stringify(
|
|
7236
|
-
RunAgentPartsFile$outboundSchema.parse(runAgentPartsFile),
|
|
7237
|
-
);
|
|
7238
|
-
}
|
|
7239
|
-
export function runAgentPartsFileFromJSON(
|
|
7240
|
-
jsonString: string,
|
|
7241
|
-
): SafeParseResult<RunAgentPartsFile, SDKValidationError> {
|
|
7242
|
-
return safeParse(
|
|
7243
|
-
jsonString,
|
|
7244
|
-
(x) => RunAgentPartsFile$inboundSchema.parse(JSON.parse(x)),
|
|
7245
|
-
`Failed to parse 'RunAgentPartsFile' from JSON`,
|
|
7246
|
-
);
|
|
7247
|
-
}
|
|
7248
|
-
|
|
7249
|
-
/** @internal */
|
|
7250
|
-
export const RunAgentPartsFilePart$inboundSchema: z.ZodType<
|
|
7251
|
-
RunAgentPartsFilePart,
|
|
7252
|
-
z.ZodTypeDef,
|
|
7253
|
-
unknown
|
|
7254
|
-
> = z.object({
|
|
7255
|
-
kind: RunAgentPartsAgentsResponseKind$inboundSchema,
|
|
7256
|
-
file: z.union([
|
|
7257
|
-
z.lazy(() => RunAgentFileAgentsBinaryFormat$inboundSchema),
|
|
7258
|
-
z.lazy(() => RunAgentFileAgentsFileInURIFormat$inboundSchema),
|
|
7259
|
-
]),
|
|
7260
|
-
metadata: z.record(z.any()).optional(),
|
|
7261
|
-
});
|
|
7262
|
-
/** @internal */
|
|
7263
|
-
export type RunAgentPartsFilePart$Outbound = {
|
|
7264
|
-
kind: string;
|
|
7265
|
-
file:
|
|
7266
|
-
| RunAgentFileAgentsBinaryFormat$Outbound
|
|
7267
|
-
| RunAgentFileAgentsFileInURIFormat$Outbound;
|
|
7268
|
-
metadata?: { [k: string]: any } | undefined;
|
|
7269
|
-
};
|
|
7270
|
-
|
|
7271
|
-
/** @internal */
|
|
7272
|
-
export const RunAgentPartsFilePart$outboundSchema: z.ZodType<
|
|
7273
|
-
RunAgentPartsFilePart$Outbound,
|
|
7274
|
-
z.ZodTypeDef,
|
|
7275
|
-
RunAgentPartsFilePart
|
|
7276
|
-
> = z.object({
|
|
7277
|
-
kind: RunAgentPartsAgentsResponseKind$outboundSchema,
|
|
7278
|
-
file: z.union([
|
|
7279
|
-
z.lazy(() => RunAgentFileAgentsBinaryFormat$outboundSchema),
|
|
7280
|
-
z.lazy(() => RunAgentFileAgentsFileInURIFormat$outboundSchema),
|
|
7281
|
-
]),
|
|
7282
|
-
metadata: z.record(z.any()).optional(),
|
|
7283
|
-
});
|
|
7284
|
-
|
|
7285
|
-
export function runAgentPartsFilePartToJSON(
|
|
7286
|
-
runAgentPartsFilePart: RunAgentPartsFilePart,
|
|
7287
|
-
): string {
|
|
7288
|
-
return JSON.stringify(
|
|
7289
|
-
RunAgentPartsFilePart$outboundSchema.parse(runAgentPartsFilePart),
|
|
7290
|
-
);
|
|
7291
|
-
}
|
|
7292
|
-
export function runAgentPartsFilePartFromJSON(
|
|
7293
|
-
jsonString: string,
|
|
7294
|
-
): SafeParseResult<RunAgentPartsFilePart, SDKValidationError> {
|
|
7295
|
-
return safeParse(
|
|
7296
|
-
jsonString,
|
|
7297
|
-
(x) => RunAgentPartsFilePart$inboundSchema.parse(JSON.parse(x)),
|
|
7298
|
-
`Failed to parse 'RunAgentPartsFilePart' from JSON`,
|
|
7299
|
-
);
|
|
7300
|
-
}
|
|
7301
|
-
|
|
7302
|
-
/** @internal */
|
|
7303
|
-
export const RunAgentPartsAgentsKind$inboundSchema: z.ZodNativeEnum<
|
|
7304
|
-
typeof RunAgentPartsAgentsKind
|
|
7305
|
-
> = z.nativeEnum(RunAgentPartsAgentsKind);
|
|
7306
|
-
/** @internal */
|
|
7307
|
-
export const RunAgentPartsAgentsKind$outboundSchema: z.ZodNativeEnum<
|
|
7308
|
-
typeof RunAgentPartsAgentsKind
|
|
7309
|
-
> = RunAgentPartsAgentsKind$inboundSchema;
|
|
7310
|
-
|
|
7311
|
-
/** @internal */
|
|
7312
|
-
export const PartsDataPart$inboundSchema: z.ZodType<
|
|
7313
|
-
PartsDataPart,
|
|
7314
|
-
z.ZodTypeDef,
|
|
7315
|
-
unknown
|
|
7316
|
-
> = z.object({
|
|
7317
|
-
kind: RunAgentPartsAgentsKind$inboundSchema,
|
|
7318
|
-
data: z.record(z.any()),
|
|
7319
|
-
metadata: z.record(z.any()).optional(),
|
|
7320
|
-
});
|
|
7321
|
-
/** @internal */
|
|
7322
|
-
export type PartsDataPart$Outbound = {
|
|
7323
|
-
kind: string;
|
|
7324
|
-
data: { [k: string]: any };
|
|
7325
|
-
metadata?: { [k: string]: any } | undefined;
|
|
7326
|
-
};
|
|
7327
|
-
|
|
7328
|
-
/** @internal */
|
|
7329
|
-
export const PartsDataPart$outboundSchema: z.ZodType<
|
|
7330
|
-
PartsDataPart$Outbound,
|
|
7331
|
-
z.ZodTypeDef,
|
|
7332
|
-
PartsDataPart
|
|
7333
|
-
> = z.object({
|
|
7334
|
-
kind: RunAgentPartsAgentsKind$outboundSchema,
|
|
7335
|
-
data: z.record(z.any()),
|
|
7336
|
-
metadata: z.record(z.any()).optional(),
|
|
7337
|
-
});
|
|
7338
|
-
|
|
7339
|
-
export function partsDataPartToJSON(partsDataPart: PartsDataPart): string {
|
|
7340
|
-
return JSON.stringify(PartsDataPart$outboundSchema.parse(partsDataPart));
|
|
7341
|
-
}
|
|
7342
|
-
export function partsDataPartFromJSON(
|
|
7343
|
-
jsonString: string,
|
|
7344
|
-
): SafeParseResult<PartsDataPart, SDKValidationError> {
|
|
7345
|
-
return safeParse(
|
|
7346
|
-
jsonString,
|
|
7347
|
-
(x) => PartsDataPart$inboundSchema.parse(JSON.parse(x)),
|
|
7348
|
-
`Failed to parse 'PartsDataPart' from JSON`,
|
|
7349
|
-
);
|
|
7350
|
-
}
|
|
7351
|
-
|
|
7352
|
-
/** @internal */
|
|
7353
|
-
export const RunAgentPartsKind$inboundSchema: z.ZodNativeEnum<
|
|
7354
|
-
typeof RunAgentPartsKind
|
|
7355
|
-
> = z.nativeEnum(RunAgentPartsKind);
|
|
7356
|
-
/** @internal */
|
|
7357
|
-
export const RunAgentPartsKind$outboundSchema: z.ZodNativeEnum<
|
|
7358
|
-
typeof RunAgentPartsKind
|
|
7359
|
-
> = RunAgentPartsKind$inboundSchema;
|
|
7360
|
-
|
|
7361
|
-
/** @internal */
|
|
7362
|
-
export const RunAgentPartsTextPart$inboundSchema: z.ZodType<
|
|
7363
|
-
RunAgentPartsTextPart,
|
|
7364
|
-
z.ZodTypeDef,
|
|
7365
|
-
unknown
|
|
7366
|
-
> = z.object({
|
|
7367
|
-
kind: RunAgentPartsKind$inboundSchema,
|
|
7368
|
-
text: z.string(),
|
|
7369
|
-
});
|
|
7370
|
-
/** @internal */
|
|
7371
|
-
export type RunAgentPartsTextPart$Outbound = {
|
|
7372
|
-
kind: string;
|
|
7373
|
-
text: string;
|
|
7374
|
-
};
|
|
7375
|
-
|
|
7376
|
-
/** @internal */
|
|
7377
|
-
export const RunAgentPartsTextPart$outboundSchema: z.ZodType<
|
|
7378
|
-
RunAgentPartsTextPart$Outbound,
|
|
7379
|
-
z.ZodTypeDef,
|
|
7380
|
-
RunAgentPartsTextPart
|
|
7381
|
-
> = z.object({
|
|
7382
|
-
kind: RunAgentPartsKind$outboundSchema,
|
|
7383
|
-
text: z.string(),
|
|
7384
|
-
});
|
|
7385
|
-
|
|
7386
|
-
export function runAgentPartsTextPartToJSON(
|
|
7387
|
-
runAgentPartsTextPart: RunAgentPartsTextPart,
|
|
7388
|
-
): string {
|
|
7389
|
-
return JSON.stringify(
|
|
7390
|
-
RunAgentPartsTextPart$outboundSchema.parse(runAgentPartsTextPart),
|
|
7391
|
-
);
|
|
7392
|
-
}
|
|
7393
|
-
export function runAgentPartsTextPartFromJSON(
|
|
7394
|
-
jsonString: string,
|
|
7395
|
-
): SafeParseResult<RunAgentPartsTextPart, SDKValidationError> {
|
|
7396
|
-
return safeParse(
|
|
7397
|
-
jsonString,
|
|
7398
|
-
(x) => RunAgentPartsTextPart$inboundSchema.parse(JSON.parse(x)),
|
|
7399
|
-
`Failed to parse 'RunAgentPartsTextPart' from JSON`,
|
|
7400
|
-
);
|
|
7401
|
-
}
|
|
7402
|
-
|
|
7403
6781
|
/** @internal */
|
|
7404
6782
|
export const RunAgentParts$inboundSchema: z.ZodType<
|
|
7405
6783
|
RunAgentParts,
|
|
7406
6784
|
z.ZodTypeDef,
|
|
7407
6785
|
unknown
|
|
7408
6786
|
> = z.union([
|
|
7409
|
-
|
|
7410
|
-
|
|
7411
|
-
|
|
7412
|
-
|
|
7413
|
-
|
|
6787
|
+
components.ToolCallPart$inboundSchema.and(
|
|
6788
|
+
z.object({ kind: z.literal("tool_call") }).transform((v) => ({
|
|
6789
|
+
kind: v.kind,
|
|
6790
|
+
})),
|
|
6791
|
+
),
|
|
6792
|
+
components.TextPart$inboundSchema.and(
|
|
6793
|
+
z.object({ kind: z.literal("text") }).transform((v) => ({ kind: v.kind })),
|
|
6794
|
+
),
|
|
6795
|
+
components.DataPart$inboundSchema.and(
|
|
6796
|
+
z.object({ kind: z.literal("data") }).transform((v) => ({ kind: v.kind })),
|
|
6797
|
+
),
|
|
6798
|
+
components.FilePart$inboundSchema.and(
|
|
6799
|
+
z.object({ kind: z.literal("file") }).transform((v) => ({ kind: v.kind })),
|
|
6800
|
+
),
|
|
6801
|
+
components.ToolResultPart$inboundSchema.and(
|
|
6802
|
+
z.object({ kind: z.literal("tool_result") }).transform((v) => ({
|
|
6803
|
+
kind: v.kind,
|
|
6804
|
+
})),
|
|
6805
|
+
),
|
|
7414
6806
|
]);
|
|
7415
6807
|
/** @internal */
|
|
7416
6808
|
export type RunAgentParts$Outbound =
|
|
7417
|
-
|
|
|
7418
|
-
|
|
|
7419
|
-
|
|
|
7420
|
-
|
|
|
7421
|
-
|
|
|
6809
|
+
| (components.ToolCallPart$Outbound & { kind: "tool_call" })
|
|
6810
|
+
| (components.TextPart$Outbound & { kind: "text" })
|
|
6811
|
+
| (components.DataPart$Outbound & { kind: "data" })
|
|
6812
|
+
| (components.FilePart$Outbound & { kind: "file" })
|
|
6813
|
+
| (components.ToolResultPart$Outbound & { kind: "tool_result" });
|
|
7422
6814
|
|
|
7423
6815
|
/** @internal */
|
|
7424
6816
|
export const RunAgentParts$outboundSchema: z.ZodType<
|
|
@@ -7426,11 +6818,25 @@ export const RunAgentParts$outboundSchema: z.ZodType<
|
|
|
7426
6818
|
z.ZodTypeDef,
|
|
7427
6819
|
RunAgentParts
|
|
7428
6820
|
> = z.union([
|
|
7429
|
-
|
|
7430
|
-
|
|
7431
|
-
|
|
7432
|
-
|
|
7433
|
-
|
|
6821
|
+
components.ToolCallPart$outboundSchema.and(
|
|
6822
|
+
z.object({ kind: z.literal("tool_call") }).transform((v) => ({
|
|
6823
|
+
kind: v.kind,
|
|
6824
|
+
})),
|
|
6825
|
+
),
|
|
6826
|
+
components.TextPart$outboundSchema.and(
|
|
6827
|
+
z.object({ kind: z.literal("text") }).transform((v) => ({ kind: v.kind })),
|
|
6828
|
+
),
|
|
6829
|
+
components.DataPart$outboundSchema.and(
|
|
6830
|
+
z.object({ kind: z.literal("data") }).transform((v) => ({ kind: v.kind })),
|
|
6831
|
+
),
|
|
6832
|
+
components.FilePart$outboundSchema.and(
|
|
6833
|
+
z.object({ kind: z.literal("file") }).transform((v) => ({ kind: v.kind })),
|
|
6834
|
+
),
|
|
6835
|
+
components.ToolResultPart$outboundSchema.and(
|
|
6836
|
+
z.object({ kind: z.literal("tool_result") }).transform((v) => ({
|
|
6837
|
+
kind: v.kind,
|
|
6838
|
+
})),
|
|
6839
|
+
),
|
|
7434
6840
|
]);
|
|
7435
6841
|
|
|
7436
6842
|
export function runAgentPartsToJSON(runAgentParts: RunAgentParts): string {
|
|
@@ -7457,11 +6863,31 @@ export const RunAgentTaskStatusMessage$inboundSchema: z.ZodType<
|
|
|
7457
6863
|
role: RunAgentExtendedMessageRole$inboundSchema,
|
|
7458
6864
|
parts: z.array(
|
|
7459
6865
|
z.union([
|
|
7460
|
-
|
|
7461
|
-
|
|
7462
|
-
|
|
7463
|
-
|
|
7464
|
-
|
|
6866
|
+
components.ToolCallPart$inboundSchema.and(
|
|
6867
|
+
z.object({ kind: z.literal("tool_call") }).transform((v) => ({
|
|
6868
|
+
kind: v.kind,
|
|
6869
|
+
})),
|
|
6870
|
+
),
|
|
6871
|
+
components.TextPart$inboundSchema.and(
|
|
6872
|
+
z.object({ kind: z.literal("text") }).transform((v) => ({
|
|
6873
|
+
kind: v.kind,
|
|
6874
|
+
})),
|
|
6875
|
+
),
|
|
6876
|
+
components.DataPart$inboundSchema.and(
|
|
6877
|
+
z.object({ kind: z.literal("data") }).transform((v) => ({
|
|
6878
|
+
kind: v.kind,
|
|
6879
|
+
})),
|
|
6880
|
+
),
|
|
6881
|
+
components.FilePart$inboundSchema.and(
|
|
6882
|
+
z.object({ kind: z.literal("file") }).transform((v) => ({
|
|
6883
|
+
kind: v.kind,
|
|
6884
|
+
})),
|
|
6885
|
+
),
|
|
6886
|
+
components.ToolResultPart$inboundSchema.and(
|
|
6887
|
+
z.object({ kind: z.literal("tool_result") }).transform((v) => ({
|
|
6888
|
+
kind: v.kind,
|
|
6889
|
+
})),
|
|
6890
|
+
),
|
|
7465
6891
|
]),
|
|
7466
6892
|
),
|
|
7467
6893
|
});
|
|
@@ -7471,11 +6897,11 @@ export type RunAgentTaskStatusMessage$Outbound = {
|
|
|
7471
6897
|
messageId: string;
|
|
7472
6898
|
role: string;
|
|
7473
6899
|
parts: Array<
|
|
7474
|
-
|
|
|
7475
|
-
|
|
|
7476
|
-
|
|
|
7477
|
-
|
|
|
7478
|
-
|
|
|
6900
|
+
| (components.ToolCallPart$Outbound & { kind: "tool_call" })
|
|
6901
|
+
| (components.TextPart$Outbound & { kind: "text" })
|
|
6902
|
+
| (components.DataPart$Outbound & { kind: "data" })
|
|
6903
|
+
| (components.FilePart$Outbound & { kind: "file" })
|
|
6904
|
+
| (components.ToolResultPart$Outbound & { kind: "tool_result" })
|
|
7479
6905
|
>;
|
|
7480
6906
|
};
|
|
7481
6907
|
|
|
@@ -7490,11 +6916,31 @@ export const RunAgentTaskStatusMessage$outboundSchema: z.ZodType<
|
|
|
7490
6916
|
role: RunAgentExtendedMessageRole$outboundSchema,
|
|
7491
6917
|
parts: z.array(
|
|
7492
6918
|
z.union([
|
|
7493
|
-
|
|
7494
|
-
|
|
7495
|
-
|
|
7496
|
-
|
|
7497
|
-
|
|
6919
|
+
components.ToolCallPart$outboundSchema.and(
|
|
6920
|
+
z.object({ kind: z.literal("tool_call") }).transform((v) => ({
|
|
6921
|
+
kind: v.kind,
|
|
6922
|
+
})),
|
|
6923
|
+
),
|
|
6924
|
+
components.TextPart$outboundSchema.and(
|
|
6925
|
+
z.object({ kind: z.literal("text") }).transform((v) => ({
|
|
6926
|
+
kind: v.kind,
|
|
6927
|
+
})),
|
|
6928
|
+
),
|
|
6929
|
+
components.DataPart$outboundSchema.and(
|
|
6930
|
+
z.object({ kind: z.literal("data") }).transform((v) => ({
|
|
6931
|
+
kind: v.kind,
|
|
6932
|
+
})),
|
|
6933
|
+
),
|
|
6934
|
+
components.FilePart$outboundSchema.and(
|
|
6935
|
+
z.object({ kind: z.literal("file") }).transform((v) => ({
|
|
6936
|
+
kind: v.kind,
|
|
6937
|
+
})),
|
|
6938
|
+
),
|
|
6939
|
+
components.ToolResultPart$outboundSchema.and(
|
|
6940
|
+
z.object({ kind: z.literal("tool_result") }).transform((v) => ({
|
|
6941
|
+
kind: v.kind,
|
|
6942
|
+
})),
|
|
6943
|
+
),
|
|
7498
6944
|
]),
|
|
7499
6945
|
),
|
|
7500
6946
|
});
|