@ideascol/agents-generator-sdk 0.0.4-rc2 → 0.0.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.
- package/README.md +25 -18
- package/dist/bin/cli.js +27 -26
- package/dist/index.js +12 -2
- package/dist/lib/index.d.ts +1 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -7,20 +7,25 @@ agents-generator-sdk
|
|
|
7
7
|
```ts
|
|
8
8
|
import { useEffect, useState } from 'react';
|
|
9
9
|
import {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
AgentRequest,
|
|
10
|
+
AgentClient,
|
|
11
|
+
MessageCreate,
|
|
13
12
|
} from '@ideascol/agents-generator-sdk';
|
|
14
13
|
|
|
15
|
-
OpenAPI.BASE = 'https://api.agentsgenerator.dev';
|
|
16
|
-
|
|
17
14
|
export function Agents() {
|
|
18
15
|
const [agents, setAgents] = useState<AgentRequest[]>([]);
|
|
19
16
|
|
|
20
17
|
useEffect(() => {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
18
|
+
const client = new AgentClient({
|
|
19
|
+
apiUrl: 'https://api.agentsgenerator.dev',
|
|
20
|
+
apiToken: '',
|
|
21
|
+
})
|
|
22
|
+
|
|
23
|
+
client
|
|
24
|
+
.agent.getAgentsAgentsGet(0, 100, "anonymus")
|
|
25
|
+
.then((result: AgentRequest[]) => {
|
|
26
|
+
setAgents(result);
|
|
27
|
+
});
|
|
28
|
+
|
|
24
29
|
}, []);
|
|
25
30
|
|
|
26
31
|
return (
|
|
@@ -37,31 +42,33 @@ export function Agents() {
|
|
|
37
42
|
## Quick start
|
|
38
43
|
```bash
|
|
39
44
|
# Using npm
|
|
40
|
-
npx @ideascol/agents-generator-sdk
|
|
45
|
+
npx @ideascol/agents-generator-sdk@latest
|
|
41
46
|
|
|
42
47
|
# Using bun
|
|
43
|
-
bunx @ideascol/agents-generator-sdk
|
|
48
|
+
bunx @ideascol/agents-generator-sdk@latest
|
|
44
49
|
```
|
|
45
50
|
|
|
46
51
|
## Installation
|
|
47
52
|
|
|
48
53
|
```bash
|
|
49
54
|
# Using npm
|
|
50
|
-
npm install -g @ideascol/agents-generator-sdk
|
|
55
|
+
npm install -g @ideascol/agents-generator-sdk@latest
|
|
51
56
|
|
|
52
57
|
# Using bun
|
|
53
|
-
bun install -g @ideascol/agents-generator-sdk
|
|
58
|
+
bun install -g @ideascol/agents-generator-sdk@latest
|
|
54
59
|
```
|
|
55
60
|
|
|
56
61
|
## Usage as cli
|
|
57
62
|
```bash
|
|
58
|
-
|
|
59
|
-
|
|
63
|
+
npx @ideascol/agents-generator-sdk@latest version --apiToken=1232 --URL=https://api.agentsgenerator.dev
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
```json
|
|
60
67
|
{
|
|
61
|
-
status: "ok",
|
|
62
|
-
api_version: "
|
|
63
|
-
api_branch: "main",
|
|
64
|
-
api_date: "2025-04-
|
|
68
|
+
"status": "ok",
|
|
69
|
+
"api_version": "dbd7d9ca8a6b1e4622ef409e26cd8addb650e95f",
|
|
70
|
+
"api_branch": "main",
|
|
71
|
+
"api_date": "2025-04-25 17:21:01"
|
|
65
72
|
}
|
|
66
73
|
```
|
|
67
74
|
|
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-
|
|
601
|
+
VERSION: "main-dbd7d9ca8a6b1e4622ef409e26cd8addb650e95f",
|
|
602
602
|
WITH_CREDENTIALS: false,
|
|
603
603
|
CREDENTIALS: "include",
|
|
604
604
|
TOKEN: undefined,
|
|
@@ -1111,30 +1111,6 @@ var init_agents_generator = __esm(() => {
|
|
|
1111
1111
|
init_RootService();
|
|
1112
1112
|
});
|
|
1113
1113
|
|
|
1114
|
-
// src/commands/agentsCommand.ts
|
|
1115
|
-
var import_cli_maker, commandAgents, agentsCommand_default;
|
|
1116
|
-
var init_agentsCommand = __esm(() => {
|
|
1117
|
-
import_cli_maker = __toESM(require_dist());
|
|
1118
|
-
init_agents_generator();
|
|
1119
|
-
commandAgents = {
|
|
1120
|
-
name: "getAgents",
|
|
1121
|
-
description: "Get the list of agents",
|
|
1122
|
-
params: [{
|
|
1123
|
-
name: "URL",
|
|
1124
|
-
description: "The URL of the API",
|
|
1125
|
-
required: true,
|
|
1126
|
-
type: import_cli_maker.ParamType.Url
|
|
1127
|
-
}],
|
|
1128
|
-
action: async (args) => {
|
|
1129
|
-
OpenAPI["BASE"] = args.URL;
|
|
1130
|
-
const agents = await AgentService.getAgentsAgentsGet();
|
|
1131
|
-
const hello = await RootService.healthCheckHealthGet();
|
|
1132
|
-
console.log(hello);
|
|
1133
|
-
}
|
|
1134
|
-
};
|
|
1135
|
-
agentsCommand_default = commandAgents;
|
|
1136
|
-
});
|
|
1137
|
-
|
|
1138
1114
|
// src/lib/index.ts
|
|
1139
1115
|
class AgentClient {
|
|
1140
1116
|
agent;
|
|
@@ -1172,8 +1148,9 @@ class AgentClient {
|
|
|
1172
1148
|
return ConversationsServiceStream.addMessageConversationsConversationIdMessagesPost(conversationId, requestBody, "text/plain");
|
|
1173
1149
|
}
|
|
1174
1150
|
}
|
|
1175
|
-
var ConversationsServiceStream;
|
|
1151
|
+
var ConversationsServiceStream, lib_default;
|
|
1176
1152
|
var init_lib = __esm(() => {
|
|
1153
|
+
init_agents_generator();
|
|
1177
1154
|
init_agents_generator();
|
|
1178
1155
|
ConversationsServiceStream = class ConversationsServiceStream extends ConversationsService {
|
|
1179
1156
|
constructor() {
|
|
@@ -1351,6 +1328,30 @@ var init_lib = __esm(() => {
|
|
|
1351
1328
|
return () => controller.abort();
|
|
1352
1329
|
}
|
|
1353
1330
|
};
|
|
1331
|
+
lib_default = AgentClient;
|
|
1332
|
+
});
|
|
1333
|
+
|
|
1334
|
+
// src/commands/agentsCommand.ts
|
|
1335
|
+
var import_cli_maker, commandAgents, agentsCommand_default;
|
|
1336
|
+
var init_agentsCommand = __esm(() => {
|
|
1337
|
+
import_cli_maker = __toESM(require_dist());
|
|
1338
|
+
init_lib();
|
|
1339
|
+
commandAgents = {
|
|
1340
|
+
name: "getAgents",
|
|
1341
|
+
description: "Get the list of agents",
|
|
1342
|
+
params: [{
|
|
1343
|
+
name: "URL",
|
|
1344
|
+
description: "The URL of the API",
|
|
1345
|
+
required: true,
|
|
1346
|
+
type: import_cli_maker.ParamType.Url
|
|
1347
|
+
}],
|
|
1348
|
+
action: async (args) => {
|
|
1349
|
+
const client = new lib_default({ apiUrl: args.URL, apiToken: "" });
|
|
1350
|
+
const agents = await client.agent.getAgentsAgentsGet(0, 100, "anonymus");
|
|
1351
|
+
console.log(agents);
|
|
1352
|
+
}
|
|
1353
|
+
};
|
|
1354
|
+
agentsCommand_default = commandAgents;
|
|
1354
1355
|
});
|
|
1355
1356
|
|
|
1356
1357
|
// src/commands/rootCommand.ts
|
package/dist/index.js
CHANGED
|
@@ -166,7 +166,7 @@ var OpenAPI;
|
|
|
166
166
|
var init_OpenAPI = __esm(() => {
|
|
167
167
|
OpenAPI = {
|
|
168
168
|
BASE: "",
|
|
169
|
-
VERSION: "main-
|
|
169
|
+
VERSION: "main-dbd7d9ca8a6b1e4622ef409e26cd8addb650e95f",
|
|
170
170
|
WITH_CREDENTIALS: false,
|
|
171
171
|
CREDENTIALS: "include",
|
|
172
172
|
TOKEN: undefined,
|
|
@@ -716,8 +716,9 @@ class AgentClient {
|
|
|
716
716
|
return ConversationsServiceStream.addMessageConversationsConversationIdMessagesPost(conversationId, requestBody, "text/plain");
|
|
717
717
|
}
|
|
718
718
|
}
|
|
719
|
-
var ConversationsServiceStream;
|
|
719
|
+
var ConversationsServiceStream, lib_default;
|
|
720
720
|
var init_lib = __esm(() => {
|
|
721
|
+
init_agents_generator();
|
|
721
722
|
init_agents_generator();
|
|
722
723
|
ConversationsServiceStream = class ConversationsServiceStream extends ConversationsService {
|
|
723
724
|
constructor() {
|
|
@@ -895,11 +896,20 @@ var init_lib = __esm(() => {
|
|
|
895
896
|
return () => controller.abort();
|
|
896
897
|
}
|
|
897
898
|
};
|
|
899
|
+
lib_default = AgentClient;
|
|
898
900
|
});
|
|
899
901
|
|
|
900
902
|
// src/index.ts
|
|
901
903
|
var exports_src = {};
|
|
902
904
|
__export(exports_src, {
|
|
905
|
+
RootService: () => RootService,
|
|
906
|
+
OpenAPI: () => OpenAPI,
|
|
907
|
+
McpServersService: () => McpServersService,
|
|
908
|
+
ConversationsService: () => ConversationsService,
|
|
909
|
+
CancelablePromise: () => CancelablePromise,
|
|
910
|
+
CancelError: () => CancelError,
|
|
911
|
+
ApiError: () => ApiError,
|
|
912
|
+
AgentService: () => AgentService,
|
|
903
913
|
AgentClient: () => AgentClient
|
|
904
914
|
});
|
|
905
915
|
module.exports = __toCommonJS(exports_src);
|
package/dist/lib/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ApiError, CancelablePromise, CancelError, ConversationsService, MessageCreate, OpenAPI, AgentService, McpServersService, RootService } from "./clients/agents-generator";
|
|
2
|
+
export * from "./clients/agents-generator";
|
|
2
3
|
export interface StreamEvent {
|
|
3
4
|
type: string;
|
|
4
5
|
content?: string;
|