@ideascol/agents-generator-sdk 0.1.4 → 0.2.0

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/dist/bin/cli.js CHANGED
@@ -598,7 +598,7 @@ var OpenAPI;
598
598
  var init_OpenAPI = __esm(() => {
599
599
  OpenAPI = {
600
600
  BASE: "",
601
- VERSION: "main-6a6ce76bec2e854b841b630c73e9e239512aff88",
601
+ VERSION: "main-2ca05a009ba704a733f8de2cabfb9379a45d1b79",
602
602
  WITH_CREDENTIALS: false,
603
603
  CREDENTIALS: "include",
604
604
  TOKEN: undefined,
@@ -833,15 +833,488 @@ var init_request = __esm(() => {
833
833
  init_CancelablePromise();
834
834
  });
835
835
 
836
+ // src/lib/clients/agents-generator/services/AdminAgentsService.ts
837
+ class AdminAgentsService {
838
+ static createAgent(requestBody) {
839
+ return request(OpenAPI, {
840
+ method: "POST",
841
+ url: "/agents",
842
+ body: requestBody,
843
+ mediaType: "application/json",
844
+ errors: {
845
+ 422: `Validation Error`
846
+ }
847
+ });
848
+ }
849
+ static getAgents(skip, limit = 100) {
850
+ return request(OpenAPI, {
851
+ method: "GET",
852
+ url: "/agents",
853
+ query: {
854
+ skip,
855
+ limit
856
+ },
857
+ errors: {
858
+ 422: `Validation Error`
859
+ }
860
+ });
861
+ }
862
+ static updateAgent(agentId, requestBody, userId) {
863
+ return request(OpenAPI, {
864
+ method: "PUT",
865
+ url: "/agents/{agent_id}",
866
+ path: {
867
+ agent_id: agentId
868
+ },
869
+ query: {
870
+ user_id: userId
871
+ },
872
+ body: requestBody,
873
+ mediaType: "application/json",
874
+ errors: {
875
+ 422: `Validation Error`
876
+ }
877
+ });
878
+ }
879
+ static getAgent(agentId, userId) {
880
+ return request(OpenAPI, {
881
+ method: "GET",
882
+ url: "/agents/{agent_id}",
883
+ path: {
884
+ agent_id: agentId
885
+ },
886
+ query: {
887
+ user_id: userId
888
+ },
889
+ errors: {
890
+ 422: `Validation Error`
891
+ }
892
+ });
893
+ }
894
+ static deleteAgent(agentId, userId) {
895
+ return request(OpenAPI, {
896
+ method: "DELETE",
897
+ url: "/agents/{agent_id}",
898
+ path: {
899
+ agent_id: agentId
900
+ },
901
+ query: {
902
+ user_id: userId
903
+ },
904
+ errors: {
905
+ 422: `Validation Error`
906
+ }
907
+ });
908
+ }
909
+ static initializeAgent(agentId) {
910
+ return request(OpenAPI, {
911
+ method: "POST",
912
+ url: "/agents/{agent_id}/initialize",
913
+ path: {
914
+ agent_id: agentId
915
+ },
916
+ errors: {
917
+ 422: `Validation Error`
918
+ }
919
+ });
920
+ }
921
+ static queryAgent(agentId, requestBody, userId, conversationId) {
922
+ return request(OpenAPI, {
923
+ method: "POST",
924
+ url: "/agents/{agent_id}/query",
925
+ path: {
926
+ agent_id: agentId
927
+ },
928
+ query: {
929
+ user_id: userId,
930
+ conversation_id: conversationId
931
+ },
932
+ body: requestBody,
933
+ mediaType: "application/json",
934
+ errors: {
935
+ 422: `Validation Error`
936
+ }
937
+ });
938
+ }
939
+ static getAgentStructure(agentId, userId) {
940
+ return request(OpenAPI, {
941
+ method: "GET",
942
+ url: "/agents/{agent_id}/structure",
943
+ path: {
944
+ agent_id: agentId
945
+ },
946
+ query: {
947
+ user_id: userId
948
+ },
949
+ errors: {
950
+ 422: `Validation Error`
951
+ }
952
+ });
953
+ }
954
+ static visualizeAgent(agentId, userId, format = "png") {
955
+ return request(OpenAPI, {
956
+ method: "GET",
957
+ url: "/agents/{agent_id}/visualize",
958
+ path: {
959
+ agent_id: agentId
960
+ },
961
+ query: {
962
+ user_id: userId,
963
+ format
964
+ },
965
+ errors: {
966
+ 422: `Validation Error`
967
+ }
968
+ });
969
+ }
970
+ }
971
+ var init_AdminAgentsService = __esm(() => {
972
+ init_OpenAPI();
973
+ init_request();
974
+ });
975
+
976
+ // src/lib/clients/agents-generator/services/AdminConversationsService.ts
977
+ class AdminConversationsService {
978
+ static createConversation(requestBody) {
979
+ return request(OpenAPI, {
980
+ method: "POST",
981
+ url: "/conversations",
982
+ body: requestBody,
983
+ mediaType: "application/json",
984
+ errors: {
985
+ 422: `Validation Error`
986
+ }
987
+ });
988
+ }
989
+ static getConversation(conversationId) {
990
+ return request(OpenAPI, {
991
+ method: "GET",
992
+ url: "/conversations/{conversation_id}",
993
+ path: {
994
+ conversation_id: conversationId
995
+ },
996
+ errors: {
997
+ 422: `Validation Error`
998
+ }
999
+ });
1000
+ }
1001
+ static updateConversation(conversationId, requestBody) {
1002
+ return request(OpenAPI, {
1003
+ method: "PUT",
1004
+ url: "/conversations/{conversation_id}",
1005
+ path: {
1006
+ conversation_id: conversationId
1007
+ },
1008
+ body: requestBody,
1009
+ mediaType: "application/json",
1010
+ errors: {
1011
+ 422: `Validation Error`
1012
+ }
1013
+ });
1014
+ }
1015
+ static deleteConversation(conversationId) {
1016
+ return request(OpenAPI, {
1017
+ method: "DELETE",
1018
+ url: "/conversations/{conversation_id}",
1019
+ path: {
1020
+ conversation_id: conversationId
1021
+ },
1022
+ errors: {
1023
+ 422: `Validation Error`
1024
+ }
1025
+ });
1026
+ }
1027
+ static getAgentConversations(agentId, skip, limit = 100) {
1028
+ return request(OpenAPI, {
1029
+ method: "GET",
1030
+ url: "/conversations/agent/{agent_id}",
1031
+ path: {
1032
+ agent_id: agentId
1033
+ },
1034
+ query: {
1035
+ skip,
1036
+ limit
1037
+ },
1038
+ errors: {
1039
+ 422: `Validation Error`
1040
+ }
1041
+ });
1042
+ }
1043
+ }
1044
+ var init_AdminConversationsService = __esm(() => {
1045
+ init_OpenAPI();
1046
+ init_request();
1047
+ });
1048
+
1049
+ // src/lib/clients/agents-generator/services/AdminCredentialsService.ts
1050
+ class AdminCredentialsService {
1051
+ static getCredentials() {
1052
+ return request(OpenAPI, {
1053
+ method: "GET",
1054
+ url: "/credentials"
1055
+ });
1056
+ }
1057
+ static createCredential(requestBody) {
1058
+ return request(OpenAPI, {
1059
+ method: "POST",
1060
+ url: "/credentials",
1061
+ body: requestBody,
1062
+ mediaType: "application/json",
1063
+ errors: {
1064
+ 422: `Validation Error`
1065
+ }
1066
+ });
1067
+ }
1068
+ static getCredential(credentialId) {
1069
+ return request(OpenAPI, {
1070
+ method: "GET",
1071
+ url: "/credentials/{credential_id}",
1072
+ path: {
1073
+ credential_id: credentialId
1074
+ },
1075
+ errors: {
1076
+ 422: `Validation Error`
1077
+ }
1078
+ });
1079
+ }
1080
+ static updateCredential(credentialId, requestBody) {
1081
+ return request(OpenAPI, {
1082
+ method: "PUT",
1083
+ url: "/credentials/{credential_id}",
1084
+ path: {
1085
+ credential_id: credentialId
1086
+ },
1087
+ body: requestBody,
1088
+ mediaType: "application/json",
1089
+ errors: {
1090
+ 422: `Validation Error`
1091
+ }
1092
+ });
1093
+ }
1094
+ static deleteCredential(credentialId) {
1095
+ return request(OpenAPI, {
1096
+ method: "DELETE",
1097
+ url: "/credentials/{credential_id}",
1098
+ path: {
1099
+ credential_id: credentialId
1100
+ },
1101
+ errors: {
1102
+ 422: `Validation Error`
1103
+ }
1104
+ });
1105
+ }
1106
+ static getCredentialDecrypted(credentialId) {
1107
+ return request(OpenAPI, {
1108
+ method: "GET",
1109
+ url: "/credentials/{credential_id}/decrypt",
1110
+ path: {
1111
+ credential_id: credentialId
1112
+ },
1113
+ errors: {
1114
+ 422: `Validation Error`
1115
+ }
1116
+ });
1117
+ }
1118
+ }
1119
+ var init_AdminCredentialsService = __esm(() => {
1120
+ init_OpenAPI();
1121
+ init_request();
1122
+ });
1123
+
1124
+ // src/lib/clients/agents-generator/services/AdminFileLibraryService.ts
1125
+ class AdminFileLibraryService {
1126
+ static getBuckets() {
1127
+ return request(OpenAPI, {
1128
+ method: "GET",
1129
+ url: "/file-library/buckets"
1130
+ });
1131
+ }
1132
+ static createBucket(requestBody) {
1133
+ return request(OpenAPI, {
1134
+ method: "POST",
1135
+ url: "/file-library/buckets",
1136
+ body: requestBody,
1137
+ mediaType: "application/json",
1138
+ errors: {
1139
+ 422: `Validation Error`
1140
+ }
1141
+ });
1142
+ }
1143
+ static getBucket(bucketId) {
1144
+ return request(OpenAPI, {
1145
+ method: "GET",
1146
+ url: "/file-library/buckets/{bucket_id}",
1147
+ path: {
1148
+ bucket_id: bucketId
1149
+ },
1150
+ errors: {
1151
+ 422: `Validation Error`
1152
+ }
1153
+ });
1154
+ }
1155
+ static deleteBucket(bucketId) {
1156
+ return request(OpenAPI, {
1157
+ method: "DELETE",
1158
+ url: "/file-library/buckets/{bucket_id}",
1159
+ path: {
1160
+ bucket_id: bucketId
1161
+ },
1162
+ errors: {
1163
+ 422: `Validation Error`
1164
+ }
1165
+ });
1166
+ }
1167
+ static createFolder(requestBody) {
1168
+ return request(OpenAPI, {
1169
+ method: "POST",
1170
+ url: "/file-library/folders",
1171
+ body: requestBody,
1172
+ mediaType: "application/json",
1173
+ errors: {
1174
+ 422: `Validation Error`
1175
+ }
1176
+ });
1177
+ }
1178
+ static getFoldersByBucket(bucketId, parentFolderId) {
1179
+ return request(OpenAPI, {
1180
+ method: "GET",
1181
+ url: "/file-library/buckets/{bucket_id}/folders",
1182
+ path: {
1183
+ bucket_id: bucketId
1184
+ },
1185
+ query: {
1186
+ parent_folder_id: parentFolderId
1187
+ },
1188
+ errors: {
1189
+ 422: `Validation Error`
1190
+ }
1191
+ });
1192
+ }
1193
+ static deleteFolder(folderId) {
1194
+ return request(OpenAPI, {
1195
+ method: "DELETE",
1196
+ url: "/file-library/folders/{folder_id}",
1197
+ path: {
1198
+ folder_id: folderId
1199
+ },
1200
+ errors: {
1201
+ 422: `Validation Error`
1202
+ }
1203
+ });
1204
+ }
1205
+ static uploadFile(folderId, formData) {
1206
+ return request(OpenAPI, {
1207
+ method: "POST",
1208
+ url: "/file-library/folders/{folder_id}/files",
1209
+ path: {
1210
+ folder_id: folderId
1211
+ },
1212
+ formData,
1213
+ mediaType: "multipart/form-data",
1214
+ errors: {
1215
+ 422: `Validation Error`
1216
+ }
1217
+ });
1218
+ }
1219
+ static getFilesByFolder(folderId) {
1220
+ return request(OpenAPI, {
1221
+ method: "GET",
1222
+ url: "/file-library/folders/{folder_id}/files",
1223
+ path: {
1224
+ folder_id: folderId
1225
+ },
1226
+ errors: {
1227
+ 422: `Validation Error`
1228
+ }
1229
+ });
1230
+ }
1231
+ static deleteFile(fileId) {
1232
+ return request(OpenAPI, {
1233
+ method: "DELETE",
1234
+ url: "/file-library/files/{file_id}",
1235
+ path: {
1236
+ file_id: fileId
1237
+ },
1238
+ errors: {
1239
+ 422: `Validation Error`
1240
+ }
1241
+ });
1242
+ }
1243
+ static uploadFolder(parentFolderId, requestBody) {
1244
+ return request(OpenAPI, {
1245
+ method: "POST",
1246
+ url: "/file-library/folders/{parent_folder_id}/upload-folder",
1247
+ path: {
1248
+ parent_folder_id: parentFolderId
1249
+ },
1250
+ body: requestBody,
1251
+ mediaType: "application/json",
1252
+ errors: {
1253
+ 422: `Validation Error`
1254
+ }
1255
+ });
1256
+ }
1257
+ static createFolderVectorStore(folderId) {
1258
+ return request(OpenAPI, {
1259
+ method: "POST",
1260
+ url: "/file-library/folders/{folder_id}/create-vector-store",
1261
+ path: {
1262
+ folder_id: folderId
1263
+ },
1264
+ errors: {
1265
+ 422: `Validation Error`
1266
+ }
1267
+ });
1268
+ }
1269
+ }
1270
+ var init_AdminFileLibraryService = __esm(() => {
1271
+ init_OpenAPI();
1272
+ init_request();
1273
+ });
1274
+
1275
+ // src/lib/clients/agents-generator/services/AdminMcpServersService.ts
1276
+ class AdminMcpServersService {
1277
+ static getMcpServersMcpServersGet() {
1278
+ return request(OpenAPI, {
1279
+ method: "GET",
1280
+ url: "/mcp-servers"
1281
+ });
1282
+ }
1283
+ static createMcpServerMcpServersPost(requestBody) {
1284
+ return request(OpenAPI, {
1285
+ method: "POST",
1286
+ url: "/mcp-servers",
1287
+ body: requestBody,
1288
+ mediaType: "application/json",
1289
+ errors: {
1290
+ 422: `Validation Error`
1291
+ }
1292
+ });
1293
+ }
1294
+ static getMcpServerMcpServersServerIdGet(serverId) {
1295
+ return request(OpenAPI, {
1296
+ method: "GET",
1297
+ url: "/mcp-servers/{server_id}",
1298
+ path: {
1299
+ server_id: serverId
1300
+ },
1301
+ errors: {
1302
+ 422: `Validation Error`
1303
+ }
1304
+ });
1305
+ }
1306
+ }
1307
+ var init_AdminMcpServersService = __esm(() => {
1308
+ init_OpenAPI();
1309
+ init_request();
1310
+ });
1311
+
836
1312
  // src/lib/clients/agents-generator/services/AgentService.ts
837
1313
  class AgentService {
838
- static createAgent(requestBody, userId) {
1314
+ static createAgent(requestBody) {
839
1315
  return request(OpenAPI, {
840
1316
  method: "POST",
841
1317
  url: "/agents",
842
- query: {
843
- user_id: userId
844
- },
845
1318
  body: requestBody,
846
1319
  mediaType: "application/json",
847
1320
  errors: {
@@ -1357,6 +1830,79 @@ var init_McpServersService = __esm(() => {
1357
1830
  init_request();
1358
1831
  });
1359
1832
 
1833
+ // src/lib/clients/agents-generator/services/PublicAgentsService.ts
1834
+ class PublicAgentsService {
1835
+ static getAgent(agentId, userId) {
1836
+ return request(OpenAPI, {
1837
+ method: "GET",
1838
+ url: "/agents/{agent_id}",
1839
+ path: {
1840
+ agent_id: agentId
1841
+ },
1842
+ query: {
1843
+ user_id: userId
1844
+ },
1845
+ errors: {
1846
+ 422: `Validation Error`
1847
+ }
1848
+ });
1849
+ }
1850
+ }
1851
+ var init_PublicAgentsService = __esm(() => {
1852
+ init_OpenAPI();
1853
+ init_request();
1854
+ });
1855
+
1856
+ // src/lib/clients/agents-generator/services/PublicConversationsService.ts
1857
+ class PublicConversationsService {
1858
+ static createConversation(requestBody) {
1859
+ return request(OpenAPI, {
1860
+ method: "POST",
1861
+ url: "/conversations",
1862
+ body: requestBody,
1863
+ mediaType: "application/json",
1864
+ errors: {
1865
+ 422: `Validation Error`
1866
+ }
1867
+ });
1868
+ }
1869
+ static getConversation(conversationId) {
1870
+ return request(OpenAPI, {
1871
+ method: "GET",
1872
+ url: "/conversations/{conversation_id}",
1873
+ path: {
1874
+ conversation_id: conversationId
1875
+ },
1876
+ errors: {
1877
+ 422: `Validation Error`
1878
+ }
1879
+ });
1880
+ }
1881
+ static addMessage(conversationId, requestBody, accept) {
1882
+ return request(OpenAPI, {
1883
+ method: "POST",
1884
+ url: "/conversations/{conversation_id}/messages",
1885
+ path: {
1886
+ conversation_id: conversationId
1887
+ },
1888
+ headers: {
1889
+ accept
1890
+ },
1891
+ body: requestBody,
1892
+ mediaType: "application/json",
1893
+ errors: {
1894
+ 404: `Conversation or agent not found`,
1895
+ 422: `Validation Error`,
1896
+ 500: `Server error`
1897
+ }
1898
+ });
1899
+ }
1900
+ }
1901
+ var init_PublicConversationsService = __esm(() => {
1902
+ init_OpenAPI();
1903
+ init_request();
1904
+ });
1905
+
1360
1906
  // src/lib/clients/agents-generator/services/RootService.ts
1361
1907
  class RootService {
1362
1908
  static root() {
@@ -1382,16 +1928,25 @@ var init_agents_generator = __esm(() => {
1382
1928
  init_ApiError();
1383
1929
  init_CancelablePromise();
1384
1930
  init_OpenAPI();
1931
+ init_AdminAgentsService();
1932
+ init_AdminConversationsService();
1933
+ init_AdminCredentialsService();
1934
+ init_AdminFileLibraryService();
1935
+ init_AdminMcpServersService();
1385
1936
  init_AgentService();
1386
1937
  init_ConversationsService();
1387
1938
  init_CredentialsService();
1388
1939
  init_FileLibraryService();
1389
1940
  init_McpServersService();
1941
+ init_PublicAgentsService();
1942
+ init_PublicConversationsService();
1390
1943
  init_RootService();
1391
1944
  });
1392
1945
 
1393
1946
  // src/lib/index.ts
1394
1947
  class AgentClient {
1948
+ admin;
1949
+ public;
1395
1950
  agent;
1396
1951
  conversations;
1397
1952
  mcpServers;
@@ -1418,6 +1973,17 @@ class AgentClient {
1418
1973
  this.root = RootService;
1419
1974
  this.fileLibrary = FileLibraryService;
1420
1975
  this.credentials = CredentialsService;
1976
+ this.admin = {
1977
+ agents: AdminAgentsService,
1978
+ conversations: AdminConversationsService,
1979
+ credentials: AdminCredentialsService,
1980
+ fileLibrary: AdminFileLibraryService,
1981
+ mcpServers: AdminMcpServersService
1982
+ };
1983
+ this.public = {
1984
+ agents: PublicAgentsService,
1985
+ conversations: PublicConversationsService
1986
+ };
1421
1987
  this.conversationsStream = ConversationsServiceStream;
1422
1988
  this.ApiError = ApiError;
1423
1989
  this.CancelError = CancelError;
@@ -1631,7 +2197,10 @@ var init_agentsCommand = __esm(() => {
1631
2197
  action: async (args) => {
1632
2198
  const client = new lib_default({ apiUrl: args.URL, apiToken: "" });
1633
2199
  const agents = await client.agent.getAgents(0, 100);
2200
+ const agents2 = await client.admin.agents.getAgents(0, 100);
2201
+ const agent = await client.public.agents.getAgent("some-agent-id");
1634
2202
  console.log(agents);
2203
+ console.log(agents2);
1635
2204
  }
1636
2205
  };
1637
2206
  agentsCommand_default = commandAgents;