@orq-ai/node 3.12.4 → 3.12.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (196) hide show
  1. package/bin/mcp-server.js +112 -112
  2. package/bin/mcp-server.js.map +30 -30
  3. package/examples/package-lock.json +1 -1
  4. package/jsr.json +1 -1
  5. package/lib/config.d.ts +3 -3
  6. package/lib/config.js +3 -3
  7. package/mcp-server/mcp-server.js +1 -1
  8. package/mcp-server/server.js +1 -1
  9. package/models/operations/createbudget.js +2 -2
  10. package/models/operations/createcontact.js +2 -2
  11. package/models/operations/createdataset.js +2 -2
  12. package/models/operations/createdatasetitem.js +2 -2
  13. package/models/operations/createdatasource.js +2 -2
  14. package/models/operations/createeval.js +16 -16
  15. package/models/operations/fileget.js +2 -2
  16. package/models/operations/filelist.js +2 -2
  17. package/models/operations/fileupload.js +2 -2
  18. package/models/operations/getbudget.js +2 -2
  19. package/models/operations/getevals.js +28 -28
  20. package/models/operations/listbudgets.js +2 -2
  21. package/models/operations/listcontacts.js +2 -2
  22. package/models/operations/listdatasetdatapoints.js +2 -2
  23. package/models/operations/listdatasets.js +2 -2
  24. package/models/operations/listdatasources.js +2 -2
  25. package/models/operations/retrievecontact.js +2 -2
  26. package/models/operations/retrievedatapoint.js +2 -2
  27. package/models/operations/retrievedataset.js +2 -2
  28. package/models/operations/retrievedatasource.js +2 -2
  29. package/models/operations/updatebudget.js +2 -2
  30. package/models/operations/updatecontact.js +2 -2
  31. package/models/operations/updatedatapoint.js +2 -2
  32. package/models/operations/updatedataset.js +2 -2
  33. package/models/operations/updatedatasource.js +2 -2
  34. package/models/operations/updateeval.js +16 -16
  35. package/package.json +1 -1
  36. package/packages/orq-rc/FUNCTIONS.md +9 -19
  37. package/packages/orq-rc/README.md +180 -181
  38. package/packages/orq-rc/docs/sdks/agents/README.md +702 -0
  39. package/packages/orq-rc/docs/sdks/budgets/README.md +5 -5
  40. package/packages/orq-rc/docs/sdks/memorystores/README.md +1172 -0
  41. package/packages/orq-rc/docs/sdks/orq/README.md +81 -0
  42. package/packages/orq-rc/examples/package-lock.json +1 -1
  43. package/packages/orq-rc/examples/postV2AgentsInternal.example.ts +30 -0
  44. package/packages/orq-rc/jsr.json +1 -1
  45. package/packages/orq-rc/package-lock.json +2 -2
  46. package/packages/orq-rc/package.json +1 -1
  47. package/packages/orq-rc/src/funcs/agentsList.ts +167 -0
  48. package/packages/orq-rc/src/funcs/agentsListActions.ts +169 -0
  49. package/packages/orq-rc/src/funcs/agentsRetrieve.ts +175 -0
  50. package/packages/orq-rc/src/funcs/agentsRetrieveAction.ts +173 -0
  51. package/packages/orq-rc/src/funcs/agentsRetrieveTask.ts +179 -0
  52. package/packages/orq-rc/src/funcs/agentsReviewAction.ts +177 -0
  53. package/packages/orq-rc/src/funcs/agentsRun.ts +163 -0
  54. package/packages/orq-rc/src/funcs/agentsStreamRun.ts +187 -0
  55. package/packages/orq-rc/src/funcs/budgetsCreate.ts +1 -1
  56. package/packages/orq-rc/src/funcs/budgetsGet.ts +2 -2
  57. package/packages/orq-rc/src/funcs/budgetsList.ts +2 -2
  58. package/packages/orq-rc/src/funcs/memoryStoresCreate.ts +171 -0
  59. package/packages/orq-rc/src/funcs/memoryStoresCreateDocument.ts +175 -0
  60. package/packages/orq-rc/src/funcs/memoryStoresCreateMemory.ts +170 -0
  61. package/packages/orq-rc/src/funcs/memoryStoresDelete.ts +168 -0
  62. package/packages/orq-rc/src/funcs/memoryStoresDeleteDocument.ts +184 -0
  63. package/packages/orq-rc/src/funcs/memoryStoresDeleteMemory.ts +179 -0
  64. package/packages/orq-rc/src/funcs/memoryStoresList.ts +178 -0
  65. package/packages/orq-rc/src/funcs/memoryStoresListDocuments.ts +181 -0
  66. package/packages/orq-rc/src/funcs/memoryStoresListMemories.ts +176 -0
  67. package/packages/orq-rc/src/funcs/memoryStoresRetrieve.ts +177 -0
  68. package/packages/orq-rc/src/funcs/memoryStoresRetrieveDocument.ts +178 -0
  69. package/packages/orq-rc/src/funcs/memoryStoresRetrieveMemory.ts +173 -0
  70. package/packages/orq-rc/src/funcs/memoryStoresUpdate.ts +168 -0
  71. package/packages/orq-rc/src/funcs/memoryStoresUpdateDocument.ts +179 -0
  72. package/packages/orq-rc/src/funcs/memoryStoresUpdateMemory.ts +174 -0
  73. package/packages/orq-rc/src/funcs/postV2AgentsInternal.ts +159 -0
  74. package/packages/orq-rc/src/lib/config.ts +3 -3
  75. package/packages/orq-rc/src/mcp-server/mcp-server.ts +1 -1
  76. package/packages/orq-rc/src/mcp-server/server.ts +49 -1
  77. package/packages/orq-rc/src/mcp-server/tools/agentsList.ts +37 -0
  78. package/packages/orq-rc/src/mcp-server/tools/agentsListActions.ts +35 -0
  79. package/packages/orq-rc/src/mcp-server/tools/agentsRetrieve.ts +37 -0
  80. package/packages/orq-rc/src/mcp-server/tools/agentsRetrieveAction.ts +35 -0
  81. package/packages/orq-rc/src/mcp-server/tools/agentsRetrieveTask.ts +37 -0
  82. package/packages/orq-rc/src/mcp-server/tools/agentsReviewAction.ts +37 -0
  83. package/packages/orq-rc/src/mcp-server/tools/agentsRun.ts +37 -0
  84. package/packages/orq-rc/src/mcp-server/tools/agentsStreamRun.ts +37 -0
  85. package/packages/orq-rc/src/mcp-server/tools/budgetsCreate.ts +1 -1
  86. package/packages/orq-rc/src/mcp-server/tools/budgetsGet.ts +2 -2
  87. package/packages/orq-rc/src/mcp-server/tools/budgetsList.ts +2 -2
  88. package/packages/orq-rc/src/mcp-server/tools/memoryStoresCreate.ts +35 -0
  89. package/packages/orq-rc/src/mcp-server/tools/memoryStoresCreateDocument.ts +37 -0
  90. package/packages/orq-rc/src/mcp-server/tools/memoryStoresCreateMemory.ts +37 -0
  91. package/packages/orq-rc/src/mcp-server/tools/memoryStoresDelete.ts +35 -0
  92. package/packages/orq-rc/src/mcp-server/tools/memoryStoresDeleteDocument.ts +40 -0
  93. package/packages/orq-rc/src/mcp-server/tools/memoryStoresDeleteMemory.ts +40 -0
  94. package/packages/orq-rc/src/mcp-server/tools/memoryStoresList.ts +37 -0
  95. package/packages/orq-rc/src/mcp-server/tools/memoryStoresListDocuments.ts +37 -0
  96. package/packages/orq-rc/src/mcp-server/tools/memoryStoresListMemories.ts +37 -0
  97. package/packages/orq-rc/src/mcp-server/tools/memoryStoresRetrieve.ts +37 -0
  98. package/packages/orq-rc/src/mcp-server/tools/memoryStoresRetrieveDocument.ts +37 -0
  99. package/packages/orq-rc/src/mcp-server/tools/memoryStoresRetrieveMemory.ts +37 -0
  100. package/packages/orq-rc/src/mcp-server/tools/memoryStoresUpdate.ts +37 -0
  101. package/packages/orq-rc/src/mcp-server/tools/memoryStoresUpdateDocument.ts +37 -0
  102. package/packages/orq-rc/src/mcp-server/tools/memoryStoresUpdateMemory.ts +37 -0
  103. package/packages/orq-rc/src/mcp-server/tools/postV2AgentsInternal.ts +33 -0
  104. package/packages/orq-rc/src/models/errors/getagent.ts +80 -0
  105. package/packages/orq-rc/src/models/errors/getagenttask.ts +80 -0
  106. package/packages/orq-rc/src/models/errors/index.ts +3 -0
  107. package/packages/orq-rc/src/models/errors/streamrunagent.ts +80 -0
  108. package/packages/orq-rc/src/models/operations/createbudget.ts +57 -58
  109. package/packages/orq-rc/src/models/operations/createcontact.ts +2 -2
  110. package/packages/orq-rc/src/models/operations/createdataset.ts +2 -2
  111. package/packages/orq-rc/src/models/operations/createdatasetitem.ts +2 -2
  112. package/packages/orq-rc/src/models/operations/createdatasource.ts +2 -2
  113. package/packages/orq-rc/src/models/operations/createeval.ts +6383 -1075
  114. package/packages/orq-rc/src/models/operations/creatememory.ts +265 -0
  115. package/packages/orq-rc/src/models/operations/creatememorydocument.ts +284 -0
  116. package/packages/orq-rc/src/models/operations/creatememorystore.ts +1956 -0
  117. package/packages/orq-rc/src/models/operations/deletememory.ts +87 -0
  118. package/packages/orq-rc/src/models/operations/deletememorydocument.ts +98 -0
  119. package/packages/orq-rc/src/models/operations/deletememorystore.ts +78 -0
  120. package/packages/orq-rc/src/models/operations/deploymentgetconfig.ts +36 -27
  121. package/packages/orq-rc/src/models/operations/deploymentinvoke.ts +31 -24
  122. package/packages/orq-rc/src/models/operations/fileget.ts +2 -2
  123. package/packages/orq-rc/src/models/operations/filelist.ts +2 -2
  124. package/packages/orq-rc/src/models/operations/fileupload.ts +2 -2
  125. package/packages/orq-rc/src/models/operations/getagent.ts +1171 -0
  126. package/packages/orq-rc/src/models/operations/getagenttask.ts +257 -0
  127. package/packages/orq-rc/src/models/operations/getallmemories.ts +315 -0
  128. package/packages/orq-rc/src/models/operations/getallmemorydocuments.ts +335 -0
  129. package/packages/orq-rc/src/models/operations/getallmemorystores.ts +1241 -0
  130. package/packages/orq-rc/src/models/operations/getbudget.ts +2 -11
  131. package/packages/orq-rc/src/models/operations/getevals.ts +1362 -1166
  132. package/packages/orq-rc/src/models/operations/index.ts +24 -0
  133. package/packages/orq-rc/src/models/operations/listactions.ts +517 -0
  134. package/packages/orq-rc/src/models/operations/listagents.ts +1335 -0
  135. package/packages/orq-rc/src/models/operations/listbudgets.ts +5 -15
  136. package/packages/orq-rc/src/models/operations/listchunks.ts +21 -21
  137. package/packages/orq-rc/src/models/operations/listcontacts.ts +44 -37
  138. package/packages/orq-rc/src/models/operations/listdatasetdatapoints.ts +2 -2
  139. package/packages/orq-rc/src/models/operations/listdatasets.ts +2 -2
  140. package/packages/orq-rc/src/models/operations/listdatasources.ts +29 -22
  141. package/packages/orq-rc/src/models/operations/postv2agentsinternal.ts +103 -0
  142. package/packages/orq-rc/src/models/operations/retrieveaction.ts +419 -0
  143. package/packages/orq-rc/src/models/operations/retrievecontact.ts +2 -2
  144. package/packages/orq-rc/src/models/operations/retrievedatapoint.ts +2 -2
  145. package/packages/orq-rc/src/models/operations/retrievedataset.ts +2 -2
  146. package/packages/orq-rc/src/models/operations/retrievedatasource.ts +2 -2
  147. package/packages/orq-rc/src/models/operations/retrievememory.ts +198 -0
  148. package/packages/orq-rc/src/models/operations/retrievememorydocument.ts +217 -0
  149. package/packages/orq-rc/src/models/operations/retrievememorystore.ts +1124 -0
  150. package/packages/orq-rc/src/models/operations/reviewaction.ts +258 -0
  151. package/packages/orq-rc/src/models/operations/runagent.ts +3428 -0
  152. package/packages/orq-rc/src/models/operations/streamrunagent.ts +3361 -0
  153. package/packages/orq-rc/src/models/operations/updatebudget.ts +2 -11
  154. package/packages/orq-rc/src/models/operations/updatecontact.ts +2 -2
  155. package/packages/orq-rc/src/models/operations/updatedatapoint.ts +2 -2
  156. package/packages/orq-rc/src/models/operations/updatedataset.ts +2 -2
  157. package/packages/orq-rc/src/models/operations/updatedatasource.ts +2 -2
  158. package/packages/orq-rc/src/models/operations/updateeval.ts +6627 -1224
  159. package/packages/orq-rc/src/models/operations/updatememory.ts +274 -0
  160. package/packages/orq-rc/src/models/operations/updatememorydocument.ts +293 -0
  161. package/packages/orq-rc/src/models/operations/updatememorystore.ts +1348 -0
  162. package/packages/orq-rc/src/models/operations/updateprompt.ts +64 -19
  163. package/packages/orq-rc/src/sdk/agents.ts +148 -0
  164. package/packages/orq-rc/src/sdk/budgets.ts +5 -5
  165. package/packages/orq-rc/src/sdk/memorystores.ts +286 -0
  166. package/packages/orq-rc/src/sdk/sdk.ts +27 -1
  167. package/src/lib/config.ts +3 -3
  168. package/src/mcp-server/mcp-server.ts +1 -1
  169. package/src/mcp-server/server.ts +1 -1
  170. package/src/models/operations/createbudget.ts +2 -2
  171. package/src/models/operations/createcontact.ts +2 -2
  172. package/src/models/operations/createdataset.ts +2 -2
  173. package/src/models/operations/createdatasetitem.ts +2 -2
  174. package/src/models/operations/createdatasource.ts +2 -2
  175. package/src/models/operations/createeval.ts +16 -16
  176. package/src/models/operations/fileget.ts +2 -2
  177. package/src/models/operations/filelist.ts +2 -2
  178. package/src/models/operations/fileupload.ts +2 -2
  179. package/src/models/operations/getbudget.ts +2 -2
  180. package/src/models/operations/getevals.ts +28 -28
  181. package/src/models/operations/listbudgets.ts +2 -2
  182. package/src/models/operations/listcontacts.ts +2 -2
  183. package/src/models/operations/listdatasetdatapoints.ts +2 -2
  184. package/src/models/operations/listdatasets.ts +2 -2
  185. package/src/models/operations/listdatasources.ts +2 -2
  186. package/src/models/operations/retrievecontact.ts +2 -2
  187. package/src/models/operations/retrievedatapoint.ts +2 -2
  188. package/src/models/operations/retrievedataset.ts +2 -2
  189. package/src/models/operations/retrievedatasource.ts +2 -2
  190. package/src/models/operations/updatebudget.ts +2 -2
  191. package/src/models/operations/updatecontact.ts +2 -2
  192. package/src/models/operations/updatedatapoint.ts +2 -2
  193. package/src/models/operations/updatedataset.ts +2 -2
  194. package/src/models/operations/updatedatasource.ts +2 -2
  195. package/src/models/operations/updateeval.ts +16 -16
  196. package/packages/orq-rc/examples/contactsCreate.example.ts +0 -42
