@orq-ai/node 3.12.4 → 3.12.7
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 +0 -1
- package/bin/mcp-server.js +112 -112
- package/bin/mcp-server.js.map +33 -33
- package/docs/sdks/deployments/README.md +0 -2
- package/examples/package-lock.json +1 -1
- package/funcs/deploymentsStream.js +5 -2
- package/funcs/deploymentsStream.js.map +1 -1
- package/jsr.json +1 -1
- package/lib/config.d.ts +3 -3
- package/lib/config.js +3 -3
- package/lib/event-streams.d.ts +3 -3
- package/lib/event-streams.d.ts.map +1 -1
- package/lib/event-streams.js.map +1 -1
- 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 +2 -2
- package/models/operations/createdatasource.js +2 -2
- package/models/operations/createeval.js +16 -16
- package/models/operations/fileget.js +2 -2
- package/models/operations/filelist.js +2 -2
- package/models/operations/fileupload.js +2 -2
- 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 +2 -2
- 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 +2 -2
- package/models/operations/retrievedataset.js +2 -2
- package/models/operations/retrievedatasource.js +2 -2
- package/models/operations/updatebudget.js +2 -2
- package/models/operations/updatecontact.js +2 -2
- package/models/operations/updatedatapoint.js +2 -2
- package/models/operations/updatedataset.js +2 -2
- package/models/operations/updatedatasource.js +2 -2
- package/models/operations/updateeval.js +16 -16
- package/package.json +1 -1
- package/packages/orq-rc/FUNCTIONS.md +9 -19
- package/packages/orq-rc/README.md +180 -181
- package/packages/orq-rc/docs/sdks/agents/README.md +702 -0
- package/packages/orq-rc/docs/sdks/budgets/README.md +5 -5
- package/packages/orq-rc/docs/sdks/memorystores/README.md +1172 -0
- package/packages/orq-rc/docs/sdks/orq/README.md +81 -0
- package/packages/orq-rc/examples/package-lock.json +1 -1
- package/packages/orq-rc/examples/postV2AgentsInternal.example.ts +30 -0
- 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/agentsList.ts +167 -0
- package/packages/orq-rc/src/funcs/agentsListActions.ts +169 -0
- package/packages/orq-rc/src/funcs/agentsRetrieve.ts +175 -0
- package/packages/orq-rc/src/funcs/agentsRetrieveAction.ts +173 -0
- package/packages/orq-rc/src/funcs/agentsRetrieveTask.ts +179 -0
- package/packages/orq-rc/src/funcs/agentsReviewAction.ts +177 -0
- package/packages/orq-rc/src/funcs/agentsRun.ts +163 -0
- package/packages/orq-rc/src/funcs/agentsStreamRun.ts +187 -0
- package/packages/orq-rc/src/funcs/budgetsCreate.ts +1 -1
- package/packages/orq-rc/src/funcs/budgetsGet.ts +2 -2
- package/packages/orq-rc/src/funcs/budgetsList.ts +2 -2
- package/packages/orq-rc/src/funcs/memoryStoresCreate.ts +171 -0
- package/packages/orq-rc/src/funcs/memoryStoresCreateDocument.ts +175 -0
- package/packages/orq-rc/src/funcs/memoryStoresCreateMemory.ts +170 -0
- package/packages/orq-rc/src/funcs/memoryStoresDelete.ts +168 -0
- package/packages/orq-rc/src/funcs/memoryStoresDeleteDocument.ts +184 -0
- package/packages/orq-rc/src/funcs/memoryStoresDeleteMemory.ts +179 -0
- package/packages/orq-rc/src/funcs/memoryStoresList.ts +178 -0
- package/packages/orq-rc/src/funcs/memoryStoresListDocuments.ts +181 -0
- package/packages/orq-rc/src/funcs/memoryStoresListMemories.ts +176 -0
- package/packages/orq-rc/src/funcs/memoryStoresRetrieve.ts +177 -0
- package/packages/orq-rc/src/funcs/memoryStoresRetrieveDocument.ts +178 -0
- package/packages/orq-rc/src/funcs/memoryStoresRetrieveMemory.ts +173 -0
- package/packages/orq-rc/src/funcs/memoryStoresUpdate.ts +168 -0
- package/packages/orq-rc/src/funcs/memoryStoresUpdateDocument.ts +179 -0
- package/packages/orq-rc/src/funcs/memoryStoresUpdateMemory.ts +174 -0
- package/packages/orq-rc/src/funcs/postV2AgentsInternal.ts +159 -0
- package/packages/orq-rc/src/lib/config.ts +3 -3
- package/packages/orq-rc/src/mcp-server/mcp-server.ts +1 -1
- package/packages/orq-rc/src/mcp-server/server.ts +49 -1
- package/packages/orq-rc/src/mcp-server/tools/agentsList.ts +37 -0
- package/packages/orq-rc/src/mcp-server/tools/agentsListActions.ts +35 -0
- package/packages/orq-rc/src/mcp-server/tools/agentsRetrieve.ts +37 -0
- package/packages/orq-rc/src/mcp-server/tools/agentsRetrieveAction.ts +35 -0
- package/packages/orq-rc/src/mcp-server/tools/agentsRetrieveTask.ts +37 -0
- package/packages/orq-rc/src/mcp-server/tools/agentsReviewAction.ts +37 -0
- package/packages/orq-rc/src/mcp-server/tools/agentsRun.ts +37 -0
- package/packages/orq-rc/src/mcp-server/tools/agentsStreamRun.ts +37 -0
- package/packages/orq-rc/src/mcp-server/tools/budgetsCreate.ts +1 -1
- package/packages/orq-rc/src/mcp-server/tools/budgetsGet.ts +2 -2
- package/packages/orq-rc/src/mcp-server/tools/budgetsList.ts +2 -2
- package/packages/orq-rc/src/mcp-server/tools/memoryStoresCreate.ts +35 -0
- package/packages/orq-rc/src/mcp-server/tools/memoryStoresCreateDocument.ts +37 -0
- package/packages/orq-rc/src/mcp-server/tools/memoryStoresCreateMemory.ts +37 -0
- package/packages/orq-rc/src/mcp-server/tools/memoryStoresDelete.ts +35 -0
- package/packages/orq-rc/src/mcp-server/tools/memoryStoresDeleteDocument.ts +40 -0
- package/packages/orq-rc/src/mcp-server/tools/memoryStoresDeleteMemory.ts +40 -0
- package/packages/orq-rc/src/mcp-server/tools/memoryStoresList.ts +37 -0
- package/packages/orq-rc/src/mcp-server/tools/memoryStoresListDocuments.ts +37 -0
- package/packages/orq-rc/src/mcp-server/tools/memoryStoresListMemories.ts +37 -0
- package/packages/orq-rc/src/mcp-server/tools/memoryStoresRetrieve.ts +37 -0
- package/packages/orq-rc/src/mcp-server/tools/memoryStoresRetrieveDocument.ts +37 -0
- package/packages/orq-rc/src/mcp-server/tools/memoryStoresRetrieveMemory.ts +37 -0
- package/packages/orq-rc/src/mcp-server/tools/memoryStoresUpdate.ts +37 -0
- package/packages/orq-rc/src/mcp-server/tools/memoryStoresUpdateDocument.ts +37 -0
- package/packages/orq-rc/src/mcp-server/tools/memoryStoresUpdateMemory.ts +37 -0
- package/packages/orq-rc/src/mcp-server/tools/postV2AgentsInternal.ts +33 -0
- package/packages/orq-rc/src/models/errors/getagent.ts +80 -0
- package/packages/orq-rc/src/models/errors/getagenttask.ts +80 -0
- package/packages/orq-rc/src/models/errors/index.ts +3 -0
- package/packages/orq-rc/src/models/errors/streamrunagent.ts +80 -0
- package/packages/orq-rc/src/models/operations/createbudget.ts +57 -58
- 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 +2 -2
- package/packages/orq-rc/src/models/operations/createdatasource.ts +2 -2
- package/packages/orq-rc/src/models/operations/createeval.ts +6383 -1075
- package/packages/orq-rc/src/models/operations/creatememory.ts +265 -0
- package/packages/orq-rc/src/models/operations/creatememorydocument.ts +284 -0
- package/packages/orq-rc/src/models/operations/creatememorystore.ts +1956 -0
- package/packages/orq-rc/src/models/operations/deletememory.ts +87 -0
- package/packages/orq-rc/src/models/operations/deletememorydocument.ts +98 -0
- package/packages/orq-rc/src/models/operations/deletememorystore.ts +78 -0
- package/packages/orq-rc/src/models/operations/deploymentgetconfig.ts +36 -27
- package/packages/orq-rc/src/models/operations/deploymentinvoke.ts +31 -24
- 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/getagent.ts +1171 -0
- package/packages/orq-rc/src/models/operations/getagenttask.ts +257 -0
- package/packages/orq-rc/src/models/operations/getallmemories.ts +315 -0
- package/packages/orq-rc/src/models/operations/getallmemorydocuments.ts +335 -0
- package/packages/orq-rc/src/models/operations/getallmemorystores.ts +1241 -0
- package/packages/orq-rc/src/models/operations/getbudget.ts +2 -11
- package/packages/orq-rc/src/models/operations/getevals.ts +1362 -1166
- package/packages/orq-rc/src/models/operations/index.ts +24 -0
- package/packages/orq-rc/src/models/operations/listactions.ts +517 -0
- package/packages/orq-rc/src/models/operations/listagents.ts +1335 -0
- package/packages/orq-rc/src/models/operations/listbudgets.ts +5 -15
- package/packages/orq-rc/src/models/operations/listchunks.ts +21 -21
- package/packages/orq-rc/src/models/operations/listcontacts.ts +44 -37
- package/packages/orq-rc/src/models/operations/listdatasetdatapoints.ts +2 -2
- package/packages/orq-rc/src/models/operations/listdatasets.ts +2 -2
- package/packages/orq-rc/src/models/operations/listdatasources.ts +29 -22
- package/packages/orq-rc/src/models/operations/postv2agentsinternal.ts +103 -0
- package/packages/orq-rc/src/models/operations/retrieveaction.ts +419 -0
- package/packages/orq-rc/src/models/operations/retrievecontact.ts +2 -2
- package/packages/orq-rc/src/models/operations/retrievedatapoint.ts +2 -2
- 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/retrievememory.ts +198 -0
- package/packages/orq-rc/src/models/operations/retrievememorydocument.ts +217 -0
- package/packages/orq-rc/src/models/operations/retrievememorystore.ts +1124 -0
- package/packages/orq-rc/src/models/operations/reviewaction.ts +258 -0
- package/packages/orq-rc/src/models/operations/runagent.ts +3428 -0
- package/packages/orq-rc/src/models/operations/streamrunagent.ts +3361 -0
- package/packages/orq-rc/src/models/operations/updatebudget.ts +2 -11
- package/packages/orq-rc/src/models/operations/updatecontact.ts +2 -2
- package/packages/orq-rc/src/models/operations/updatedatapoint.ts +2 -2
- 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 +6627 -1224
- package/packages/orq-rc/src/models/operations/updatememory.ts +274 -0
- package/packages/orq-rc/src/models/operations/updatememorydocument.ts +293 -0
- package/packages/orq-rc/src/models/operations/updatememorystore.ts +1348 -0
- package/packages/orq-rc/src/models/operations/updateprompt.ts +64 -19
- package/packages/orq-rc/src/sdk/agents.ts +148 -0
- package/packages/orq-rc/src/sdk/budgets.ts +5 -5
- package/packages/orq-rc/src/sdk/memorystores.ts +286 -0
- package/packages/orq-rc/src/sdk/sdk.ts +27 -1
- package/src/funcs/deploymentsStream.ts +11 -10
- package/src/lib/config.ts +3 -3
- package/src/lib/event-streams.ts +6 -8
- 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 +2 -2
- package/src/models/operations/createdatasource.ts +2 -2
- package/src/models/operations/createeval.ts +16 -16
- 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/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 +2 -2
- 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 +2 -2
- package/src/models/operations/retrievedataset.ts +2 -2
- package/src/models/operations/retrievedatasource.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 +2 -2
- package/src/models/operations/updatedataset.ts +2 -2
- package/src/models/operations/updatedatasource.ts +2 -2
- package/src/models/operations/updateeval.ts +16 -16
- package/packages/orq-rc/examples/contactsCreate.example.ts +0 -42
|
@@ -0,0 +1,1171 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { ClosedEnum } from "../../types/enums.js";
|
|
9
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
10
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
|
+
|
|
12
|
+
export type GetAgentRequest = {
|
|
13
|
+
/**
|
|
14
|
+
* The ID of the agent to retrieve
|
|
15
|
+
*/
|
|
16
|
+
id: string;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* The status of the agent. `Live` is the latest version of the agent. `Draft` is a version that is not yet published. `Pending` is a version that is pending approval. `Published` is a version that was live and has been replaced by a new version.
|
|
21
|
+
*/
|
|
22
|
+
export const GetAgentStatus = {
|
|
23
|
+
Live: "live",
|
|
24
|
+
Draft: "draft",
|
|
25
|
+
Pending: "pending",
|
|
26
|
+
Published: "published",
|
|
27
|
+
} as const;
|
|
28
|
+
/**
|
|
29
|
+
* The status of the agent. `Live` is the latest version of the agent. `Draft` is a version that is not yet published. `Pending` is a version that is pending approval. `Published` is a version that was live and has been replaced by a new version.
|
|
30
|
+
*/
|
|
31
|
+
export type GetAgentStatus = ClosedEnum<typeof GetAgentStatus>;
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* If all, the agent will require approval for all tools. If respect_tool, the agent will require approval for tools that have the requires_approval flag set to true. If none, the agent will not require approval for any tools.
|
|
35
|
+
*/
|
|
36
|
+
export const GetAgentToolApprovalRequired = {
|
|
37
|
+
All: "all",
|
|
38
|
+
RespectTool: "respect_tool",
|
|
39
|
+
None: "none",
|
|
40
|
+
} as const;
|
|
41
|
+
/**
|
|
42
|
+
* If all, the agent will require approval for all tools. If respect_tool, the agent will require approval for tools that have the requires_approval flag set to true. If none, the agent will not require approval for any tools.
|
|
43
|
+
*/
|
|
44
|
+
export type GetAgentToolApprovalRequired = ClosedEnum<
|
|
45
|
+
typeof GetAgentToolApprovalRequired
|
|
46
|
+
>;
|
|
47
|
+
|
|
48
|
+
export type Conditions = {
|
|
49
|
+
/**
|
|
50
|
+
* The argument of the tool call to evaluate
|
|
51
|
+
*/
|
|
52
|
+
condition: string;
|
|
53
|
+
/**
|
|
54
|
+
* The operator to use
|
|
55
|
+
*/
|
|
56
|
+
operator: string;
|
|
57
|
+
/**
|
|
58
|
+
* The value to compare against
|
|
59
|
+
*/
|
|
60
|
+
value: string;
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
export type GetAgentTools = {
|
|
64
|
+
/**
|
|
65
|
+
* The id of the resource
|
|
66
|
+
*/
|
|
67
|
+
id: string;
|
|
68
|
+
actionType: string;
|
|
69
|
+
displayName?: string | undefined;
|
|
70
|
+
requiresApproval: boolean;
|
|
71
|
+
conditions?: Array<Conditions> | undefined;
|
|
72
|
+
/**
|
|
73
|
+
* The id of the resource
|
|
74
|
+
*/
|
|
75
|
+
mcpServer?: string | undefined;
|
|
76
|
+
/**
|
|
77
|
+
* Tool execution timeout in seconds (default: 2 minutes, max: 10 minutes)
|
|
78
|
+
*/
|
|
79
|
+
timeout?: number | undefined;
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
export type GetAgentSettings = {
|
|
83
|
+
maxIterations?: number | undefined;
|
|
84
|
+
/**
|
|
85
|
+
* Max execution time in seconds
|
|
86
|
+
*/
|
|
87
|
+
maxExecutionTime: number;
|
|
88
|
+
/**
|
|
89
|
+
* If all, the agent will require approval for all tools. If respect_tool, the agent will require approval for tools that have the requires_approval flag set to true. If none, the agent will not require approval for any tools.
|
|
90
|
+
*/
|
|
91
|
+
toolApprovalRequired?: GetAgentToolApprovalRequired | undefined;
|
|
92
|
+
tools: Array<GetAgentTools>;
|
|
93
|
+
};
|
|
94
|
+
|
|
95
|
+
export type GetAgentModel = {
|
|
96
|
+
/**
|
|
97
|
+
* The database ID of the primary model
|
|
98
|
+
*/
|
|
99
|
+
id: string;
|
|
100
|
+
/**
|
|
101
|
+
* Optional integration ID for custom model configurations
|
|
102
|
+
*/
|
|
103
|
+
integrationId?: string | undefined;
|
|
104
|
+
/**
|
|
105
|
+
* Optional array of fallback model IDs that will be used automatically in order if the primary model fails
|
|
106
|
+
*/
|
|
107
|
+
fallbackModels?: Array<string> | undefined;
|
|
108
|
+
/**
|
|
109
|
+
* Maximum number of tokens for model responses
|
|
110
|
+
*/
|
|
111
|
+
maxTokens?: number | undefined;
|
|
112
|
+
/**
|
|
113
|
+
* Temperature setting for model responses
|
|
114
|
+
*/
|
|
115
|
+
temperature?: number | undefined;
|
|
116
|
+
};
|
|
117
|
+
|
|
118
|
+
export type GetAgentTeamOfAgents = {
|
|
119
|
+
id: string;
|
|
120
|
+
/**
|
|
121
|
+
* The role of the agent in this context. This is used to give extra information to the leader to help it decide which agent to hand off to.
|
|
122
|
+
*/
|
|
123
|
+
role?: string | undefined;
|
|
124
|
+
};
|
|
125
|
+
|
|
126
|
+
export type Metrics = {
|
|
127
|
+
totalCost?: number | undefined;
|
|
128
|
+
};
|
|
129
|
+
|
|
130
|
+
export const GetAgentConfigurationType = {
|
|
131
|
+
Query: "query",
|
|
132
|
+
} as const;
|
|
133
|
+
export type GetAgentConfigurationType = ClosedEnum<
|
|
134
|
+
typeof GetAgentConfigurationType
|
|
135
|
+
>;
|
|
136
|
+
|
|
137
|
+
export type Configuration2 = {
|
|
138
|
+
type: GetAgentConfigurationType;
|
|
139
|
+
query: string;
|
|
140
|
+
};
|
|
141
|
+
|
|
142
|
+
export const ConfigurationType = {
|
|
143
|
+
LastUserMessage: "last_user_message",
|
|
144
|
+
} as const;
|
|
145
|
+
export type ConfigurationType = ClosedEnum<typeof ConfigurationType>;
|
|
146
|
+
|
|
147
|
+
export type Configuration1 = {
|
|
148
|
+
type: ConfigurationType;
|
|
149
|
+
};
|
|
150
|
+
|
|
151
|
+
/**
|
|
152
|
+
* Defines the configuration settings which can either be for a user message or a text entry.
|
|
153
|
+
*/
|
|
154
|
+
export type Configuration = Configuration2 | Configuration1;
|
|
155
|
+
|
|
156
|
+
export type KnowledgeBases = {
|
|
157
|
+
/**
|
|
158
|
+
* The id of the resource
|
|
159
|
+
*/
|
|
160
|
+
id?: string | undefined;
|
|
161
|
+
/**
|
|
162
|
+
* The id of the resource
|
|
163
|
+
*/
|
|
164
|
+
knowledgeId: string;
|
|
165
|
+
/**
|
|
166
|
+
* Defines the configuration settings which can either be for a user message or a text entry.
|
|
167
|
+
*/
|
|
168
|
+
configuration: Configuration2 | Configuration1;
|
|
169
|
+
};
|
|
170
|
+
|
|
171
|
+
export const HiddenPanels = {
|
|
172
|
+
Model: "model",
|
|
173
|
+
Tools: "tools",
|
|
174
|
+
KnowledgeBases: "knowledge_bases",
|
|
175
|
+
Variables: "variables",
|
|
176
|
+
RuntimeConstraints: "runtime_constraints",
|
|
177
|
+
} as const;
|
|
178
|
+
export type HiddenPanels = ClosedEnum<typeof HiddenPanels>;
|
|
179
|
+
|
|
180
|
+
/**
|
|
181
|
+
* Agent retrieved successfully
|
|
182
|
+
*/
|
|
183
|
+
export type GetAgentResponseBody = {
|
|
184
|
+
id: string;
|
|
185
|
+
key: string;
|
|
186
|
+
workspaceId: string;
|
|
187
|
+
projectId: string;
|
|
188
|
+
createdById?: string | undefined;
|
|
189
|
+
updatedById?: string | undefined;
|
|
190
|
+
created?: string | undefined;
|
|
191
|
+
updated?: string | undefined;
|
|
192
|
+
role: string;
|
|
193
|
+
description: string;
|
|
194
|
+
systemPrompt?: string | undefined;
|
|
195
|
+
instructions: string;
|
|
196
|
+
/**
|
|
197
|
+
* Optional URL to an icon for the agent
|
|
198
|
+
*/
|
|
199
|
+
iconUrl?: string | undefined;
|
|
200
|
+
/**
|
|
201
|
+
* The status of the agent. `Live` is the latest version of the agent. `Draft` is a version that is not yet published. `Pending` is a version that is pending approval. `Published` is a version that was live and has been replaced by a new version.
|
|
202
|
+
*/
|
|
203
|
+
status: GetAgentStatus;
|
|
204
|
+
settings?: GetAgentSettings | undefined;
|
|
205
|
+
model: GetAgentModel;
|
|
206
|
+
versionHash?: string | undefined;
|
|
207
|
+
/**
|
|
208
|
+
* The path where the entity is stored in the project structure. The first element of the path always represents the project name. Any subsequent path element after the project will be created as a folder in the project if it does not exists.
|
|
209
|
+
*/
|
|
210
|
+
path: string;
|
|
211
|
+
memoryStores: Array<string>;
|
|
212
|
+
/**
|
|
213
|
+
* The agents that are accessible to this orchestrator. The main agent can hand off to these agents to perform tasks.
|
|
214
|
+
*/
|
|
215
|
+
teamOfAgents: Array<GetAgentTeamOfAgents>;
|
|
216
|
+
metrics?: Metrics | undefined;
|
|
217
|
+
/**
|
|
218
|
+
* Extracted variables from agent instructions
|
|
219
|
+
*/
|
|
220
|
+
variables?: { [k: string]: any } | undefined;
|
|
221
|
+
/**
|
|
222
|
+
* Agent knowledge bases reference
|
|
223
|
+
*/
|
|
224
|
+
knowledgeBases?: Array<KnowledgeBases> | undefined;
|
|
225
|
+
/**
|
|
226
|
+
* List of hidden collapsed panels in configuration. Duplicates are not allowed.
|
|
227
|
+
*/
|
|
228
|
+
hiddenPanels?: Array<HiddenPanels> | undefined;
|
|
229
|
+
};
|
|
230
|
+
|
|
231
|
+
/** @internal */
|
|
232
|
+
export const GetAgentRequest$inboundSchema: z.ZodType<
|
|
233
|
+
GetAgentRequest,
|
|
234
|
+
z.ZodTypeDef,
|
|
235
|
+
unknown
|
|
236
|
+
> = z.object({
|
|
237
|
+
id: z.string(),
|
|
238
|
+
});
|
|
239
|
+
|
|
240
|
+
/** @internal */
|
|
241
|
+
export type GetAgentRequest$Outbound = {
|
|
242
|
+
id: string;
|
|
243
|
+
};
|
|
244
|
+
|
|
245
|
+
/** @internal */
|
|
246
|
+
export const GetAgentRequest$outboundSchema: z.ZodType<
|
|
247
|
+
GetAgentRequest$Outbound,
|
|
248
|
+
z.ZodTypeDef,
|
|
249
|
+
GetAgentRequest
|
|
250
|
+
> = z.object({
|
|
251
|
+
id: z.string(),
|
|
252
|
+
});
|
|
253
|
+
|
|
254
|
+
/**
|
|
255
|
+
* @internal
|
|
256
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
257
|
+
*/
|
|
258
|
+
export namespace GetAgentRequest$ {
|
|
259
|
+
/** @deprecated use `GetAgentRequest$inboundSchema` instead. */
|
|
260
|
+
export const inboundSchema = GetAgentRequest$inboundSchema;
|
|
261
|
+
/** @deprecated use `GetAgentRequest$outboundSchema` instead. */
|
|
262
|
+
export const outboundSchema = GetAgentRequest$outboundSchema;
|
|
263
|
+
/** @deprecated use `GetAgentRequest$Outbound` instead. */
|
|
264
|
+
export type Outbound = GetAgentRequest$Outbound;
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
export function getAgentRequestToJSON(
|
|
268
|
+
getAgentRequest: GetAgentRequest,
|
|
269
|
+
): string {
|
|
270
|
+
return JSON.stringify(GetAgentRequest$outboundSchema.parse(getAgentRequest));
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
export function getAgentRequestFromJSON(
|
|
274
|
+
jsonString: string,
|
|
275
|
+
): SafeParseResult<GetAgentRequest, SDKValidationError> {
|
|
276
|
+
return safeParse(
|
|
277
|
+
jsonString,
|
|
278
|
+
(x) => GetAgentRequest$inboundSchema.parse(JSON.parse(x)),
|
|
279
|
+
`Failed to parse 'GetAgentRequest' from JSON`,
|
|
280
|
+
);
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
/** @internal */
|
|
284
|
+
export const GetAgentStatus$inboundSchema: z.ZodNativeEnum<
|
|
285
|
+
typeof GetAgentStatus
|
|
286
|
+
> = z.nativeEnum(GetAgentStatus);
|
|
287
|
+
|
|
288
|
+
/** @internal */
|
|
289
|
+
export const GetAgentStatus$outboundSchema: z.ZodNativeEnum<
|
|
290
|
+
typeof GetAgentStatus
|
|
291
|
+
> = GetAgentStatus$inboundSchema;
|
|
292
|
+
|
|
293
|
+
/**
|
|
294
|
+
* @internal
|
|
295
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
296
|
+
*/
|
|
297
|
+
export namespace GetAgentStatus$ {
|
|
298
|
+
/** @deprecated use `GetAgentStatus$inboundSchema` instead. */
|
|
299
|
+
export const inboundSchema = GetAgentStatus$inboundSchema;
|
|
300
|
+
/** @deprecated use `GetAgentStatus$outboundSchema` instead. */
|
|
301
|
+
export const outboundSchema = GetAgentStatus$outboundSchema;
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
/** @internal */
|
|
305
|
+
export const GetAgentToolApprovalRequired$inboundSchema: z.ZodNativeEnum<
|
|
306
|
+
typeof GetAgentToolApprovalRequired
|
|
307
|
+
> = z.nativeEnum(GetAgentToolApprovalRequired);
|
|
308
|
+
|
|
309
|
+
/** @internal */
|
|
310
|
+
export const GetAgentToolApprovalRequired$outboundSchema: z.ZodNativeEnum<
|
|
311
|
+
typeof GetAgentToolApprovalRequired
|
|
312
|
+
> = GetAgentToolApprovalRequired$inboundSchema;
|
|
313
|
+
|
|
314
|
+
/**
|
|
315
|
+
* @internal
|
|
316
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
317
|
+
*/
|
|
318
|
+
export namespace GetAgentToolApprovalRequired$ {
|
|
319
|
+
/** @deprecated use `GetAgentToolApprovalRequired$inboundSchema` instead. */
|
|
320
|
+
export const inboundSchema = GetAgentToolApprovalRequired$inboundSchema;
|
|
321
|
+
/** @deprecated use `GetAgentToolApprovalRequired$outboundSchema` instead. */
|
|
322
|
+
export const outboundSchema = GetAgentToolApprovalRequired$outboundSchema;
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
/** @internal */
|
|
326
|
+
export const Conditions$inboundSchema: z.ZodType<
|
|
327
|
+
Conditions,
|
|
328
|
+
z.ZodTypeDef,
|
|
329
|
+
unknown
|
|
330
|
+
> = z.object({
|
|
331
|
+
condition: z.string(),
|
|
332
|
+
operator: z.string(),
|
|
333
|
+
value: z.string(),
|
|
334
|
+
});
|
|
335
|
+
|
|
336
|
+
/** @internal */
|
|
337
|
+
export type Conditions$Outbound = {
|
|
338
|
+
condition: string;
|
|
339
|
+
operator: string;
|
|
340
|
+
value: string;
|
|
341
|
+
};
|
|
342
|
+
|
|
343
|
+
/** @internal */
|
|
344
|
+
export const Conditions$outboundSchema: z.ZodType<
|
|
345
|
+
Conditions$Outbound,
|
|
346
|
+
z.ZodTypeDef,
|
|
347
|
+
Conditions
|
|
348
|
+
> = z.object({
|
|
349
|
+
condition: z.string(),
|
|
350
|
+
operator: z.string(),
|
|
351
|
+
value: z.string(),
|
|
352
|
+
});
|
|
353
|
+
|
|
354
|
+
/**
|
|
355
|
+
* @internal
|
|
356
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
357
|
+
*/
|
|
358
|
+
export namespace Conditions$ {
|
|
359
|
+
/** @deprecated use `Conditions$inboundSchema` instead. */
|
|
360
|
+
export const inboundSchema = Conditions$inboundSchema;
|
|
361
|
+
/** @deprecated use `Conditions$outboundSchema` instead. */
|
|
362
|
+
export const outboundSchema = Conditions$outboundSchema;
|
|
363
|
+
/** @deprecated use `Conditions$Outbound` instead. */
|
|
364
|
+
export type Outbound = Conditions$Outbound;
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
export function conditionsToJSON(conditions: Conditions): string {
|
|
368
|
+
return JSON.stringify(Conditions$outboundSchema.parse(conditions));
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
export function conditionsFromJSON(
|
|
372
|
+
jsonString: string,
|
|
373
|
+
): SafeParseResult<Conditions, SDKValidationError> {
|
|
374
|
+
return safeParse(
|
|
375
|
+
jsonString,
|
|
376
|
+
(x) => Conditions$inboundSchema.parse(JSON.parse(x)),
|
|
377
|
+
`Failed to parse 'Conditions' from JSON`,
|
|
378
|
+
);
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
/** @internal */
|
|
382
|
+
export const GetAgentTools$inboundSchema: z.ZodType<
|
|
383
|
+
GetAgentTools,
|
|
384
|
+
z.ZodTypeDef,
|
|
385
|
+
unknown
|
|
386
|
+
> = z.object({
|
|
387
|
+
id: z.string(),
|
|
388
|
+
action_type: z.string(),
|
|
389
|
+
display_name: z.string().optional(),
|
|
390
|
+
requires_approval: z.boolean(),
|
|
391
|
+
conditions: z.array(z.lazy(() => Conditions$inboundSchema)).optional(),
|
|
392
|
+
mcpServer: z.string().optional(),
|
|
393
|
+
timeout: z.number().default(120),
|
|
394
|
+
}).transform((v) => {
|
|
395
|
+
return remap$(v, {
|
|
396
|
+
"action_type": "actionType",
|
|
397
|
+
"display_name": "displayName",
|
|
398
|
+
"requires_approval": "requiresApproval",
|
|
399
|
+
});
|
|
400
|
+
});
|
|
401
|
+
|
|
402
|
+
/** @internal */
|
|
403
|
+
export type GetAgentTools$Outbound = {
|
|
404
|
+
id: string;
|
|
405
|
+
action_type: string;
|
|
406
|
+
display_name?: string | undefined;
|
|
407
|
+
requires_approval: boolean;
|
|
408
|
+
conditions?: Array<Conditions$Outbound> | undefined;
|
|
409
|
+
mcpServer?: string | undefined;
|
|
410
|
+
timeout: number;
|
|
411
|
+
};
|
|
412
|
+
|
|
413
|
+
/** @internal */
|
|
414
|
+
export const GetAgentTools$outboundSchema: z.ZodType<
|
|
415
|
+
GetAgentTools$Outbound,
|
|
416
|
+
z.ZodTypeDef,
|
|
417
|
+
GetAgentTools
|
|
418
|
+
> = z.object({
|
|
419
|
+
id: z.string(),
|
|
420
|
+
actionType: z.string(),
|
|
421
|
+
displayName: z.string().optional(),
|
|
422
|
+
requiresApproval: z.boolean(),
|
|
423
|
+
conditions: z.array(z.lazy(() => Conditions$outboundSchema)).optional(),
|
|
424
|
+
mcpServer: z.string().optional(),
|
|
425
|
+
timeout: z.number().default(120),
|
|
426
|
+
}).transform((v) => {
|
|
427
|
+
return remap$(v, {
|
|
428
|
+
actionType: "action_type",
|
|
429
|
+
displayName: "display_name",
|
|
430
|
+
requiresApproval: "requires_approval",
|
|
431
|
+
});
|
|
432
|
+
});
|
|
433
|
+
|
|
434
|
+
/**
|
|
435
|
+
* @internal
|
|
436
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
437
|
+
*/
|
|
438
|
+
export namespace GetAgentTools$ {
|
|
439
|
+
/** @deprecated use `GetAgentTools$inboundSchema` instead. */
|
|
440
|
+
export const inboundSchema = GetAgentTools$inboundSchema;
|
|
441
|
+
/** @deprecated use `GetAgentTools$outboundSchema` instead. */
|
|
442
|
+
export const outboundSchema = GetAgentTools$outboundSchema;
|
|
443
|
+
/** @deprecated use `GetAgentTools$Outbound` instead. */
|
|
444
|
+
export type Outbound = GetAgentTools$Outbound;
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
export function getAgentToolsToJSON(getAgentTools: GetAgentTools): string {
|
|
448
|
+
return JSON.stringify(GetAgentTools$outboundSchema.parse(getAgentTools));
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
export function getAgentToolsFromJSON(
|
|
452
|
+
jsonString: string,
|
|
453
|
+
): SafeParseResult<GetAgentTools, SDKValidationError> {
|
|
454
|
+
return safeParse(
|
|
455
|
+
jsonString,
|
|
456
|
+
(x) => GetAgentTools$inboundSchema.parse(JSON.parse(x)),
|
|
457
|
+
`Failed to parse 'GetAgentTools' from JSON`,
|
|
458
|
+
);
|
|
459
|
+
}
|
|
460
|
+
|
|
461
|
+
/** @internal */
|
|
462
|
+
export const GetAgentSettings$inboundSchema: z.ZodType<
|
|
463
|
+
GetAgentSettings,
|
|
464
|
+
z.ZodTypeDef,
|
|
465
|
+
unknown
|
|
466
|
+
> = z.object({
|
|
467
|
+
max_iterations: z.number().int().default(10),
|
|
468
|
+
max_execution_time: z.number().int(),
|
|
469
|
+
tool_approval_required: GetAgentToolApprovalRequired$inboundSchema.default(
|
|
470
|
+
"respect_tool",
|
|
471
|
+
),
|
|
472
|
+
tools: z.array(z.lazy(() => GetAgentTools$inboundSchema)),
|
|
473
|
+
}).transform((v) => {
|
|
474
|
+
return remap$(v, {
|
|
475
|
+
"max_iterations": "maxIterations",
|
|
476
|
+
"max_execution_time": "maxExecutionTime",
|
|
477
|
+
"tool_approval_required": "toolApprovalRequired",
|
|
478
|
+
});
|
|
479
|
+
});
|
|
480
|
+
|
|
481
|
+
/** @internal */
|
|
482
|
+
export type GetAgentSettings$Outbound = {
|
|
483
|
+
max_iterations: number;
|
|
484
|
+
max_execution_time: number;
|
|
485
|
+
tool_approval_required: string;
|
|
486
|
+
tools: Array<GetAgentTools$Outbound>;
|
|
487
|
+
};
|
|
488
|
+
|
|
489
|
+
/** @internal */
|
|
490
|
+
export const GetAgentSettings$outboundSchema: z.ZodType<
|
|
491
|
+
GetAgentSettings$Outbound,
|
|
492
|
+
z.ZodTypeDef,
|
|
493
|
+
GetAgentSettings
|
|
494
|
+
> = z.object({
|
|
495
|
+
maxIterations: z.number().int().default(10),
|
|
496
|
+
maxExecutionTime: z.number().int(),
|
|
497
|
+
toolApprovalRequired: GetAgentToolApprovalRequired$outboundSchema.default(
|
|
498
|
+
"respect_tool",
|
|
499
|
+
),
|
|
500
|
+
tools: z.array(z.lazy(() => GetAgentTools$outboundSchema)),
|
|
501
|
+
}).transform((v) => {
|
|
502
|
+
return remap$(v, {
|
|
503
|
+
maxIterations: "max_iterations",
|
|
504
|
+
maxExecutionTime: "max_execution_time",
|
|
505
|
+
toolApprovalRequired: "tool_approval_required",
|
|
506
|
+
});
|
|
507
|
+
});
|
|
508
|
+
|
|
509
|
+
/**
|
|
510
|
+
* @internal
|
|
511
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
512
|
+
*/
|
|
513
|
+
export namespace GetAgentSettings$ {
|
|
514
|
+
/** @deprecated use `GetAgentSettings$inboundSchema` instead. */
|
|
515
|
+
export const inboundSchema = GetAgentSettings$inboundSchema;
|
|
516
|
+
/** @deprecated use `GetAgentSettings$outboundSchema` instead. */
|
|
517
|
+
export const outboundSchema = GetAgentSettings$outboundSchema;
|
|
518
|
+
/** @deprecated use `GetAgentSettings$Outbound` instead. */
|
|
519
|
+
export type Outbound = GetAgentSettings$Outbound;
|
|
520
|
+
}
|
|
521
|
+
|
|
522
|
+
export function getAgentSettingsToJSON(
|
|
523
|
+
getAgentSettings: GetAgentSettings,
|
|
524
|
+
): string {
|
|
525
|
+
return JSON.stringify(
|
|
526
|
+
GetAgentSettings$outboundSchema.parse(getAgentSettings),
|
|
527
|
+
);
|
|
528
|
+
}
|
|
529
|
+
|
|
530
|
+
export function getAgentSettingsFromJSON(
|
|
531
|
+
jsonString: string,
|
|
532
|
+
): SafeParseResult<GetAgentSettings, SDKValidationError> {
|
|
533
|
+
return safeParse(
|
|
534
|
+
jsonString,
|
|
535
|
+
(x) => GetAgentSettings$inboundSchema.parse(JSON.parse(x)),
|
|
536
|
+
`Failed to parse 'GetAgentSettings' from JSON`,
|
|
537
|
+
);
|
|
538
|
+
}
|
|
539
|
+
|
|
540
|
+
/** @internal */
|
|
541
|
+
export const GetAgentModel$inboundSchema: z.ZodType<
|
|
542
|
+
GetAgentModel,
|
|
543
|
+
z.ZodTypeDef,
|
|
544
|
+
unknown
|
|
545
|
+
> = z.object({
|
|
546
|
+
id: z.string(),
|
|
547
|
+
integration_id: z.string().optional(),
|
|
548
|
+
fallback_models: z.array(z.string()).optional(),
|
|
549
|
+
max_tokens: z.number().int().optional(),
|
|
550
|
+
temperature: z.number().optional(),
|
|
551
|
+
}).transform((v) => {
|
|
552
|
+
return remap$(v, {
|
|
553
|
+
"integration_id": "integrationId",
|
|
554
|
+
"fallback_models": "fallbackModels",
|
|
555
|
+
"max_tokens": "maxTokens",
|
|
556
|
+
});
|
|
557
|
+
});
|
|
558
|
+
|
|
559
|
+
/** @internal */
|
|
560
|
+
export type GetAgentModel$Outbound = {
|
|
561
|
+
id: string;
|
|
562
|
+
integration_id?: string | undefined;
|
|
563
|
+
fallback_models?: Array<string> | undefined;
|
|
564
|
+
max_tokens?: number | undefined;
|
|
565
|
+
temperature?: number | undefined;
|
|
566
|
+
};
|
|
567
|
+
|
|
568
|
+
/** @internal */
|
|
569
|
+
export const GetAgentModel$outboundSchema: z.ZodType<
|
|
570
|
+
GetAgentModel$Outbound,
|
|
571
|
+
z.ZodTypeDef,
|
|
572
|
+
GetAgentModel
|
|
573
|
+
> = z.object({
|
|
574
|
+
id: z.string(),
|
|
575
|
+
integrationId: z.string().optional(),
|
|
576
|
+
fallbackModels: z.array(z.string()).optional(),
|
|
577
|
+
maxTokens: z.number().int().optional(),
|
|
578
|
+
temperature: z.number().optional(),
|
|
579
|
+
}).transform((v) => {
|
|
580
|
+
return remap$(v, {
|
|
581
|
+
integrationId: "integration_id",
|
|
582
|
+
fallbackModels: "fallback_models",
|
|
583
|
+
maxTokens: "max_tokens",
|
|
584
|
+
});
|
|
585
|
+
});
|
|
586
|
+
|
|
587
|
+
/**
|
|
588
|
+
* @internal
|
|
589
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
590
|
+
*/
|
|
591
|
+
export namespace GetAgentModel$ {
|
|
592
|
+
/** @deprecated use `GetAgentModel$inboundSchema` instead. */
|
|
593
|
+
export const inboundSchema = GetAgentModel$inboundSchema;
|
|
594
|
+
/** @deprecated use `GetAgentModel$outboundSchema` instead. */
|
|
595
|
+
export const outboundSchema = GetAgentModel$outboundSchema;
|
|
596
|
+
/** @deprecated use `GetAgentModel$Outbound` instead. */
|
|
597
|
+
export type Outbound = GetAgentModel$Outbound;
|
|
598
|
+
}
|
|
599
|
+
|
|
600
|
+
export function getAgentModelToJSON(getAgentModel: GetAgentModel): string {
|
|
601
|
+
return JSON.stringify(GetAgentModel$outboundSchema.parse(getAgentModel));
|
|
602
|
+
}
|
|
603
|
+
|
|
604
|
+
export function getAgentModelFromJSON(
|
|
605
|
+
jsonString: string,
|
|
606
|
+
): SafeParseResult<GetAgentModel, SDKValidationError> {
|
|
607
|
+
return safeParse(
|
|
608
|
+
jsonString,
|
|
609
|
+
(x) => GetAgentModel$inboundSchema.parse(JSON.parse(x)),
|
|
610
|
+
`Failed to parse 'GetAgentModel' from JSON`,
|
|
611
|
+
);
|
|
612
|
+
}
|
|
613
|
+
|
|
614
|
+
/** @internal */
|
|
615
|
+
export const GetAgentTeamOfAgents$inboundSchema: z.ZodType<
|
|
616
|
+
GetAgentTeamOfAgents,
|
|
617
|
+
z.ZodTypeDef,
|
|
618
|
+
unknown
|
|
619
|
+
> = z.object({
|
|
620
|
+
_id: z.string(),
|
|
621
|
+
role: z.string().optional(),
|
|
622
|
+
}).transform((v) => {
|
|
623
|
+
return remap$(v, {
|
|
624
|
+
"_id": "id",
|
|
625
|
+
});
|
|
626
|
+
});
|
|
627
|
+
|
|
628
|
+
/** @internal */
|
|
629
|
+
export type GetAgentTeamOfAgents$Outbound = {
|
|
630
|
+
_id: string;
|
|
631
|
+
role?: string | undefined;
|
|
632
|
+
};
|
|
633
|
+
|
|
634
|
+
/** @internal */
|
|
635
|
+
export const GetAgentTeamOfAgents$outboundSchema: z.ZodType<
|
|
636
|
+
GetAgentTeamOfAgents$Outbound,
|
|
637
|
+
z.ZodTypeDef,
|
|
638
|
+
GetAgentTeamOfAgents
|
|
639
|
+
> = z.object({
|
|
640
|
+
id: z.string(),
|
|
641
|
+
role: z.string().optional(),
|
|
642
|
+
}).transform((v) => {
|
|
643
|
+
return remap$(v, {
|
|
644
|
+
id: "_id",
|
|
645
|
+
});
|
|
646
|
+
});
|
|
647
|
+
|
|
648
|
+
/**
|
|
649
|
+
* @internal
|
|
650
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
651
|
+
*/
|
|
652
|
+
export namespace GetAgentTeamOfAgents$ {
|
|
653
|
+
/** @deprecated use `GetAgentTeamOfAgents$inboundSchema` instead. */
|
|
654
|
+
export const inboundSchema = GetAgentTeamOfAgents$inboundSchema;
|
|
655
|
+
/** @deprecated use `GetAgentTeamOfAgents$outboundSchema` instead. */
|
|
656
|
+
export const outboundSchema = GetAgentTeamOfAgents$outboundSchema;
|
|
657
|
+
/** @deprecated use `GetAgentTeamOfAgents$Outbound` instead. */
|
|
658
|
+
export type Outbound = GetAgentTeamOfAgents$Outbound;
|
|
659
|
+
}
|
|
660
|
+
|
|
661
|
+
export function getAgentTeamOfAgentsToJSON(
|
|
662
|
+
getAgentTeamOfAgents: GetAgentTeamOfAgents,
|
|
663
|
+
): string {
|
|
664
|
+
return JSON.stringify(
|
|
665
|
+
GetAgentTeamOfAgents$outboundSchema.parse(getAgentTeamOfAgents),
|
|
666
|
+
);
|
|
667
|
+
}
|
|
668
|
+
|
|
669
|
+
export function getAgentTeamOfAgentsFromJSON(
|
|
670
|
+
jsonString: string,
|
|
671
|
+
): SafeParseResult<GetAgentTeamOfAgents, SDKValidationError> {
|
|
672
|
+
return safeParse(
|
|
673
|
+
jsonString,
|
|
674
|
+
(x) => GetAgentTeamOfAgents$inboundSchema.parse(JSON.parse(x)),
|
|
675
|
+
`Failed to parse 'GetAgentTeamOfAgents' from JSON`,
|
|
676
|
+
);
|
|
677
|
+
}
|
|
678
|
+
|
|
679
|
+
/** @internal */
|
|
680
|
+
export const Metrics$inboundSchema: z.ZodType<Metrics, z.ZodTypeDef, unknown> =
|
|
681
|
+
z.object({
|
|
682
|
+
total_cost: z.number().default(0),
|
|
683
|
+
}).transform((v) => {
|
|
684
|
+
return remap$(v, {
|
|
685
|
+
"total_cost": "totalCost",
|
|
686
|
+
});
|
|
687
|
+
});
|
|
688
|
+
|
|
689
|
+
/** @internal */
|
|
690
|
+
export type Metrics$Outbound = {
|
|
691
|
+
total_cost: number;
|
|
692
|
+
};
|
|
693
|
+
|
|
694
|
+
/** @internal */
|
|
695
|
+
export const Metrics$outboundSchema: z.ZodType<
|
|
696
|
+
Metrics$Outbound,
|
|
697
|
+
z.ZodTypeDef,
|
|
698
|
+
Metrics
|
|
699
|
+
> = z.object({
|
|
700
|
+
totalCost: z.number().default(0),
|
|
701
|
+
}).transform((v) => {
|
|
702
|
+
return remap$(v, {
|
|
703
|
+
totalCost: "total_cost",
|
|
704
|
+
});
|
|
705
|
+
});
|
|
706
|
+
|
|
707
|
+
/**
|
|
708
|
+
* @internal
|
|
709
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
710
|
+
*/
|
|
711
|
+
export namespace Metrics$ {
|
|
712
|
+
/** @deprecated use `Metrics$inboundSchema` instead. */
|
|
713
|
+
export const inboundSchema = Metrics$inboundSchema;
|
|
714
|
+
/** @deprecated use `Metrics$outboundSchema` instead. */
|
|
715
|
+
export const outboundSchema = Metrics$outboundSchema;
|
|
716
|
+
/** @deprecated use `Metrics$Outbound` instead. */
|
|
717
|
+
export type Outbound = Metrics$Outbound;
|
|
718
|
+
}
|
|
719
|
+
|
|
720
|
+
export function metricsToJSON(metrics: Metrics): string {
|
|
721
|
+
return JSON.stringify(Metrics$outboundSchema.parse(metrics));
|
|
722
|
+
}
|
|
723
|
+
|
|
724
|
+
export function metricsFromJSON(
|
|
725
|
+
jsonString: string,
|
|
726
|
+
): SafeParseResult<Metrics, SDKValidationError> {
|
|
727
|
+
return safeParse(
|
|
728
|
+
jsonString,
|
|
729
|
+
(x) => Metrics$inboundSchema.parse(JSON.parse(x)),
|
|
730
|
+
`Failed to parse 'Metrics' from JSON`,
|
|
731
|
+
);
|
|
732
|
+
}
|
|
733
|
+
|
|
734
|
+
/** @internal */
|
|
735
|
+
export const GetAgentConfigurationType$inboundSchema: z.ZodNativeEnum<
|
|
736
|
+
typeof GetAgentConfigurationType
|
|
737
|
+
> = z.nativeEnum(GetAgentConfigurationType);
|
|
738
|
+
|
|
739
|
+
/** @internal */
|
|
740
|
+
export const GetAgentConfigurationType$outboundSchema: z.ZodNativeEnum<
|
|
741
|
+
typeof GetAgentConfigurationType
|
|
742
|
+
> = GetAgentConfigurationType$inboundSchema;
|
|
743
|
+
|
|
744
|
+
/**
|
|
745
|
+
* @internal
|
|
746
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
747
|
+
*/
|
|
748
|
+
export namespace GetAgentConfigurationType$ {
|
|
749
|
+
/** @deprecated use `GetAgentConfigurationType$inboundSchema` instead. */
|
|
750
|
+
export const inboundSchema = GetAgentConfigurationType$inboundSchema;
|
|
751
|
+
/** @deprecated use `GetAgentConfigurationType$outboundSchema` instead. */
|
|
752
|
+
export const outboundSchema = GetAgentConfigurationType$outboundSchema;
|
|
753
|
+
}
|
|
754
|
+
|
|
755
|
+
/** @internal */
|
|
756
|
+
export const Configuration2$inboundSchema: z.ZodType<
|
|
757
|
+
Configuration2,
|
|
758
|
+
z.ZodTypeDef,
|
|
759
|
+
unknown
|
|
760
|
+
> = z.object({
|
|
761
|
+
type: GetAgentConfigurationType$inboundSchema,
|
|
762
|
+
query: z.string(),
|
|
763
|
+
});
|
|
764
|
+
|
|
765
|
+
/** @internal */
|
|
766
|
+
export type Configuration2$Outbound = {
|
|
767
|
+
type: string;
|
|
768
|
+
query: string;
|
|
769
|
+
};
|
|
770
|
+
|
|
771
|
+
/** @internal */
|
|
772
|
+
export const Configuration2$outboundSchema: z.ZodType<
|
|
773
|
+
Configuration2$Outbound,
|
|
774
|
+
z.ZodTypeDef,
|
|
775
|
+
Configuration2
|
|
776
|
+
> = z.object({
|
|
777
|
+
type: GetAgentConfigurationType$outboundSchema,
|
|
778
|
+
query: z.string(),
|
|
779
|
+
});
|
|
780
|
+
|
|
781
|
+
/**
|
|
782
|
+
* @internal
|
|
783
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
784
|
+
*/
|
|
785
|
+
export namespace Configuration2$ {
|
|
786
|
+
/** @deprecated use `Configuration2$inboundSchema` instead. */
|
|
787
|
+
export const inboundSchema = Configuration2$inboundSchema;
|
|
788
|
+
/** @deprecated use `Configuration2$outboundSchema` instead. */
|
|
789
|
+
export const outboundSchema = Configuration2$outboundSchema;
|
|
790
|
+
/** @deprecated use `Configuration2$Outbound` instead. */
|
|
791
|
+
export type Outbound = Configuration2$Outbound;
|
|
792
|
+
}
|
|
793
|
+
|
|
794
|
+
export function configuration2ToJSON(configuration2: Configuration2): string {
|
|
795
|
+
return JSON.stringify(Configuration2$outboundSchema.parse(configuration2));
|
|
796
|
+
}
|
|
797
|
+
|
|
798
|
+
export function configuration2FromJSON(
|
|
799
|
+
jsonString: string,
|
|
800
|
+
): SafeParseResult<Configuration2, SDKValidationError> {
|
|
801
|
+
return safeParse(
|
|
802
|
+
jsonString,
|
|
803
|
+
(x) => Configuration2$inboundSchema.parse(JSON.parse(x)),
|
|
804
|
+
`Failed to parse 'Configuration2' from JSON`,
|
|
805
|
+
);
|
|
806
|
+
}
|
|
807
|
+
|
|
808
|
+
/** @internal */
|
|
809
|
+
export const ConfigurationType$inboundSchema: z.ZodNativeEnum<
|
|
810
|
+
typeof ConfigurationType
|
|
811
|
+
> = z.nativeEnum(ConfigurationType);
|
|
812
|
+
|
|
813
|
+
/** @internal */
|
|
814
|
+
export const ConfigurationType$outboundSchema: z.ZodNativeEnum<
|
|
815
|
+
typeof ConfigurationType
|
|
816
|
+
> = ConfigurationType$inboundSchema;
|
|
817
|
+
|
|
818
|
+
/**
|
|
819
|
+
* @internal
|
|
820
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
821
|
+
*/
|
|
822
|
+
export namespace ConfigurationType$ {
|
|
823
|
+
/** @deprecated use `ConfigurationType$inboundSchema` instead. */
|
|
824
|
+
export const inboundSchema = ConfigurationType$inboundSchema;
|
|
825
|
+
/** @deprecated use `ConfigurationType$outboundSchema` instead. */
|
|
826
|
+
export const outboundSchema = ConfigurationType$outboundSchema;
|
|
827
|
+
}
|
|
828
|
+
|
|
829
|
+
/** @internal */
|
|
830
|
+
export const Configuration1$inboundSchema: z.ZodType<
|
|
831
|
+
Configuration1,
|
|
832
|
+
z.ZodTypeDef,
|
|
833
|
+
unknown
|
|
834
|
+
> = z.object({
|
|
835
|
+
type: ConfigurationType$inboundSchema,
|
|
836
|
+
});
|
|
837
|
+
|
|
838
|
+
/** @internal */
|
|
839
|
+
export type Configuration1$Outbound = {
|
|
840
|
+
type: string;
|
|
841
|
+
};
|
|
842
|
+
|
|
843
|
+
/** @internal */
|
|
844
|
+
export const Configuration1$outboundSchema: z.ZodType<
|
|
845
|
+
Configuration1$Outbound,
|
|
846
|
+
z.ZodTypeDef,
|
|
847
|
+
Configuration1
|
|
848
|
+
> = z.object({
|
|
849
|
+
type: ConfigurationType$outboundSchema,
|
|
850
|
+
});
|
|
851
|
+
|
|
852
|
+
/**
|
|
853
|
+
* @internal
|
|
854
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
855
|
+
*/
|
|
856
|
+
export namespace Configuration1$ {
|
|
857
|
+
/** @deprecated use `Configuration1$inboundSchema` instead. */
|
|
858
|
+
export const inboundSchema = Configuration1$inboundSchema;
|
|
859
|
+
/** @deprecated use `Configuration1$outboundSchema` instead. */
|
|
860
|
+
export const outboundSchema = Configuration1$outboundSchema;
|
|
861
|
+
/** @deprecated use `Configuration1$Outbound` instead. */
|
|
862
|
+
export type Outbound = Configuration1$Outbound;
|
|
863
|
+
}
|
|
864
|
+
|
|
865
|
+
export function configuration1ToJSON(configuration1: Configuration1): string {
|
|
866
|
+
return JSON.stringify(Configuration1$outboundSchema.parse(configuration1));
|
|
867
|
+
}
|
|
868
|
+
|
|
869
|
+
export function configuration1FromJSON(
|
|
870
|
+
jsonString: string,
|
|
871
|
+
): SafeParseResult<Configuration1, SDKValidationError> {
|
|
872
|
+
return safeParse(
|
|
873
|
+
jsonString,
|
|
874
|
+
(x) => Configuration1$inboundSchema.parse(JSON.parse(x)),
|
|
875
|
+
`Failed to parse 'Configuration1' from JSON`,
|
|
876
|
+
);
|
|
877
|
+
}
|
|
878
|
+
|
|
879
|
+
/** @internal */
|
|
880
|
+
export const Configuration$inboundSchema: z.ZodType<
|
|
881
|
+
Configuration,
|
|
882
|
+
z.ZodTypeDef,
|
|
883
|
+
unknown
|
|
884
|
+
> = z.union([
|
|
885
|
+
z.lazy(() => Configuration2$inboundSchema),
|
|
886
|
+
z.lazy(() => Configuration1$inboundSchema),
|
|
887
|
+
]);
|
|
888
|
+
|
|
889
|
+
/** @internal */
|
|
890
|
+
export type Configuration$Outbound =
|
|
891
|
+
| Configuration2$Outbound
|
|
892
|
+
| Configuration1$Outbound;
|
|
893
|
+
|
|
894
|
+
/** @internal */
|
|
895
|
+
export const Configuration$outboundSchema: z.ZodType<
|
|
896
|
+
Configuration$Outbound,
|
|
897
|
+
z.ZodTypeDef,
|
|
898
|
+
Configuration
|
|
899
|
+
> = z.union([
|
|
900
|
+
z.lazy(() => Configuration2$outboundSchema),
|
|
901
|
+
z.lazy(() => Configuration1$outboundSchema),
|
|
902
|
+
]);
|
|
903
|
+
|
|
904
|
+
/**
|
|
905
|
+
* @internal
|
|
906
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
907
|
+
*/
|
|
908
|
+
export namespace Configuration$ {
|
|
909
|
+
/** @deprecated use `Configuration$inboundSchema` instead. */
|
|
910
|
+
export const inboundSchema = Configuration$inboundSchema;
|
|
911
|
+
/** @deprecated use `Configuration$outboundSchema` instead. */
|
|
912
|
+
export const outboundSchema = Configuration$outboundSchema;
|
|
913
|
+
/** @deprecated use `Configuration$Outbound` instead. */
|
|
914
|
+
export type Outbound = Configuration$Outbound;
|
|
915
|
+
}
|
|
916
|
+
|
|
917
|
+
export function configurationToJSON(configuration: Configuration): string {
|
|
918
|
+
return JSON.stringify(Configuration$outboundSchema.parse(configuration));
|
|
919
|
+
}
|
|
920
|
+
|
|
921
|
+
export function configurationFromJSON(
|
|
922
|
+
jsonString: string,
|
|
923
|
+
): SafeParseResult<Configuration, SDKValidationError> {
|
|
924
|
+
return safeParse(
|
|
925
|
+
jsonString,
|
|
926
|
+
(x) => Configuration$inboundSchema.parse(JSON.parse(x)),
|
|
927
|
+
`Failed to parse 'Configuration' from JSON`,
|
|
928
|
+
);
|
|
929
|
+
}
|
|
930
|
+
|
|
931
|
+
/** @internal */
|
|
932
|
+
export const KnowledgeBases$inboundSchema: z.ZodType<
|
|
933
|
+
KnowledgeBases,
|
|
934
|
+
z.ZodTypeDef,
|
|
935
|
+
unknown
|
|
936
|
+
> = z.object({
|
|
937
|
+
id: z.string().default("01K4PX8V2EV1H6ARW3ZPSCSX6Q"),
|
|
938
|
+
knowledge_id: z.string(),
|
|
939
|
+
configuration: z.union([
|
|
940
|
+
z.lazy(() => Configuration2$inboundSchema),
|
|
941
|
+
z.lazy(() => Configuration1$inboundSchema),
|
|
942
|
+
]),
|
|
943
|
+
}).transform((v) => {
|
|
944
|
+
return remap$(v, {
|
|
945
|
+
"knowledge_id": "knowledgeId",
|
|
946
|
+
});
|
|
947
|
+
});
|
|
948
|
+
|
|
949
|
+
/** @internal */
|
|
950
|
+
export type KnowledgeBases$Outbound = {
|
|
951
|
+
id: string;
|
|
952
|
+
knowledge_id: string;
|
|
953
|
+
configuration: Configuration2$Outbound | Configuration1$Outbound;
|
|
954
|
+
};
|
|
955
|
+
|
|
956
|
+
/** @internal */
|
|
957
|
+
export const KnowledgeBases$outboundSchema: z.ZodType<
|
|
958
|
+
KnowledgeBases$Outbound,
|
|
959
|
+
z.ZodTypeDef,
|
|
960
|
+
KnowledgeBases
|
|
961
|
+
> = z.object({
|
|
962
|
+
id: z.string().default("01K4PX8V2EV1H6ARW3ZPSCSX6Q"),
|
|
963
|
+
knowledgeId: z.string(),
|
|
964
|
+
configuration: z.union([
|
|
965
|
+
z.lazy(() => Configuration2$outboundSchema),
|
|
966
|
+
z.lazy(() => Configuration1$outboundSchema),
|
|
967
|
+
]),
|
|
968
|
+
}).transform((v) => {
|
|
969
|
+
return remap$(v, {
|
|
970
|
+
knowledgeId: "knowledge_id",
|
|
971
|
+
});
|
|
972
|
+
});
|
|
973
|
+
|
|
974
|
+
/**
|
|
975
|
+
* @internal
|
|
976
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
977
|
+
*/
|
|
978
|
+
export namespace KnowledgeBases$ {
|
|
979
|
+
/** @deprecated use `KnowledgeBases$inboundSchema` instead. */
|
|
980
|
+
export const inboundSchema = KnowledgeBases$inboundSchema;
|
|
981
|
+
/** @deprecated use `KnowledgeBases$outboundSchema` instead. */
|
|
982
|
+
export const outboundSchema = KnowledgeBases$outboundSchema;
|
|
983
|
+
/** @deprecated use `KnowledgeBases$Outbound` instead. */
|
|
984
|
+
export type Outbound = KnowledgeBases$Outbound;
|
|
985
|
+
}
|
|
986
|
+
|
|
987
|
+
export function knowledgeBasesToJSON(knowledgeBases: KnowledgeBases): string {
|
|
988
|
+
return JSON.stringify(KnowledgeBases$outboundSchema.parse(knowledgeBases));
|
|
989
|
+
}
|
|
990
|
+
|
|
991
|
+
export function knowledgeBasesFromJSON(
|
|
992
|
+
jsonString: string,
|
|
993
|
+
): SafeParseResult<KnowledgeBases, SDKValidationError> {
|
|
994
|
+
return safeParse(
|
|
995
|
+
jsonString,
|
|
996
|
+
(x) => KnowledgeBases$inboundSchema.parse(JSON.parse(x)),
|
|
997
|
+
`Failed to parse 'KnowledgeBases' from JSON`,
|
|
998
|
+
);
|
|
999
|
+
}
|
|
1000
|
+
|
|
1001
|
+
/** @internal */
|
|
1002
|
+
export const HiddenPanels$inboundSchema: z.ZodNativeEnum<typeof HiddenPanels> =
|
|
1003
|
+
z.nativeEnum(HiddenPanels);
|
|
1004
|
+
|
|
1005
|
+
/** @internal */
|
|
1006
|
+
export const HiddenPanels$outboundSchema: z.ZodNativeEnum<typeof HiddenPanels> =
|
|
1007
|
+
HiddenPanels$inboundSchema;
|
|
1008
|
+
|
|
1009
|
+
/**
|
|
1010
|
+
* @internal
|
|
1011
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
1012
|
+
*/
|
|
1013
|
+
export namespace HiddenPanels$ {
|
|
1014
|
+
/** @deprecated use `HiddenPanels$inboundSchema` instead. */
|
|
1015
|
+
export const inboundSchema = HiddenPanels$inboundSchema;
|
|
1016
|
+
/** @deprecated use `HiddenPanels$outboundSchema` instead. */
|
|
1017
|
+
export const outboundSchema = HiddenPanels$outboundSchema;
|
|
1018
|
+
}
|
|
1019
|
+
|
|
1020
|
+
/** @internal */
|
|
1021
|
+
export const GetAgentResponseBody$inboundSchema: z.ZodType<
|
|
1022
|
+
GetAgentResponseBody,
|
|
1023
|
+
z.ZodTypeDef,
|
|
1024
|
+
unknown
|
|
1025
|
+
> = z.object({
|
|
1026
|
+
_id: z.string(),
|
|
1027
|
+
key: z.string(),
|
|
1028
|
+
workspace_id: z.string(),
|
|
1029
|
+
project_id: z.string(),
|
|
1030
|
+
created_by_id: z.string().optional(),
|
|
1031
|
+
updated_by_id: z.string().optional(),
|
|
1032
|
+
created: z.string().optional(),
|
|
1033
|
+
updated: z.string().optional(),
|
|
1034
|
+
role: z.string(),
|
|
1035
|
+
description: z.string(),
|
|
1036
|
+
system_prompt: z.string().optional(),
|
|
1037
|
+
instructions: z.string(),
|
|
1038
|
+
iconUrl: z.string().optional(),
|
|
1039
|
+
status: GetAgentStatus$inboundSchema,
|
|
1040
|
+
settings: z.lazy(() => GetAgentSettings$inboundSchema).optional(),
|
|
1041
|
+
model: z.lazy(() => GetAgentModel$inboundSchema),
|
|
1042
|
+
version_hash: z.string().optional(),
|
|
1043
|
+
path: z.string(),
|
|
1044
|
+
memory_stores: z.array(z.string()),
|
|
1045
|
+
team_of_agents: z.array(z.lazy(() => GetAgentTeamOfAgents$inboundSchema)),
|
|
1046
|
+
metrics: z.lazy(() => Metrics$inboundSchema).optional(),
|
|
1047
|
+
variables: z.record(z.any()).optional(),
|
|
1048
|
+
knowledge_bases: z.array(z.lazy(() => KnowledgeBases$inboundSchema))
|
|
1049
|
+
.optional(),
|
|
1050
|
+
hidden_panels: z.array(HiddenPanels$inboundSchema).optional(),
|
|
1051
|
+
}).transform((v) => {
|
|
1052
|
+
return remap$(v, {
|
|
1053
|
+
"_id": "id",
|
|
1054
|
+
"workspace_id": "workspaceId",
|
|
1055
|
+
"project_id": "projectId",
|
|
1056
|
+
"created_by_id": "createdById",
|
|
1057
|
+
"updated_by_id": "updatedById",
|
|
1058
|
+
"system_prompt": "systemPrompt",
|
|
1059
|
+
"version_hash": "versionHash",
|
|
1060
|
+
"memory_stores": "memoryStores",
|
|
1061
|
+
"team_of_agents": "teamOfAgents",
|
|
1062
|
+
"knowledge_bases": "knowledgeBases",
|
|
1063
|
+
"hidden_panels": "hiddenPanels",
|
|
1064
|
+
});
|
|
1065
|
+
});
|
|
1066
|
+
|
|
1067
|
+
/** @internal */
|
|
1068
|
+
export type GetAgentResponseBody$Outbound = {
|
|
1069
|
+
_id: string;
|
|
1070
|
+
key: string;
|
|
1071
|
+
workspace_id: string;
|
|
1072
|
+
project_id: string;
|
|
1073
|
+
created_by_id?: string | undefined;
|
|
1074
|
+
updated_by_id?: string | undefined;
|
|
1075
|
+
created?: string | undefined;
|
|
1076
|
+
updated?: string | undefined;
|
|
1077
|
+
role: string;
|
|
1078
|
+
description: string;
|
|
1079
|
+
system_prompt?: string | undefined;
|
|
1080
|
+
instructions: string;
|
|
1081
|
+
iconUrl?: string | undefined;
|
|
1082
|
+
status: string;
|
|
1083
|
+
settings?: GetAgentSettings$Outbound | undefined;
|
|
1084
|
+
model: GetAgentModel$Outbound;
|
|
1085
|
+
version_hash?: string | undefined;
|
|
1086
|
+
path: string;
|
|
1087
|
+
memory_stores: Array<string>;
|
|
1088
|
+
team_of_agents: Array<GetAgentTeamOfAgents$Outbound>;
|
|
1089
|
+
metrics?: Metrics$Outbound | undefined;
|
|
1090
|
+
variables?: { [k: string]: any } | undefined;
|
|
1091
|
+
knowledge_bases?: Array<KnowledgeBases$Outbound> | undefined;
|
|
1092
|
+
hidden_panels?: Array<string> | undefined;
|
|
1093
|
+
};
|
|
1094
|
+
|
|
1095
|
+
/** @internal */
|
|
1096
|
+
export const GetAgentResponseBody$outboundSchema: z.ZodType<
|
|
1097
|
+
GetAgentResponseBody$Outbound,
|
|
1098
|
+
z.ZodTypeDef,
|
|
1099
|
+
GetAgentResponseBody
|
|
1100
|
+
> = z.object({
|
|
1101
|
+
id: z.string(),
|
|
1102
|
+
key: z.string(),
|
|
1103
|
+
workspaceId: z.string(),
|
|
1104
|
+
projectId: z.string(),
|
|
1105
|
+
createdById: z.string().optional(),
|
|
1106
|
+
updatedById: z.string().optional(),
|
|
1107
|
+
created: z.string().optional(),
|
|
1108
|
+
updated: z.string().optional(),
|
|
1109
|
+
role: z.string(),
|
|
1110
|
+
description: z.string(),
|
|
1111
|
+
systemPrompt: z.string().optional(),
|
|
1112
|
+
instructions: z.string(),
|
|
1113
|
+
iconUrl: z.string().optional(),
|
|
1114
|
+
status: GetAgentStatus$outboundSchema,
|
|
1115
|
+
settings: z.lazy(() => GetAgentSettings$outboundSchema).optional(),
|
|
1116
|
+
model: z.lazy(() => GetAgentModel$outboundSchema),
|
|
1117
|
+
versionHash: z.string().optional(),
|
|
1118
|
+
path: z.string(),
|
|
1119
|
+
memoryStores: z.array(z.string()),
|
|
1120
|
+
teamOfAgents: z.array(z.lazy(() => GetAgentTeamOfAgents$outboundSchema)),
|
|
1121
|
+
metrics: z.lazy(() => Metrics$outboundSchema).optional(),
|
|
1122
|
+
variables: z.record(z.any()).optional(),
|
|
1123
|
+
knowledgeBases: z.array(z.lazy(() => KnowledgeBases$outboundSchema))
|
|
1124
|
+
.optional(),
|
|
1125
|
+
hiddenPanels: z.array(HiddenPanels$outboundSchema).optional(),
|
|
1126
|
+
}).transform((v) => {
|
|
1127
|
+
return remap$(v, {
|
|
1128
|
+
id: "_id",
|
|
1129
|
+
workspaceId: "workspace_id",
|
|
1130
|
+
projectId: "project_id",
|
|
1131
|
+
createdById: "created_by_id",
|
|
1132
|
+
updatedById: "updated_by_id",
|
|
1133
|
+
systemPrompt: "system_prompt",
|
|
1134
|
+
versionHash: "version_hash",
|
|
1135
|
+
memoryStores: "memory_stores",
|
|
1136
|
+
teamOfAgents: "team_of_agents",
|
|
1137
|
+
knowledgeBases: "knowledge_bases",
|
|
1138
|
+
hiddenPanels: "hidden_panels",
|
|
1139
|
+
});
|
|
1140
|
+
});
|
|
1141
|
+
|
|
1142
|
+
/**
|
|
1143
|
+
* @internal
|
|
1144
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
1145
|
+
*/
|
|
1146
|
+
export namespace GetAgentResponseBody$ {
|
|
1147
|
+
/** @deprecated use `GetAgentResponseBody$inboundSchema` instead. */
|
|
1148
|
+
export const inboundSchema = GetAgentResponseBody$inboundSchema;
|
|
1149
|
+
/** @deprecated use `GetAgentResponseBody$outboundSchema` instead. */
|
|
1150
|
+
export const outboundSchema = GetAgentResponseBody$outboundSchema;
|
|
1151
|
+
/** @deprecated use `GetAgentResponseBody$Outbound` instead. */
|
|
1152
|
+
export type Outbound = GetAgentResponseBody$Outbound;
|
|
1153
|
+
}
|
|
1154
|
+
|
|
1155
|
+
export function getAgentResponseBodyToJSON(
|
|
1156
|
+
getAgentResponseBody: GetAgentResponseBody,
|
|
1157
|
+
): string {
|
|
1158
|
+
return JSON.stringify(
|
|
1159
|
+
GetAgentResponseBody$outboundSchema.parse(getAgentResponseBody),
|
|
1160
|
+
);
|
|
1161
|
+
}
|
|
1162
|
+
|
|
1163
|
+
export function getAgentResponseBodyFromJSON(
|
|
1164
|
+
jsonString: string,
|
|
1165
|
+
): SafeParseResult<GetAgentResponseBody, SDKValidationError> {
|
|
1166
|
+
return safeParse(
|
|
1167
|
+
jsonString,
|
|
1168
|
+
(x) => GetAgentResponseBody$inboundSchema.parse(JSON.parse(x)),
|
|
1169
|
+
`Failed to parse 'GetAgentResponseBody' from JSON`,
|
|
1170
|
+
);
|
|
1171
|
+
}
|