@ideascol/agents-generator-sdk 0.0.9 → 0.1.2

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 CHANGED
@@ -17,11 +17,11 @@ export function Agents() {
17
17
  useEffect(() => {
18
18
  const client = new AgentClient({
19
19
  apiUrl: 'https://api.agentsgenerator.dev',
20
- apiToken: '',
20
+ apiToken: 'YOUR_API_TOKEN',
21
21
  })
22
22
 
23
23
  client
24
- .agent.getAgentsAgentsGet(0, 100, "anonymus")
24
+ .agent.getAgents(0, 100, "anonymus")
25
25
  .then((result: AgentRequest[]) => {
26
26
  setAgents(result);
27
27
  });
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-1.0.0",
601
+ VERSION: "main-dc044c7be61690adf5f2f6180d23dd69165b11ff",
602
602
  WITH_CREDENTIALS: false,
603
603
  CREDENTIALS: "include",
604
604
  TOKEN: undefined,
@@ -835,7 +835,7 @@ var init_request = __esm(() => {
835
835
 
836
836
  // src/lib/clients/agents-generator/services/AgentService.ts
837
837
  class AgentService {
838
- static createAgentAgentsPost(requestBody, userId) {
838
+ static createAgent(requestBody, userId) {
839
839
  return request(OpenAPI, {
840
840
  method: "POST",
841
841
  url: "/agents",
@@ -849,7 +849,7 @@ class AgentService {
849
849
  }
850
850
  });
851
851
  }
852
- static getAgentsAgentsGet(skip, limit = 100) {
852
+ static getAgents(skip, limit = 100) {
853
853
  return request(OpenAPI, {
854
854
  method: "GET",
855
855
  url: "/agents",
@@ -862,7 +862,7 @@ class AgentService {
862
862
  }
863
863
  });
864
864
  }
865
- static updateAgentAgentsAgentIdPut(agentId, requestBody, userId) {
865
+ static updateAgent(agentId, requestBody, userId) {
866
866
  return request(OpenAPI, {
867
867
  method: "PUT",
868
868
  url: "/agents/{agent_id}",
@@ -879,7 +879,7 @@ class AgentService {
879
879
  }
880
880
  });
881
881
  }
882
- static getAgentAgentsAgentIdGet(agentId, userId) {
882
+ static getAgent(agentId, userId) {
883
883
  return request(OpenAPI, {
884
884
  method: "GET",
885
885
  url: "/agents/{agent_id}",
@@ -894,7 +894,7 @@ class AgentService {
894
894
  }
895
895
  });
896
896
  }
897
- static deleteAgentAgentsAgentIdDelete(agentId, userId) {
897
+ static deleteAgent(agentId, userId) {
898
898
  return request(OpenAPI, {
899
899
  method: "DELETE",
900
900
  url: "/agents/{agent_id}",
@@ -909,7 +909,7 @@ class AgentService {
909
909
  }
910
910
  });
911
911
  }
912
- static initializeAgentAgentsAgentIdInitializePost(agentId) {
912
+ static initializeAgent(agentId) {
913
913
  return request(OpenAPI, {
914
914
  method: "POST",
915
915
  url: "/agents/{agent_id}/initialize",
@@ -921,7 +921,7 @@ class AgentService {
921
921
  }
922
922
  });
923
923
  }
924
- static queryAgentAgentsAgentIdQueryPost(agentId, requestBody, userId, conversationId) {
924
+ static queryAgent(agentId, requestBody, userId, conversationId) {
925
925
  return request(OpenAPI, {
926
926
  method: "POST",
927
927
  url: "/agents/{agent_id}/query",
@@ -939,7 +939,7 @@ class AgentService {
939
939
  }
940
940
  });
941
941
  }
942
- static getAgentStructureAgentsAgentIdStructureGet(agentId, userId) {
942
+ static getAgentStructure(agentId, userId) {
943
943
  return request(OpenAPI, {
944
944
  method: "GET",
945
945
  url: "/agents/{agent_id}/structure",
@@ -954,7 +954,7 @@ class AgentService {
954
954
  }
955
955
  });
956
956
  }
957
- static visualizeAgentAgentsAgentIdVisualizeGet(agentId, userId, format = "png") {
957
+ static visualizeAgent(agentId, userId, format = "png") {
958
958
  return request(OpenAPI, {
959
959
  method: "GET",
960
960
  url: "/agents/{agent_id}/visualize",
@@ -978,7 +978,7 @@ var init_AgentService = __esm(() => {
978
978
 
979
979
  // src/lib/clients/agents-generator/services/ConversationsService.ts
980
980
  class ConversationsService {
981
- static createConversationConversationsPost(requestBody) {
981
+ static createConversation(requestBody) {
982
982
  return request(OpenAPI, {
983
983
  method: "POST",
984
984
  url: "/conversations",
@@ -989,7 +989,7 @@ class ConversationsService {
989
989
  }
990
990
  });
991
991
  }
992
- static getConversationConversationsConversationIdGet(conversationId) {
992
+ static getConversation(conversationId) {
993
993
  return request(OpenAPI, {
994
994
  method: "GET",
995
995
  url: "/conversations/{conversation_id}",
@@ -1001,7 +1001,7 @@ class ConversationsService {
1001
1001
  }
1002
1002
  });
1003
1003
  }
1004
- static updateConversationConversationsConversationIdPut(conversationId, requestBody) {
1004
+ static updateConversation(conversationId, requestBody) {
1005
1005
  return request(OpenAPI, {
1006
1006
  method: "PUT",
1007
1007
  url: "/conversations/{conversation_id}",
@@ -1015,7 +1015,7 @@ class ConversationsService {
1015
1015
  }
1016
1016
  });
1017
1017
  }
1018
- static deleteConversationConversationsConversationIdDelete(conversationId) {
1018
+ static deleteConversation(conversationId) {
1019
1019
  return request(OpenAPI, {
1020
1020
  method: "DELETE",
1021
1021
  url: "/conversations/{conversation_id}",
@@ -1027,7 +1027,7 @@ class ConversationsService {
1027
1027
  }
1028
1028
  });
1029
1029
  }
1030
- static getAgentConversationsConversationsAgentAgentIdGet(agentId, skip, limit = 100) {
1030
+ static getAgentConversations(agentId, skip, limit = 100) {
1031
1031
  return request(OpenAPI, {
1032
1032
  method: "GET",
1033
1033
  url: "/conversations/agent/{agent_id}",
@@ -1043,7 +1043,7 @@ class ConversationsService {
1043
1043
  }
1044
1044
  });
1045
1045
  }
1046
- static addMessageConversationsConversationIdMessagesPost(conversationId, requestBody, accept) {
1046
+ static addMessage(conversationId, requestBody, accept) {
1047
1047
  return request(OpenAPI, {
1048
1048
  method: "POST",
1049
1049
  url: "/conversations/{conversation_id}/messages",
@@ -1068,18 +1068,18 @@ var init_ConversationsService = __esm(() => {
1068
1068
  init_request();
1069
1069
  });
1070
1070
 
1071
- // src/lib/clients/agents-generator/services/DefaultService.ts
1072
- class DefaultService {
1073
- static getCredentialsCredentialsGet() {
1071
+ // src/lib/clients/agents-generator/services/CredentialsService.ts
1072
+ class CredentialsService {
1073
+ static getCredentials() {
1074
1074
  return request(OpenAPI, {
1075
1075
  method: "GET",
1076
- url: "/credentials"
1076
+ url: "/credentials/"
1077
1077
  });
1078
1078
  }
1079
- static createCredentialCredentialsPost(requestBody) {
1079
+ static createCredential(requestBody) {
1080
1080
  return request(OpenAPI, {
1081
1081
  method: "POST",
1082
- url: "/credentials",
1082
+ url: "/credentials/",
1083
1083
  body: requestBody,
1084
1084
  mediaType: "application/json",
1085
1085
  errors: {
@@ -1087,7 +1087,7 @@ class DefaultService {
1087
1087
  }
1088
1088
  });
1089
1089
  }
1090
- static getCredentialCredentialsCredentialIdGet(credentialId) {
1090
+ static getCredential(credentialId) {
1091
1091
  return request(OpenAPI, {
1092
1092
  method: "GET",
1093
1093
  url: "/credentials/{credential_id}",
@@ -1099,7 +1099,7 @@ class DefaultService {
1099
1099
  }
1100
1100
  });
1101
1101
  }
1102
- static updateCredentialCredentialsCredentialIdPut(credentialId, requestBody) {
1102
+ static updateCredential(credentialId, requestBody) {
1103
1103
  return request(OpenAPI, {
1104
1104
  method: "PUT",
1105
1105
  url: "/credentials/{credential_id}",
@@ -1113,7 +1113,7 @@ class DefaultService {
1113
1113
  }
1114
1114
  });
1115
1115
  }
1116
- static deleteCredentialCredentialsCredentialIdDelete(credentialId) {
1116
+ static deleteCredential(credentialId) {
1117
1117
  return request(OpenAPI, {
1118
1118
  method: "DELETE",
1119
1119
  url: "/credentials/{credential_id}",
@@ -1125,7 +1125,7 @@ class DefaultService {
1125
1125
  }
1126
1126
  });
1127
1127
  }
1128
- static getCredentialDecryptedCredentialsCredentialIdDecryptGet(credentialId) {
1128
+ static getCredentialDecrypted(credentialId) {
1129
1129
  return request(OpenAPI, {
1130
1130
  method: "GET",
1131
1131
  url: "/credentials/{credential_id}/decrypt",
@@ -1138,20 +1138,20 @@ class DefaultService {
1138
1138
  });
1139
1139
  }
1140
1140
  }
1141
- var init_DefaultService = __esm(() => {
1141
+ var init_CredentialsService = __esm(() => {
1142
1142
  init_OpenAPI();
1143
1143
  init_request();
1144
1144
  });
1145
1145
 
1146
1146
  // src/lib/clients/agents-generator/services/FileLibraryService.ts
1147
1147
  class FileLibraryService {
1148
- static getBucketsFileLibraryBucketsGet() {
1148
+ static getBuckets() {
1149
1149
  return request(OpenAPI, {
1150
1150
  method: "GET",
1151
1151
  url: "/file-library/buckets"
1152
1152
  });
1153
1153
  }
1154
- static createBucketFileLibraryBucketsPost(requestBody) {
1154
+ static createBucket(requestBody) {
1155
1155
  return request(OpenAPI, {
1156
1156
  method: "POST",
1157
1157
  url: "/file-library/buckets",
@@ -1162,7 +1162,7 @@ class FileLibraryService {
1162
1162
  }
1163
1163
  });
1164
1164
  }
1165
- static getBucketFileLibraryBucketsBucketIdGet(bucketId) {
1165
+ static getBucket(bucketId) {
1166
1166
  return request(OpenAPI, {
1167
1167
  method: "GET",
1168
1168
  url: "/file-library/buckets/{bucket_id}",
@@ -1174,7 +1174,7 @@ class FileLibraryService {
1174
1174
  }
1175
1175
  });
1176
1176
  }
1177
- static deleteBucketFileLibraryBucketsBucketIdDelete(bucketId) {
1177
+ static deleteBucket(bucketId) {
1178
1178
  return request(OpenAPI, {
1179
1179
  method: "DELETE",
1180
1180
  url: "/file-library/buckets/{bucket_id}",
@@ -1186,7 +1186,7 @@ class FileLibraryService {
1186
1186
  }
1187
1187
  });
1188
1188
  }
1189
- static createFolderFileLibraryFoldersPost(requestBody) {
1189
+ static createFolder(requestBody) {
1190
1190
  return request(OpenAPI, {
1191
1191
  method: "POST",
1192
1192
  url: "/file-library/folders",
@@ -1197,7 +1197,7 @@ class FileLibraryService {
1197
1197
  }
1198
1198
  });
1199
1199
  }
1200
- static getFoldersFileLibraryBucketsBucketIdFoldersGet(bucketId, parentFolderId) {
1200
+ static getFoldersByBucket(bucketId, parentFolderId) {
1201
1201
  return request(OpenAPI, {
1202
1202
  method: "GET",
1203
1203
  url: "/file-library/buckets/{bucket_id}/folders",
@@ -1212,7 +1212,7 @@ class FileLibraryService {
1212
1212
  }
1213
1213
  });
1214
1214
  }
1215
- static deleteFolderFileLibraryFoldersFolderIdDelete(folderId) {
1215
+ static deleteFolder(folderId) {
1216
1216
  return request(OpenAPI, {
1217
1217
  method: "DELETE",
1218
1218
  url: "/file-library/folders/{folder_id}",
@@ -1224,7 +1224,7 @@ class FileLibraryService {
1224
1224
  }
1225
1225
  });
1226
1226
  }
1227
- static uploadFileFileLibraryFoldersFolderIdFilesPost(folderId, formData) {
1227
+ static uploadFile(folderId, formData) {
1228
1228
  return request(OpenAPI, {
1229
1229
  method: "POST",
1230
1230
  url: "/file-library/folders/{folder_id}/files",
@@ -1238,7 +1238,7 @@ class FileLibraryService {
1238
1238
  }
1239
1239
  });
1240
1240
  }
1241
- static getFilesFileLibraryFoldersFolderIdFilesGet(folderId) {
1241
+ static getFilesByFolder(folderId) {
1242
1242
  return request(OpenAPI, {
1243
1243
  method: "GET",
1244
1244
  url: "/file-library/folders/{folder_id}/files",
@@ -1250,7 +1250,7 @@ class FileLibraryService {
1250
1250
  }
1251
1251
  });
1252
1252
  }
1253
- static deleteFileFileLibraryFilesFileIdDelete(fileId) {
1253
+ static deleteFile(fileId) {
1254
1254
  return request(OpenAPI, {
1255
1255
  method: "DELETE",
1256
1256
  url: "/file-library/files/{file_id}",
@@ -1262,7 +1262,7 @@ class FileLibraryService {
1262
1262
  }
1263
1263
  });
1264
1264
  }
1265
- static uploadFolderFileLibraryFoldersParentFolderIdUploadFolderPost(parentFolderId, requestBody) {
1265
+ static uploadFolder(parentFolderId, requestBody) {
1266
1266
  return request(OpenAPI, {
1267
1267
  method: "POST",
1268
1268
  url: "/file-library/folders/{parent_folder_id}/upload-folder",
@@ -1276,7 +1276,7 @@ class FileLibraryService {
1276
1276
  }
1277
1277
  });
1278
1278
  }
1279
- static createFolderVectorStoreFileLibraryFoldersFolderIdCreateVectorStorePost(folderId) {
1279
+ static createFolderVectorStore(folderId) {
1280
1280
  return request(OpenAPI, {
1281
1281
  method: "POST",
1282
1282
  url: "/file-library/folders/{folder_id}/create-vector-store",
@@ -1302,6 +1302,17 @@ class McpServersService {
1302
1302
  url: "/mcp-servers"
1303
1303
  });
1304
1304
  }
1305
+ static createMcpServerMcpServersPost(requestBody) {
1306
+ return request(OpenAPI, {
1307
+ method: "POST",
1308
+ url: "/mcp-servers",
1309
+ body: requestBody,
1310
+ mediaType: "application/json",
1311
+ errors: {
1312
+ 422: `Validation Error`
1313
+ }
1314
+ });
1315
+ }
1305
1316
  static getMcpServerMcpServersServerIdGet(serverId) {
1306
1317
  return request(OpenAPI, {
1307
1318
  method: "GET",
@@ -1314,6 +1325,32 @@ class McpServersService {
1314
1325
  }
1315
1326
  });
1316
1327
  }
1328
+ static updateMcpServerMcpServersServerIdPut(serverId, requestBody) {
1329
+ return request(OpenAPI, {
1330
+ method: "PUT",
1331
+ url: "/mcp-servers/{server_id}",
1332
+ path: {
1333
+ server_id: serverId
1334
+ },
1335
+ body: requestBody,
1336
+ mediaType: "application/json",
1337
+ errors: {
1338
+ 422: `Validation Error`
1339
+ }
1340
+ });
1341
+ }
1342
+ static deleteMcpServerMcpServersServerIdDelete(serverId) {
1343
+ return request(OpenAPI, {
1344
+ method: "DELETE",
1345
+ url: "/mcp-servers/{server_id}",
1346
+ path: {
1347
+ server_id: serverId
1348
+ },
1349
+ errors: {
1350
+ 422: `Validation Error`
1351
+ }
1352
+ });
1353
+ }
1317
1354
  }
1318
1355
  var init_McpServersService = __esm(() => {
1319
1356
  init_OpenAPI();
@@ -1322,13 +1359,13 @@ var init_McpServersService = __esm(() => {
1322
1359
 
1323
1360
  // src/lib/clients/agents-generator/services/RootService.ts
1324
1361
  class RootService {
1325
- static rootGet() {
1362
+ static root() {
1326
1363
  return request(OpenAPI, {
1327
1364
  method: "GET",
1328
1365
  url: "/"
1329
1366
  });
1330
1367
  }
1331
- static healthCheckHealthGet() {
1368
+ static healthCheck() {
1332
1369
  return request(OpenAPI, {
1333
1370
  method: "GET",
1334
1371
  url: "/health"
@@ -1347,7 +1384,7 @@ var init_agents_generator = __esm(() => {
1347
1384
  init_OpenAPI();
1348
1385
  init_AgentService();
1349
1386
  init_ConversationsService();
1350
- init_DefaultService();
1387
+ init_CredentialsService();
1351
1388
  init_FileLibraryService();
1352
1389
  init_McpServersService();
1353
1390
  init_RootService();
@@ -1360,6 +1397,7 @@ class AgentClient {
1360
1397
  mcpServers;
1361
1398
  root;
1362
1399
  fileLibrary;
1400
+ credentials;
1363
1401
  ApiError;
1364
1402
  CancelError;
1365
1403
  CancelablePromise;
@@ -1379,6 +1417,7 @@ class AgentClient {
1379
1417
  this.mcpServers = McpServersService;
1380
1418
  this.root = RootService;
1381
1419
  this.fileLibrary = FileLibraryService;
1420
+ this.credentials = CredentialsService;
1382
1421
  this.conversationsStream = ConversationsServiceStream;
1383
1422
  this.ApiError = ApiError;
1384
1423
  this.CancelError = CancelError;
@@ -1389,7 +1428,7 @@ class AgentClient {
1389
1428
  return ConversationsServiceStream.addMessageConversationsConversationIdMessagesPostStream(conversationId, requestBody, callbacks);
1390
1429
  }
1391
1430
  sendMessage(conversationId, requestBody) {
1392
- return ConversationsServiceStream.addMessageConversationsConversationIdMessagesPost(conversationId, requestBody, "text/plain");
1431
+ return ConversationsServiceStream.addMessage(conversationId, requestBody, "text/plain");
1393
1432
  }
1394
1433
  }
1395
1434
  var ConversationsServiceStream, lib_default;
@@ -1579,7 +1618,7 @@ var init_lib = __esm(() => {
1579
1618
  var import_cli_maker, commandAgents, agentsCommand_default;
1580
1619
  var init_agentsCommand = __esm(() => {
1581
1620
  init_lib();
1582
- import_cli_maker = __toESM(require_dist());
1621
+ import_cli_maker = __toESM(require_dist(), 1);
1583
1622
  commandAgents = {
1584
1623
  name: "getAgents",
1585
1624
  description: "Get the list of agents",
@@ -1591,7 +1630,7 @@ var init_agentsCommand = __esm(() => {
1591
1630
  }],
1592
1631
  action: async (args) => {
1593
1632
  const client = new lib_default({ apiUrl: args.URL, apiToken: "" });
1594
- const agents = await client.agent.getAgentsAgentsGet(0, 100);
1633
+ const agents = await client.agent.getAgents(0, 100);
1595
1634
  console.log(agents);
1596
1635
  }
1597
1636
  };
@@ -1602,7 +1641,7 @@ var init_agentsCommand = __esm(() => {
1602
1641
  var import_cli_maker2, rootCommand, rootCommand_default;
1603
1642
  var init_rootCommand = __esm(() => {
1604
1643
  init_lib();
1605
- import_cli_maker2 = __toESM(require_dist());
1644
+ import_cli_maker2 = __toESM(require_dist(), 1);
1606
1645
  rootCommand = {
1607
1646
  name: "version",
1608
1647
  description: "Get the version of the API",
@@ -1622,7 +1661,7 @@ var init_rootCommand = __esm(() => {
1622
1661
  apiUrl: args.URL || "https://api.agentsgenerator.dev/",
1623
1662
  apiToken: args.apiToken
1624
1663
  });
1625
- const hello = await client.root.healthCheckHealthGet();
1664
+ const hello = await client.root.healthCheck();
1626
1665
  console.log(hello);
1627
1666
  }
1628
1667
  };
@@ -1633,7 +1672,7 @@ var init_rootCommand = __esm(() => {
1633
1672
  var import_cli_maker3, commandConversations, conversationsCommand_default;
1634
1673
  var init_conversationsCommand = __esm(() => {
1635
1674
  init_agents_generator();
1636
- import_cli_maker3 = __toESM(require_dist());
1675
+ import_cli_maker3 = __toESM(require_dist(), 1);
1637
1676
  commandConversations = {
1638
1677
  name: "getConversations",
1639
1678
  description: "Get the list of conversations",
@@ -1657,8 +1696,8 @@ var init_conversationsCommand = __esm(() => {
1657
1696
  OpenAPI["BASE"] = args.URL;
1658
1697
  const conversationId = args.conversationId;
1659
1698
  const agentId = args.agentId;
1660
- const conversationList = await ConversationsService.getAgentConversationsConversationsAgentAgentIdGet(agentId);
1661
- const conversations = await ConversationsService.getConversationConversationsConversationIdGet(conversationId);
1699
+ const conversationList = await ConversationsService.getAgentConversations(agentId);
1700
+ const conversations = await ConversationsService.getConversation(conversationId);
1662
1701
  return {
1663
1702
  conversationList,
1664
1703
  conversations
@@ -1679,7 +1718,7 @@ var init_cli = __esm(() => {
1679
1718
  init_agentsCommand();
1680
1719
  init_rootCommand();
1681
1720
  init_conversationsCommand();
1682
- import_cli_maker4 = __toESM(require_dist());
1721
+ import_cli_maker4 = __toESM(require_dist(), 1);
1683
1722
  cli = new import_cli_maker4.CLI("@ideascol/agents-generator-sdk", "agents-generator-sdk", {
1684
1723
  interactive: true,
1685
1724
  version: OpenAPI.VERSION