@@ -0,0 +1,1335 @@
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 ListAgentsRequest = {
13
+ /**
14
+ * A limit on the number of objects to be returned. Limit can range between 1 and 50, and the default is 10
15
+ */
16
+ limit?: number | undefined;
17
+ /**
18
+ * A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 20 objects, ending with `01JJ1HDHN79XAS7A01WB3HYSDB`, your subsequent call can include `after=01JJ1HDHN79XAS7A01WB3HYSDB` in order to fetch the next page of the list.
19
+ */
20
+ startingAfter?: string | undefined;
21
+ /**
22
+ * A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 20 objects, starting with `01JJ1HDHN79XAS7A01WB3HYSDB`, your subsequent call can include `before=01JJ1HDHN79XAS7A01WB3HYSDB` in order to fetch the previous page of the list.
23
+ */
24
+ endingBefore?: string | undefined;
25
+ };
26
+
27
+ export const ListAgentsObject = {
28
+ List: "list",
29
+ } as const;
30
+ export type ListAgentsObject = ClosedEnum<typeof ListAgentsObject>;
31
+
32
+ /**
33
+ * 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.
34
+ */
35
+ export const ListAgentsStatus = {
36
+ Live: "live",
37
+ Draft: "draft",
38
+ Pending: "pending",
39
+ Published: "published",
40
+ } as const;
41
+ /**
42
+ * 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.
43
+ */
44
+ export type ListAgentsStatus = ClosedEnum<typeof ListAgentsStatus>;
45
+
46
+ /**
47
+ * 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.
48
+ */
49
+ export const ListAgentsToolApprovalRequired = {
50
+ All: "all",
51
+ RespectTool: "respect_tool",
52
+ None: "none",
53
+ } as const;
54
+ /**
55
+ * 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.
56
+ */
57
+ export type ListAgentsToolApprovalRequired = ClosedEnum<
58
+ typeof ListAgentsToolApprovalRequired
59
+ >;
60
+
61
+ export type ListAgentsConditions = {
62
+ /**
63
+ * The argument of the tool call to evaluate
64
+ */
65
+ condition: string;
66
+ /**
67
+ * The operator to use
68
+ */
69
+ operator: string;
70
+ /**
71
+ * The value to compare against
72
+ */
73
+ value: string;
74
+ };
75
+
76
+ export type ListAgentsTools = {
77
+ /**
78
+ * The id of the resource
79
+ */
80
+ id: string;
81
+ actionType: string;
82
+ displayName?: string | undefined;
83
+ requiresApproval: boolean;
84
+ conditions?: Array<ListAgentsConditions> | undefined;
85
+ /**
86
+ * The id of the resource
87
+ */
88
+ mcpServer?: string | undefined;
89
+ /**
90
+ * Tool execution timeout in seconds (default: 2 minutes, max: 10 minutes)
91
+ */
92
+ timeout?: number | undefined;
93
+ };
94
+
95
+ export type ListAgentsSettings = {
96
+ maxIterations?: number | undefined;
97
+ /**
98
+ * Max execution time in seconds
99
+ */
100
+ maxExecutionTime: number;
101
+ /**
102
+ * 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.
103
+ */
104
+ toolApprovalRequired?: ListAgentsToolApprovalRequired | undefined;
105
+ tools: Array<ListAgentsTools>;
106
+ };
107
+
108
+ export type ListAgentsModel = {
109
+ /**
110
+ * The database ID of the primary model
111
+ */
112
+ id: string;
113
+ /**
114
+ * Optional integration ID for custom model configurations
115
+ */
116
+ integrationId?: string | undefined;
117
+ /**
118
+ * Optional array of fallback model IDs that will be used automatically in order if the primary model fails
119
+ */
120
+ fallbackModels?: Array<string> | undefined;
121
+ /**
122
+ * Maximum number of tokens for model responses
123
+ */
124
+ maxTokens?: number | undefined;
125
+ /**
126
+ * Temperature setting for model responses
127
+ */
128
+ temperature?: number | undefined;
129
+ };
130
+
131
+ export type ListAgentsTeamOfAgents = {
132
+ id: string;
133
+ /**
134
+ * 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.
135
+ */
136
+ role?: string | undefined;
137
+ };
138
+
139
+ export type ListAgentsMetrics = {
140
+ totalCost?: number | undefined;
141
+ };
142
+
143
+ export const ListAgentsConfigurationType = {
144
+ Query: "query",
145
+ } as const;
146
+ export type ListAgentsConfigurationType = ClosedEnum<
147
+ typeof ListAgentsConfigurationType
148
+ >;
149
+
150
+ export type ListAgentsConfiguration2 = {
151
+ type: ListAgentsConfigurationType;
152
+ query: string;
153
+ };
154
+
155
+ export const ListAgentsConfigurationAgentsType = {
156
+ LastUserMessage: "last_user_message",
157
+ } as const;
158
+ export type ListAgentsConfigurationAgentsType = ClosedEnum<
159
+ typeof ListAgentsConfigurationAgentsType
160
+ >;
161
+
162
+ export type ListAgentsConfiguration1 = {
163
+ type: ListAgentsConfigurationAgentsType;
164
+ };
165
+
166
+ /**
167
+ * Defines the configuration settings which can either be for a user message or a text entry.
168
+ */
169
+ export type ListAgentsConfiguration =
170
+ | ListAgentsConfiguration2
171
+ | ListAgentsConfiguration1;
172
+
173
+ export type ListAgentsKnowledgeBases = {
174
+ /**
175
+ * The id of the resource
176
+ */
177
+ id?: string | undefined;
178
+ /**
179
+ * The id of the resource
180
+ */
181
+ knowledgeId: string;
182
+ /**
183
+ * Defines the configuration settings which can either be for a user message or a text entry.
184
+ */
185
+ configuration: ListAgentsConfiguration2 | ListAgentsConfiguration1;
186
+ };
187
+
188
+ export const ListAgentsHiddenPanels = {
189
+ Model: "model",
190
+ Tools: "tools",
191
+ KnowledgeBases: "knowledge_bases",
192
+ Variables: "variables",
193
+ RuntimeConstraints: "runtime_constraints",
194
+ } as const;
195
+ export type ListAgentsHiddenPanels = ClosedEnum<typeof ListAgentsHiddenPanels>;
196
+
197
+ export type ListAgentsData = {
198
+ id: string;
199
+ key: string;
200
+ workspaceId: string;
201
+ projectId: string;
202
+ createdById?: string | undefined;
203
+ updatedById?: string | undefined;
204
+ created?: string | undefined;
205
+ updated?: string | undefined;
206
+ role: string;
207
+ description: string;
208
+ systemPrompt?: string | undefined;
209
+ instructions: string;
210
+ /**
211
+ * Optional URL to an icon for the agent
212
+ */
213
+ iconUrl?: string | undefined;
214
+ /**
215
+ * 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.
216
+ */
217
+ status: ListAgentsStatus;
218
+ settings?: ListAgentsSettings | undefined;
219
+ model: ListAgentsModel;
220
+ versionHash?: string | undefined;
221
+ /**
222
+ * 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.
223
+ */
224
+ path: string;
225
+ memoryStores: Array<string>;
226
+ /**
227
+ * The agents that are accessible to this orchestrator. The main agent can hand off to these agents to perform tasks.
228
+ */
229
+ teamOfAgents: Array<ListAgentsTeamOfAgents>;
230
+ metrics?: ListAgentsMetrics | undefined;
231
+ /**
232
+ * Extracted variables from agent instructions
233
+ */
234
+ variables?: { [k: string]: any } | undefined;
235
+ /**
236
+ * Agent knowledge bases reference
237
+ */
238
+ knowledgeBases?: Array<ListAgentsKnowledgeBases> | undefined;
239
+ /**
240
+ * List of hidden collapsed panels in configuration. Duplicates are not allowed.
241
+ */
242
+ hiddenPanels?: Array<ListAgentsHiddenPanels> | undefined;
243
+ };
244
+
245
+ /**
246
+ * List of agents with their configurations including fallback models
247
+ */
248
+ export type ListAgentsResponseBody = {
249
+ object: ListAgentsObject;
250
+ data: Array<ListAgentsData>;
251
+ hasMore: boolean;
252
+ };
253
+
254
+ /** @internal */
255
+ export const ListAgentsRequest$inboundSchema: z.ZodType<
256
+ ListAgentsRequest,
257
+ z.ZodTypeDef,
258
+ unknown
259
+ > = z.object({
260
+ limit: z.number().default(10),
261
+ starting_after: z.string().optional(),
262
+ ending_before: z.string().optional(),
263
+ }).transform((v) => {
264
+ return remap$(v, {
265
+ "starting_after": "startingAfter",
266
+ "ending_before": "endingBefore",
267
+ });
268
+ });
269
+
270
+ /** @internal */
271
+ export type ListAgentsRequest$Outbound = {
272
+ limit: number;
273
+ starting_after?: string | undefined;
274
+ ending_before?: string | undefined;
275
+ };
276
+
277
+ /** @internal */
278
+ export const ListAgentsRequest$outboundSchema: z.ZodType<
279
+ ListAgentsRequest$Outbound,
280
+ z.ZodTypeDef,
281
+ ListAgentsRequest
282
+ > = z.object({
283
+ limit: z.number().default(10),
284
+ startingAfter: z.string().optional(),
285
+ endingBefore: z.string().optional(),
286
+ }).transform((v) => {
287
+ return remap$(v, {
288
+ startingAfter: "starting_after",
289
+ endingBefore: "ending_before",
290
+ });
291
+ });
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 ListAgentsRequest$ {
298
+ /** @deprecated use `ListAgentsRequest$inboundSchema` instead. */
299
+ export const inboundSchema = ListAgentsRequest$inboundSchema;
300
+ /** @deprecated use `ListAgentsRequest$outboundSchema` instead. */
301
+ export const outboundSchema = ListAgentsRequest$outboundSchema;
302
+ /** @deprecated use `ListAgentsRequest$Outbound` instead. */
303
+ export type Outbound = ListAgentsRequest$Outbound;
304
+ }
305
+
306
+ export function listAgentsRequestToJSON(
307
+ listAgentsRequest: ListAgentsRequest,
308
+ ): string {
309
+ return JSON.stringify(
310
+ ListAgentsRequest$outboundSchema.parse(listAgentsRequest),
311
+ );
312
+ }
313
+
314
+ export function listAgentsRequestFromJSON(
315
+ jsonString: string,
316
+ ): SafeParseResult<ListAgentsRequest, SDKValidationError> {
317
+ return safeParse(
318
+ jsonString,
319
+ (x) => ListAgentsRequest$inboundSchema.parse(JSON.parse(x)),
320
+ `Failed to parse 'ListAgentsRequest' from JSON`,
321
+ );
322
+ }
323
+
324
+ /** @internal */
325
+ export const ListAgentsObject$inboundSchema: z.ZodNativeEnum<
326
+ typeof ListAgentsObject
327
+ > = z.nativeEnum(ListAgentsObject);
328
+
329
+ /** @internal */
330
+ export const ListAgentsObject$outboundSchema: z.ZodNativeEnum<
331
+ typeof ListAgentsObject
332
+ > = ListAgentsObject$inboundSchema;
333
+
334
+ /**
335
+ * @internal
336
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
337
+ */
338
+ export namespace ListAgentsObject$ {
339
+ /** @deprecated use `ListAgentsObject$inboundSchema` instead. */
340
+ export const inboundSchema = ListAgentsObject$inboundSchema;
341
+ /** @deprecated use `ListAgentsObject$outboundSchema` instead. */
342
+ export const outboundSchema = ListAgentsObject$outboundSchema;
343
+ }
344
+
345
+ /** @internal */
346
+ export const ListAgentsStatus$inboundSchema: z.ZodNativeEnum<
347
+ typeof ListAgentsStatus
348
+ > = z.nativeEnum(ListAgentsStatus);
349
+
350
+ /** @internal */
351
+ export const ListAgentsStatus$outboundSchema: z.ZodNativeEnum<
352
+ typeof ListAgentsStatus
353
+ > = ListAgentsStatus$inboundSchema;
354
+
355
+ /**
356
+ * @internal
357
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
358
+ */
359
+ export namespace ListAgentsStatus$ {
360
+ /** @deprecated use `ListAgentsStatus$inboundSchema` instead. */
361
+ export const inboundSchema = ListAgentsStatus$inboundSchema;
362
+ /** @deprecated use `ListAgentsStatus$outboundSchema` instead. */
363
+ export const outboundSchema = ListAgentsStatus$outboundSchema;
364
+ }
365
+
366
+ /** @internal */
367
+ export const ListAgentsToolApprovalRequired$inboundSchema: z.ZodNativeEnum<
368
+ typeof ListAgentsToolApprovalRequired
369
+ > = z.nativeEnum(ListAgentsToolApprovalRequired);
370
+
371
+ /** @internal */
372
+ export const ListAgentsToolApprovalRequired$outboundSchema: z.ZodNativeEnum<
373
+ typeof ListAgentsToolApprovalRequired
374
+ > = ListAgentsToolApprovalRequired$inboundSchema;
375
+
376
+ /**
377
+ * @internal
378
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
379
+ */
380
+ export namespace ListAgentsToolApprovalRequired$ {
381
+ /** @deprecated use `ListAgentsToolApprovalRequired$inboundSchema` instead. */
382
+ export const inboundSchema = ListAgentsToolApprovalRequired$inboundSchema;
383
+ /** @deprecated use `ListAgentsToolApprovalRequired$outboundSchema` instead. */
384
+ export const outboundSchema = ListAgentsToolApprovalRequired$outboundSchema;
385
+ }
386
+
387
+ /** @internal */
388
+ export const ListAgentsConditions$inboundSchema: z.ZodType<
389
+ ListAgentsConditions,
390
+ z.ZodTypeDef,
391
+ unknown
392
+ > = z.object({
393
+ condition: z.string(),
394
+ operator: z.string(),
395
+ value: z.string(),
396
+ });
397
+
398
+ /** @internal */
399
+ export type ListAgentsConditions$Outbound = {
400
+ condition: string;
401
+ operator: string;
402
+ value: string;
403
+ };
404
+
405
+ /** @internal */
406
+ export const ListAgentsConditions$outboundSchema: z.ZodType<
407
+ ListAgentsConditions$Outbound,
408
+ z.ZodTypeDef,
409
+ ListAgentsConditions
410
+ > = z.object({
411
+ condition: z.string(),
412
+ operator: z.string(),
413
+ value: z.string(),
414
+ });
415
+
416
+ /**
417
+ * @internal
418
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
419
+ */
420
+ export namespace ListAgentsConditions$ {
421
+ /** @deprecated use `ListAgentsConditions$inboundSchema` instead. */
422
+ export const inboundSchema = ListAgentsConditions$inboundSchema;
423
+ /** @deprecated use `ListAgentsConditions$outboundSchema` instead. */
424
+ export const outboundSchema = ListAgentsConditions$outboundSchema;
425
+ /** @deprecated use `ListAgentsConditions$Outbound` instead. */
426
+ export type Outbound = ListAgentsConditions$Outbound;
427
+ }
428
+
429
+ export function listAgentsConditionsToJSON(
430
+ listAgentsConditions: ListAgentsConditions,
431
+ ): string {
432
+ return JSON.stringify(
433
+ ListAgentsConditions$outboundSchema.parse(listAgentsConditions),
434
+ );
435
+ }
436
+
437
+ export function listAgentsConditionsFromJSON(
438
+ jsonString: string,
439
+ ): SafeParseResult<ListAgentsConditions, SDKValidationError> {
440
+ return safeParse(
441
+ jsonString,
442
+ (x) => ListAgentsConditions$inboundSchema.parse(JSON.parse(x)),
443
+ `Failed to parse 'ListAgentsConditions' from JSON`,
444
+ );
445
+ }
446
+
447
+ /** @internal */
448
+ export const ListAgentsTools$inboundSchema: z.ZodType<
449
+ ListAgentsTools,
450
+ z.ZodTypeDef,
451
+ unknown
452
+ > = z.object({
453
+ id: z.string(),
454
+ action_type: z.string(),
455
+ display_name: z.string().optional(),
456
+ requires_approval: z.boolean(),
457
+ conditions: z.array(z.lazy(() => ListAgentsConditions$inboundSchema))
458
+ .optional(),
459
+ mcpServer: z.string().optional(),
460
+ timeout: z.number().default(120),
461
+ }).transform((v) => {
462
+ return remap$(v, {
463
+ "action_type": "actionType",
464
+ "display_name": "displayName",
465
+ "requires_approval": "requiresApproval",
466
+ });
467
+ });
468
+
469
+ /** @internal */
470
+ export type ListAgentsTools$Outbound = {
471
+ id: string;
472
+ action_type: string;
473
+ display_name?: string | undefined;
474
+ requires_approval: boolean;
475
+ conditions?: Array<ListAgentsConditions$Outbound> | undefined;
476
+ mcpServer?: string | undefined;
477
+ timeout: number;
478
+ };
479
+
480
+ /** @internal */
481
+ export const ListAgentsTools$outboundSchema: z.ZodType<
482
+ ListAgentsTools$Outbound,
483
+ z.ZodTypeDef,
484
+ ListAgentsTools
485
+ > = z.object({
486
+ id: z.string(),
487
+ actionType: z.string(),
488
+ displayName: z.string().optional(),
489
+ requiresApproval: z.boolean(),
490
+ conditions: z.array(z.lazy(() => ListAgentsConditions$outboundSchema))
491
+ .optional(),
492
+ mcpServer: z.string().optional(),
493
+ timeout: z.number().default(120),
494
+ }).transform((v) => {
495
+ return remap$(v, {
496
+ actionType: "action_type",
497
+ displayName: "display_name",
498
+ requiresApproval: "requires_approval",
499
+ });
500
+ });
501
+
502
+ /**
503
+ * @internal
504
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
505
+ */
506
+ export namespace ListAgentsTools$ {
507
+ /** @deprecated use `ListAgentsTools$inboundSchema` instead. */
508
+ export const inboundSchema = ListAgentsTools$inboundSchema;
509
+ /** @deprecated use `ListAgentsTools$outboundSchema` instead. */
510
+ export const outboundSchema = ListAgentsTools$outboundSchema;
511
+ /** @deprecated use `ListAgentsTools$Outbound` instead. */
512
+ export type Outbound = ListAgentsTools$Outbound;
513
+ }
514
+
515
+ export function listAgentsToolsToJSON(
516
+ listAgentsTools: ListAgentsTools,
517
+ ): string {
518
+ return JSON.stringify(ListAgentsTools$outboundSchema.parse(listAgentsTools));
519
+ }
520
+
521
+ export function listAgentsToolsFromJSON(
522
+ jsonString: string,
523
+ ): SafeParseResult<ListAgentsTools, SDKValidationError> {
524
+ return safeParse(
525
+ jsonString,
526
+ (x) => ListAgentsTools$inboundSchema.parse(JSON.parse(x)),
527
+ `Failed to parse 'ListAgentsTools' from JSON`,
528
+ );
529
+ }
530
+
531
+ /** @internal */
532
+ export const ListAgentsSettings$inboundSchema: z.ZodType<
533
+ ListAgentsSettings,
534
+ z.ZodTypeDef,
535
+ unknown
536
+ > = z.object({
537
+ max_iterations: z.number().int().default(10),
538
+ max_execution_time: z.number().int(),
539
+ tool_approval_required: ListAgentsToolApprovalRequired$inboundSchema.default(
540
+ "respect_tool",
541
+ ),
542
+ tools: z.array(z.lazy(() => ListAgentsTools$inboundSchema)),
543
+ }).transform((v) => {
544
+ return remap$(v, {
545
+ "max_iterations": "maxIterations",
546
+ "max_execution_time": "maxExecutionTime",
547
+ "tool_approval_required": "toolApprovalRequired",
548
+ });
549
+ });
550
+
551
+ /** @internal */
552
+ export type ListAgentsSettings$Outbound = {
553
+ max_iterations: number;
554
+ max_execution_time: number;
555
+ tool_approval_required: string;
556
+ tools: Array<ListAgentsTools$Outbound>;
557
+ };
558
+
559
+ /** @internal */
560
+ export const ListAgentsSettings$outboundSchema: z.ZodType<
561
+ ListAgentsSettings$Outbound,
562
+ z.ZodTypeDef,
563
+ ListAgentsSettings
564
+ > = z.object({
565
+ maxIterations: z.number().int().default(10),
566
+ maxExecutionTime: z.number().int(),
567
+ toolApprovalRequired: ListAgentsToolApprovalRequired$outboundSchema.default(
568
+ "respect_tool",
569
+ ),
570
+ tools: z.array(z.lazy(() => ListAgentsTools$outboundSchema)),
571
+ }).transform((v) => {
572
+ return remap$(v, {
573
+ maxIterations: "max_iterations",
574
+ maxExecutionTime: "max_execution_time",
575
+ toolApprovalRequired: "tool_approval_required",
576
+ });
577
+ });
578
+
579
+ /**
580
+ * @internal
581
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
582
+ */
583
+ export namespace ListAgentsSettings$ {
584
+ /** @deprecated use `ListAgentsSettings$inboundSchema` instead. */
585
+ export const inboundSchema = ListAgentsSettings$inboundSchema;
586
+ /** @deprecated use `ListAgentsSettings$outboundSchema` instead. */
587
+ export const outboundSchema = ListAgentsSettings$outboundSchema;
588
+ /** @deprecated use `ListAgentsSettings$Outbound` instead. */
589
+ export type Outbound = ListAgentsSettings$Outbound;
590
+ }
591
+
592
+ export function listAgentsSettingsToJSON(
593
+ listAgentsSettings: ListAgentsSettings,
594
+ ): string {
595
+ return JSON.stringify(
596
+ ListAgentsSettings$outboundSchema.parse(listAgentsSettings),
597
+ );
598
+ }
599
+
600
+ export function listAgentsSettingsFromJSON(
601
+ jsonString: string,
602
+ ): SafeParseResult<ListAgentsSettings, SDKValidationError> {
603
+ return safeParse(
604
+ jsonString,
605
+ (x) => ListAgentsSettings$inboundSchema.parse(JSON.parse(x)),
606
+ `Failed to parse 'ListAgentsSettings' from JSON`,
607
+ );
608
+ }
609
+
610
+ /** @internal */
611
+ export const ListAgentsModel$inboundSchema: z.ZodType<
612
+ ListAgentsModel,
613
+ z.ZodTypeDef,
614
+ unknown
615
+ > = z.object({
616
+ id: z.string(),
617
+ integration_id: z.string().optional(),
618
+ fallback_models: z.array(z.string()).optional(),
619
+ max_tokens: z.number().int().optional(),
620
+ temperature: z.number().optional(),
621
+ }).transform((v) => {
622
+ return remap$(v, {
623
+ "integration_id": "integrationId",
624
+ "fallback_models": "fallbackModels",
625
+ "max_tokens": "maxTokens",
626
+ });
627
+ });
628
+
629
+ /** @internal */
630
+ export type ListAgentsModel$Outbound = {
631
+ id: string;
632
+ integration_id?: string | undefined;
633
+ fallback_models?: Array<string> | undefined;
634
+ max_tokens?: number | undefined;
635
+ temperature?: number | undefined;
636
+ };
637
+
638
+ /** @internal */
639
+ export const ListAgentsModel$outboundSchema: z.ZodType<
640
+ ListAgentsModel$Outbound,
641
+ z.ZodTypeDef,
642
+ ListAgentsModel
643
+ > = z.object({
644
+ id: z.string(),
645
+ integrationId: z.string().optional(),
646
+ fallbackModels: z.array(z.string()).optional(),
647
+ maxTokens: z.number().int().optional(),
648
+ temperature: z.number().optional(),
649
+ }).transform((v) => {
650
+ return remap$(v, {
651
+ integrationId: "integration_id",
652
+ fallbackModels: "fallback_models",
653
+ maxTokens: "max_tokens",
654
+ });
655
+ });
656
+
657
+ /**
658
+ * @internal
659
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
660
+ */
661
+ export namespace ListAgentsModel$ {
662
+ /** @deprecated use `ListAgentsModel$inboundSchema` instead. */
663
+ export const inboundSchema = ListAgentsModel$inboundSchema;
664
+ /** @deprecated use `ListAgentsModel$outboundSchema` instead. */
665
+ export const outboundSchema = ListAgentsModel$outboundSchema;
666
+ /** @deprecated use `ListAgentsModel$Outbound` instead. */
667
+ export type Outbound = ListAgentsModel$Outbound;
668
+ }
669
+
670
+ export function listAgentsModelToJSON(
671
+ listAgentsModel: ListAgentsModel,
672
+ ): string {
673
+ return JSON.stringify(ListAgentsModel$outboundSchema.parse(listAgentsModel));
674
+ }
675
+
676
+ export function listAgentsModelFromJSON(
677
+ jsonString: string,
678
+ ): SafeParseResult<ListAgentsModel, SDKValidationError> {
679
+ return safeParse(
680
+ jsonString,
681
+ (x) => ListAgentsModel$inboundSchema.parse(JSON.parse(x)),
682
+ `Failed to parse 'ListAgentsModel' from JSON`,
683
+ );
684
+ }
685
+
686
+ /** @internal */
687
+ export const ListAgentsTeamOfAgents$inboundSchema: z.ZodType<
688
+ ListAgentsTeamOfAgents,
689
+ z.ZodTypeDef,
690
+ unknown
691
+ > = z.object({
692
+ _id: z.string(),
693
+ role: z.string().optional(),
694
+ }).transform((v) => {
695
+ return remap$(v, {
696
+ "_id": "id",
697
+ });
698
+ });
699
+
700
+ /** @internal */
701
+ export type ListAgentsTeamOfAgents$Outbound = {
702
+ _id: string;
703
+ role?: string | undefined;
704
+ };
705
+
706
+ /** @internal */
707
+ export const ListAgentsTeamOfAgents$outboundSchema: z.ZodType<
708
+ ListAgentsTeamOfAgents$Outbound,
709
+ z.ZodTypeDef,
710
+ ListAgentsTeamOfAgents
711
+ > = z.object({
712
+ id: z.string(),
713
+ role: z.string().optional(),
714
+ }).transform((v) => {
715
+ return remap$(v, {
716
+ id: "_id",
717
+ });
718
+ });
719
+
720
+ /**
721
+ * @internal
722
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
723
+ */
724
+ export namespace ListAgentsTeamOfAgents$ {
725
+ /** @deprecated use `ListAgentsTeamOfAgents$inboundSchema` instead. */
726
+ export const inboundSchema = ListAgentsTeamOfAgents$inboundSchema;
727
+ /** @deprecated use `ListAgentsTeamOfAgents$outboundSchema` instead. */
728
+ export const outboundSchema = ListAgentsTeamOfAgents$outboundSchema;
729
+ /** @deprecated use `ListAgentsTeamOfAgents$Outbound` instead. */
730
+ export type Outbound = ListAgentsTeamOfAgents$Outbound;
731
+ }
732
+
733
+ export function listAgentsTeamOfAgentsToJSON(
734
+ listAgentsTeamOfAgents: ListAgentsTeamOfAgents,
735
+ ): string {
736
+ return JSON.stringify(
737
+ ListAgentsTeamOfAgents$outboundSchema.parse(listAgentsTeamOfAgents),
738
+ );
739
+ }
740
+
741
+ export function listAgentsTeamOfAgentsFromJSON(
742
+ jsonString: string,
743
+ ): SafeParseResult<ListAgentsTeamOfAgents, SDKValidationError> {
744
+ return safeParse(
745
+ jsonString,
746
+ (x) => ListAgentsTeamOfAgents$inboundSchema.parse(JSON.parse(x)),
747
+ `Failed to parse 'ListAgentsTeamOfAgents' from JSON`,
748
+ );
749
+ }
750
+
751
+ /** @internal */
752
+ export const ListAgentsMetrics$inboundSchema: z.ZodType<
753
+ ListAgentsMetrics,
754
+ z.ZodTypeDef,
755
+ unknown
756
+ > = z.object({
757
+ total_cost: z.number().default(0),
758
+ }).transform((v) => {
759
+ return remap$(v, {
760
+ "total_cost": "totalCost",
761
+ });
762
+ });
763
+
764
+ /** @internal */
765
+ export type ListAgentsMetrics$Outbound = {
766
+ total_cost: number;
767
+ };
768
+
769
+ /** @internal */
770
+ export const ListAgentsMetrics$outboundSchema: z.ZodType<
771
+ ListAgentsMetrics$Outbound,
772
+ z.ZodTypeDef,
773
+ ListAgentsMetrics
774
+ > = z.object({
775
+ totalCost: z.number().default(0),
776
+ }).transform((v) => {
777
+ return remap$(v, {
778
+ totalCost: "total_cost",
779
+ });
780
+ });
781
+
782
+ /**
783
+ * @internal
784
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
785
+ */
786
+ export namespace ListAgentsMetrics$ {
787
+ /** @deprecated use `ListAgentsMetrics$inboundSchema` instead. */
788
+ export const inboundSchema = ListAgentsMetrics$inboundSchema;
789
+ /** @deprecated use `ListAgentsMetrics$outboundSchema` instead. */
790
+ export const outboundSchema = ListAgentsMetrics$outboundSchema;
791
+ /** @deprecated use `ListAgentsMetrics$Outbound` instead. */
792
+ export type Outbound = ListAgentsMetrics$Outbound;
793
+ }
794
+
795
+ export function listAgentsMetricsToJSON(
796
+ listAgentsMetrics: ListAgentsMetrics,
797
+ ): string {
798
+ return JSON.stringify(
799
+ ListAgentsMetrics$outboundSchema.parse(listAgentsMetrics),
800
+ );
801
+ }
802
+
803
+ export function listAgentsMetricsFromJSON(
804
+ jsonString: string,
805
+ ): SafeParseResult<ListAgentsMetrics, SDKValidationError> {
806
+ return safeParse(
807
+ jsonString,
808
+ (x) => ListAgentsMetrics$inboundSchema.parse(JSON.parse(x)),
809
+ `Failed to parse 'ListAgentsMetrics' from JSON`,
810
+ );
811
+ }
812
+
813
+ /** @internal */
814
+ export const ListAgentsConfigurationType$inboundSchema: z.ZodNativeEnum<
815
+ typeof ListAgentsConfigurationType
816
+ > = z.nativeEnum(ListAgentsConfigurationType);
817
+
818
+ /** @internal */
819
+ export const ListAgentsConfigurationType$outboundSchema: z.ZodNativeEnum<
820
+ typeof ListAgentsConfigurationType
821
+ > = ListAgentsConfigurationType$inboundSchema;
822
+
823
+ /**
824
+ * @internal
825
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
826
+ */
827
+ export namespace ListAgentsConfigurationType$ {
828
+ /** @deprecated use `ListAgentsConfigurationType$inboundSchema` instead. */
829
+ export const inboundSchema = ListAgentsConfigurationType$inboundSchema;
830
+ /** @deprecated use `ListAgentsConfigurationType$outboundSchema` instead. */
831
+ export const outboundSchema = ListAgentsConfigurationType$outboundSchema;
832
+ }
833
+
834
+ /** @internal */
835
+ export const ListAgentsConfiguration2$inboundSchema: z.ZodType<
836
+ ListAgentsConfiguration2,
837
+ z.ZodTypeDef,
838
+ unknown
839
+ > = z.object({
840
+ type: ListAgentsConfigurationType$inboundSchema,
841
+ query: z.string(),
842
+ });
843
+
844
+ /** @internal */
845
+ export type ListAgentsConfiguration2$Outbound = {
846
+ type: string;
847
+ query: string;
848
+ };
849
+
850
+ /** @internal */
851
+ export const ListAgentsConfiguration2$outboundSchema: z.ZodType<
852
+ ListAgentsConfiguration2$Outbound,
853
+ z.ZodTypeDef,
854
+ ListAgentsConfiguration2
855
+ > = z.object({
856
+ type: ListAgentsConfigurationType$outboundSchema,
857
+ query: z.string(),
858
+ });
859
+
860
+ /**
861
+ * @internal
862
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
863
+ */
864
+ export namespace ListAgentsConfiguration2$ {
865
+ /** @deprecated use `ListAgentsConfiguration2$inboundSchema` instead. */
866
+ export const inboundSchema = ListAgentsConfiguration2$inboundSchema;
867
+ /** @deprecated use `ListAgentsConfiguration2$outboundSchema` instead. */
868
+ export const outboundSchema = ListAgentsConfiguration2$outboundSchema;
869
+ /** @deprecated use `ListAgentsConfiguration2$Outbound` instead. */
870
+ export type Outbound = ListAgentsConfiguration2$Outbound;
871
+ }
872
+
873
+ export function listAgentsConfiguration2ToJSON(
874
+ listAgentsConfiguration2: ListAgentsConfiguration2,
875
+ ): string {
876
+ return JSON.stringify(
877
+ ListAgentsConfiguration2$outboundSchema.parse(listAgentsConfiguration2),
878
+ );
879
+ }
880
+
881
+ export function listAgentsConfiguration2FromJSON(
882
+ jsonString: string,
883
+ ): SafeParseResult<ListAgentsConfiguration2, SDKValidationError> {
884
+ return safeParse(
885
+ jsonString,
886
+ (x) => ListAgentsConfiguration2$inboundSchema.parse(JSON.parse(x)),
887
+ `Failed to parse 'ListAgentsConfiguration2' from JSON`,
888
+ );
889
+ }
890
+
891
+ /** @internal */
892
+ export const ListAgentsConfigurationAgentsType$inboundSchema: z.ZodNativeEnum<
893
+ typeof ListAgentsConfigurationAgentsType
894
+ > = z.nativeEnum(ListAgentsConfigurationAgentsType);
895
+
896
+ /** @internal */
897
+ export const ListAgentsConfigurationAgentsType$outboundSchema: z.ZodNativeEnum<
898
+ typeof ListAgentsConfigurationAgentsType
899
+ > = ListAgentsConfigurationAgentsType$inboundSchema;
900
+
901
+ /**
902
+ * @internal
903
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
904
+ */
905
+ export namespace ListAgentsConfigurationAgentsType$ {
906
+ /** @deprecated use `ListAgentsConfigurationAgentsType$inboundSchema` instead. */
907
+ export const inboundSchema = ListAgentsConfigurationAgentsType$inboundSchema;
908
+ /** @deprecated use `ListAgentsConfigurationAgentsType$outboundSchema` instead. */
909
+ export const outboundSchema =
910
+ ListAgentsConfigurationAgentsType$outboundSchema;
911
+ }
912
+
913
+ /** @internal */
914
+ export const ListAgentsConfiguration1$inboundSchema: z.ZodType<
915
+ ListAgentsConfiguration1,
916
+ z.ZodTypeDef,
917
+ unknown
918
+ > = z.object({
919
+ type: ListAgentsConfigurationAgentsType$inboundSchema,
920
+ });
921
+
922
+ /** @internal */
923
+ export type ListAgentsConfiguration1$Outbound = {
924
+ type: string;
925
+ };
926
+
927
+ /** @internal */
928
+ export const ListAgentsConfiguration1$outboundSchema: z.ZodType<
929
+ ListAgentsConfiguration1$Outbound,
930
+ z.ZodTypeDef,
931
+ ListAgentsConfiguration1
932
+ > = z.object({
933
+ type: ListAgentsConfigurationAgentsType$outboundSchema,
934
+ });
935
+
936
+ /**
937
+ * @internal
938
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
939
+ */
940
+ export namespace ListAgentsConfiguration1$ {
941
+ /** @deprecated use `ListAgentsConfiguration1$inboundSchema` instead. */
942
+ export const inboundSchema = ListAgentsConfiguration1$inboundSchema;
943
+ /** @deprecated use `ListAgentsConfiguration1$outboundSchema` instead. */
944
+ export const outboundSchema = ListAgentsConfiguration1$outboundSchema;
945
+ /** @deprecated use `ListAgentsConfiguration1$Outbound` instead. */
946
+ export type Outbound = ListAgentsConfiguration1$Outbound;
947
+ }
948
+
949
+ export function listAgentsConfiguration1ToJSON(
950
+ listAgentsConfiguration1: ListAgentsConfiguration1,
951
+ ): string {
952
+ return JSON.stringify(
953
+ ListAgentsConfiguration1$outboundSchema.parse(listAgentsConfiguration1),
954
+ );
955
+ }
956
+
957
+ export function listAgentsConfiguration1FromJSON(
958
+ jsonString: string,
959
+ ): SafeParseResult<ListAgentsConfiguration1, SDKValidationError> {
960
+ return safeParse(
961
+ jsonString,
962
+ (x) => ListAgentsConfiguration1$inboundSchema.parse(JSON.parse(x)),
963
+ `Failed to parse 'ListAgentsConfiguration1' from JSON`,
964
+ );
965
+ }
966
+
967
+ /** @internal */
968
+ export const ListAgentsConfiguration$inboundSchema: z.ZodType<
969
+ ListAgentsConfiguration,
970
+ z.ZodTypeDef,
971
+ unknown
972
+ > = z.union([
973
+ z.lazy(() => ListAgentsConfiguration2$inboundSchema),
974
+ z.lazy(() => ListAgentsConfiguration1$inboundSchema),
975
+ ]);
976
+
977
+ /** @internal */
978
+ export type ListAgentsConfiguration$Outbound =
979
+ | ListAgentsConfiguration2$Outbound
980
+ | ListAgentsConfiguration1$Outbound;
981
+
982
+ /** @internal */
983
+ export const ListAgentsConfiguration$outboundSchema: z.ZodType<
984
+ ListAgentsConfiguration$Outbound,
985
+ z.ZodTypeDef,
986
+ ListAgentsConfiguration
987
+ > = z.union([
988
+ z.lazy(() => ListAgentsConfiguration2$outboundSchema),
989
+ z.lazy(() => ListAgentsConfiguration1$outboundSchema),
990
+ ]);
991
+
992
+ /**
993
+ * @internal
994
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
995
+ */
996
+ export namespace ListAgentsConfiguration$ {
997
+ /** @deprecated use `ListAgentsConfiguration$inboundSchema` instead. */
998
+ export const inboundSchema = ListAgentsConfiguration$inboundSchema;
999
+ /** @deprecated use `ListAgentsConfiguration$outboundSchema` instead. */
1000
+ export const outboundSchema = ListAgentsConfiguration$outboundSchema;
1001
+ /** @deprecated use `ListAgentsConfiguration$Outbound` instead. */
1002
+ export type Outbound = ListAgentsConfiguration$Outbound;
1003
+ }
1004
+
1005
+ export function listAgentsConfigurationToJSON(
1006
+ listAgentsConfiguration: ListAgentsConfiguration,
1007
+ ): string {
1008
+ return JSON.stringify(
1009
+ ListAgentsConfiguration$outboundSchema.parse(listAgentsConfiguration),
1010
+ );
1011
+ }
1012
+
1013
+ export function listAgentsConfigurationFromJSON(
1014
+ jsonString: string,
1015
+ ): SafeParseResult<ListAgentsConfiguration, SDKValidationError> {
1016
+ return safeParse(
1017
+ jsonString,
1018
+ (x) => ListAgentsConfiguration$inboundSchema.parse(JSON.parse(x)),
1019
+ `Failed to parse 'ListAgentsConfiguration' from JSON`,
1020
+ );
1021
+ }
1022
+
1023
+ /** @internal */
1024
+ export const ListAgentsKnowledgeBases$inboundSchema: z.ZodType<
1025
+ ListAgentsKnowledgeBases,
1026
+ z.ZodTypeDef,
1027
+ unknown
1028
+ > = z.object({
1029
+ id: z.string().default("01K4PX8V2CW7YAPPRDPG74Q908"),
1030
+ knowledge_id: z.string(),
1031
+ configuration: z.union([
1032
+ z.lazy(() => ListAgentsConfiguration2$inboundSchema),
1033
+ z.lazy(() => ListAgentsConfiguration1$inboundSchema),
1034
+ ]),
1035
+ }).transform((v) => {
1036
+ return remap$(v, {
1037
+ "knowledge_id": "knowledgeId",
1038
+ });
1039
+ });
1040
+
1041
+ /** @internal */
1042
+ export type ListAgentsKnowledgeBases$Outbound = {
1043
+ id: string;
1044
+ knowledge_id: string;
1045
+ configuration:
1046
+ | ListAgentsConfiguration2$Outbound
1047
+ | ListAgentsConfiguration1$Outbound;
1048
+ };
1049
+
1050
+ /** @internal */
1051
+ export const ListAgentsKnowledgeBases$outboundSchema: z.ZodType<
1052
+ ListAgentsKnowledgeBases$Outbound,
1053
+ z.ZodTypeDef,
1054
+ ListAgentsKnowledgeBases
1055
+ > = z.object({
1056
+ id: z.string().default("01K4PX8V2CW7YAPPRDPG74Q908"),
1057
+ knowledgeId: z.string(),
1058
+ configuration: z.union([
1059
+ z.lazy(() => ListAgentsConfiguration2$outboundSchema),
1060
+ z.lazy(() => ListAgentsConfiguration1$outboundSchema),
1061
+ ]),
1062
+ }).transform((v) => {
1063
+ return remap$(v, {
1064
+ knowledgeId: "knowledge_id",
1065
+ });
1066
+ });
1067
+
1068
+ /**
1069
+ * @internal
1070
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1071
+ */
1072
+ export namespace ListAgentsKnowledgeBases$ {
1073
+ /** @deprecated use `ListAgentsKnowledgeBases$inboundSchema` instead. */
1074
+ export const inboundSchema = ListAgentsKnowledgeBases$inboundSchema;
1075
+ /** @deprecated use `ListAgentsKnowledgeBases$outboundSchema` instead. */
1076
+ export const outboundSchema = ListAgentsKnowledgeBases$outboundSchema;
1077
+ /** @deprecated use `ListAgentsKnowledgeBases$Outbound` instead. */
1078
+ export type Outbound = ListAgentsKnowledgeBases$Outbound;
1079
+ }
1080
+
1081
+ export function listAgentsKnowledgeBasesToJSON(
1082
+ listAgentsKnowledgeBases: ListAgentsKnowledgeBases,
1083
+ ): string {
1084
+ return JSON.stringify(
1085
+ ListAgentsKnowledgeBases$outboundSchema.parse(listAgentsKnowledgeBases),
1086
+ );
1087
+ }
1088
+
1089
+ export function listAgentsKnowledgeBasesFromJSON(
1090
+ jsonString: string,
1091
+ ): SafeParseResult<ListAgentsKnowledgeBases, SDKValidationError> {
1092
+ return safeParse(
1093
+ jsonString,
1094
+ (x) => ListAgentsKnowledgeBases$inboundSchema.parse(JSON.parse(x)),
1095
+ `Failed to parse 'ListAgentsKnowledgeBases' from JSON`,
1096
+ );
1097
+ }
1098
+
1099
+ /** @internal */
1100
+ export const ListAgentsHiddenPanels$inboundSchema: z.ZodNativeEnum<
1101
+ typeof ListAgentsHiddenPanels
1102
+ > = z.nativeEnum(ListAgentsHiddenPanels);
1103
+
1104
+ /** @internal */
1105
+ export const ListAgentsHiddenPanels$outboundSchema: z.ZodNativeEnum<
1106
+ typeof ListAgentsHiddenPanels
1107
+ > = ListAgentsHiddenPanels$inboundSchema;
1108
+
1109
+ /**
1110
+ * @internal
1111
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1112
+ */
1113
+ export namespace ListAgentsHiddenPanels$ {
1114
+ /** @deprecated use `ListAgentsHiddenPanels$inboundSchema` instead. */
1115
+ export const inboundSchema = ListAgentsHiddenPanels$inboundSchema;
1116
+ /** @deprecated use `ListAgentsHiddenPanels$outboundSchema` instead. */
1117
+ export const outboundSchema = ListAgentsHiddenPanels$outboundSchema;
1118
+ }
1119
+
1120
+ /** @internal */
1121
+ export const ListAgentsData$inboundSchema: z.ZodType<
1122
+ ListAgentsData,
1123
+ z.ZodTypeDef,
1124
+ unknown
1125
+ > = z.object({
1126
+ _id: z.string(),
1127
+ key: z.string(),
1128
+ workspace_id: z.string(),
1129
+ project_id: z.string(),
1130
+ created_by_id: z.string().optional(),
1131
+ updated_by_id: z.string().optional(),
1132
+ created: z.string().optional(),
1133
+ updated: z.string().optional(),
1134
+ role: z.string(),
1135
+ description: z.string(),
1136
+ system_prompt: z.string().optional(),
1137
+ instructions: z.string(),
1138
+ iconUrl: z.string().optional(),
1139
+ status: ListAgentsStatus$inboundSchema,
1140
+ settings: z.lazy(() => ListAgentsSettings$inboundSchema).optional(),
1141
+ model: z.lazy(() => ListAgentsModel$inboundSchema),
1142
+ version_hash: z.string().optional(),
1143
+ path: z.string(),
1144
+ memory_stores: z.array(z.string()),
1145
+ team_of_agents: z.array(z.lazy(() => ListAgentsTeamOfAgents$inboundSchema)),
1146
+ metrics: z.lazy(() => ListAgentsMetrics$inboundSchema).optional(),
1147
+ variables: z.record(z.any()).optional(),
1148
+ knowledge_bases: z.array(z.lazy(() => ListAgentsKnowledgeBases$inboundSchema))
1149
+ .optional(),
1150
+ hidden_panels: z.array(ListAgentsHiddenPanels$inboundSchema).optional(),
1151
+ }).transform((v) => {
1152
+ return remap$(v, {
1153
+ "_id": "id",
1154
+ "workspace_id": "workspaceId",
1155
+ "project_id": "projectId",
1156
+ "created_by_id": "createdById",
1157
+ "updated_by_id": "updatedById",
1158
+ "system_prompt": "systemPrompt",
1159
+ "version_hash": "versionHash",
1160
+ "memory_stores": "memoryStores",
1161
+ "team_of_agents": "teamOfAgents",
1162
+ "knowledge_bases": "knowledgeBases",
1163
+ "hidden_panels": "hiddenPanels",
1164
+ });
1165
+ });
1166
+
1167
+ /** @internal */
1168
+ export type ListAgentsData$Outbound = {
1169
+ _id: string;
1170
+ key: string;
1171
+ workspace_id: string;
1172
+ project_id: string;
1173
+ created_by_id?: string | undefined;
1174
+ updated_by_id?: string | undefined;
1175
+ created?: string | undefined;
1176
+ updated?: string | undefined;
1177
+ role: string;
1178
+ description: string;
1179
+ system_prompt?: string | undefined;
1180
+ instructions: string;
1181
+ iconUrl?: string | undefined;
1182
+ status: string;
1183
+ settings?: ListAgentsSettings$Outbound | undefined;
1184
+ model: ListAgentsModel$Outbound;
1185
+ version_hash?: string | undefined;
1186
+ path: string;
1187
+ memory_stores: Array<string>;
1188
+ team_of_agents: Array<ListAgentsTeamOfAgents$Outbound>;
1189
+ metrics?: ListAgentsMetrics$Outbound | undefined;
1190
+ variables?: { [k: string]: any } | undefined;
1191
+ knowledge_bases?: Array<ListAgentsKnowledgeBases$Outbound> | undefined;
1192
+ hidden_panels?: Array<string> | undefined;
1193
+ };
1194
+
1195
+ /** @internal */
1196
+ export const ListAgentsData$outboundSchema: z.ZodType<
1197
+ ListAgentsData$Outbound,
1198
+ z.ZodTypeDef,
1199
+ ListAgentsData
1200
+ > = z.object({
1201
+ id: z.string(),
1202
+ key: z.string(),
1203
+ workspaceId: z.string(),
1204
+ projectId: z.string(),
1205
+ createdById: z.string().optional(),
1206
+ updatedById: z.string().optional(),
1207
+ created: z.string().optional(),
1208
+ updated: z.string().optional(),
1209
+ role: z.string(),
1210
+ description: z.string(),
1211
+ systemPrompt: z.string().optional(),
1212
+ instructions: z.string(),
1213
+ iconUrl: z.string().optional(),
1214
+ status: ListAgentsStatus$outboundSchema,
1215
+ settings: z.lazy(() => ListAgentsSettings$outboundSchema).optional(),
1216
+ model: z.lazy(() => ListAgentsModel$outboundSchema),
1217
+ versionHash: z.string().optional(),
1218
+ path: z.string(),
1219
+ memoryStores: z.array(z.string()),
1220
+ teamOfAgents: z.array(z.lazy(() => ListAgentsTeamOfAgents$outboundSchema)),
1221
+ metrics: z.lazy(() => ListAgentsMetrics$outboundSchema).optional(),
1222
+ variables: z.record(z.any()).optional(),
1223
+ knowledgeBases: z.array(z.lazy(() => ListAgentsKnowledgeBases$outboundSchema))
1224
+ .optional(),
1225
+ hiddenPanels: z.array(ListAgentsHiddenPanels$outboundSchema).optional(),
1226
+ }).transform((v) => {
1227
+ return remap$(v, {
1228
+ id: "_id",
1229
+ workspaceId: "workspace_id",
1230
+ projectId: "project_id",
1231
+ createdById: "created_by_id",
1232
+ updatedById: "updated_by_id",
1233
+ systemPrompt: "system_prompt",
1234
+ versionHash: "version_hash",
1235
+ memoryStores: "memory_stores",
1236
+ teamOfAgents: "team_of_agents",
1237
+ knowledgeBases: "knowledge_bases",
1238
+ hiddenPanels: "hidden_panels",
1239
+ });
1240
+ });
1241
+
1242
+ /**
1243
+ * @internal
1244
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1245
+ */
1246
+ export namespace ListAgentsData$ {
1247
+ /** @deprecated use `ListAgentsData$inboundSchema` instead. */
1248
+ export const inboundSchema = ListAgentsData$inboundSchema;
1249
+ /** @deprecated use `ListAgentsData$outboundSchema` instead. */
1250
+ export const outboundSchema = ListAgentsData$outboundSchema;
1251
+ /** @deprecated use `ListAgentsData$Outbound` instead. */
1252
+ export type Outbound = ListAgentsData$Outbound;
1253
+ }
1254
+
1255
+ export function listAgentsDataToJSON(listAgentsData: ListAgentsData): string {
1256
+ return JSON.stringify(ListAgentsData$outboundSchema.parse(listAgentsData));
1257
+ }
1258
+
1259
+ export function listAgentsDataFromJSON(
1260
+ jsonString: string,
1261
+ ): SafeParseResult<ListAgentsData, SDKValidationError> {
1262
+ return safeParse(
1263
+ jsonString,
1264
+ (x) => ListAgentsData$inboundSchema.parse(JSON.parse(x)),
1265
+ `Failed to parse 'ListAgentsData' from JSON`,
1266
+ );
1267
+ }
1268
+
1269
+ /** @internal */
1270
+ export const ListAgentsResponseBody$inboundSchema: z.ZodType<
1271
+ ListAgentsResponseBody,
1272
+ z.ZodTypeDef,
1273
+ unknown
1274
+ > = z.object({
1275
+ object: ListAgentsObject$inboundSchema,
1276
+ data: z.array(z.lazy(() => ListAgentsData$inboundSchema)),
1277
+ has_more: z.boolean(),
1278
+ }).transform((v) => {
1279
+ return remap$(v, {
1280
+ "has_more": "hasMore",
1281
+ });
1282
+ });
1283
+
1284
+ /** @internal */
1285
+ export type ListAgentsResponseBody$Outbound = {
1286
+ object: string;
1287
+ data: Array<ListAgentsData$Outbound>;
1288
+ has_more: boolean;
1289
+ };
1290
+
1291
+ /** @internal */
1292
+ export const ListAgentsResponseBody$outboundSchema: z.ZodType<
1293
+ ListAgentsResponseBody$Outbound,
1294
+ z.ZodTypeDef,
1295
+ ListAgentsResponseBody
1296
+ > = z.object({
1297
+ object: ListAgentsObject$outboundSchema,
1298
+ data: z.array(z.lazy(() => ListAgentsData$outboundSchema)),
1299
+ hasMore: z.boolean(),
1300
+ }).transform((v) => {
1301
+ return remap$(v, {
1302
+ hasMore: "has_more",
1303
+ });
1304
+ });
1305
+
1306
+ /**
1307
+ * @internal
1308
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1309
+ */
1310
+ export namespace ListAgentsResponseBody$ {
1311
+ /** @deprecated use `ListAgentsResponseBody$inboundSchema` instead. */
1312
+ export const inboundSchema = ListAgentsResponseBody$inboundSchema;
1313
+ /** @deprecated use `ListAgentsResponseBody$outboundSchema` instead. */
1314
+ export const outboundSchema = ListAgentsResponseBody$outboundSchema;
1315
+ /** @deprecated use `ListAgentsResponseBody$Outbound` instead. */
1316
+ export type Outbound = ListAgentsResponseBody$Outbound;
1317
+ }
1318
+
1319
+ export function listAgentsResponseBodyToJSON(
1320
+ listAgentsResponseBody: ListAgentsResponseBody,
1321
+ ): string {
1322
+ return JSON.stringify(
1323
+ ListAgentsResponseBody$outboundSchema.parse(listAgentsResponseBody),
1324
+ );
1325
+ }
1326
+
1327
+ export function listAgentsResponseBodyFromJSON(
1328
+ jsonString: string,
1329
+ ): SafeParseResult<ListAgentsResponseBody, SDKValidationError> {
1330
+ return safeParse(
1331
+ jsonString,
1332
+ (x) => ListAgentsResponseBody$inboundSchema.parse(JSON.parse(x)),
1333
+ `Failed to parse 'ListAgentsResponseBody' from JSON`,
1334
+ );
1335
+ }