@inkeep/agents-cli 0.41.1 → 0.42.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/README.md +13 -20
- package/dist/api.js +8 -8
- package/dist/commands/init.js +79 -53
- package/dist/commands/list-agents.js +1 -1
- package/dist/commands/login.js +3 -3
- package/dist/commands/profile.js +7 -26
- package/dist/commands/pull-v3/component-parser.js +0 -2
- package/dist/commands/pull-v3/component-updater.js +122 -64
- package/dist/commands/pull-v3/components/agent-generator.js +17 -3
- package/dist/commands/pull-v3/components/artifact-component-generator.js +7 -7
- package/dist/commands/pull-v3/components/context-config-generator.js +6 -6
- package/dist/commands/pull-v3/components/credential-generator.js +4 -4
- package/dist/commands/pull-v3/components/data-component-generator.js +4 -4
- package/dist/commands/pull-v3/components/environment-generator.js +10 -7
- package/dist/commands/pull-v3/components/function-tool-generator.js +5 -7
- package/dist/commands/pull-v3/components/mcp-tool-generator.js +5 -5
- package/dist/commands/pull-v3/components/project-generator.js +4 -4
- package/dist/commands/pull-v3/components/status-component-generator.js +6 -6
- package/dist/commands/pull-v3/components/trigger-generator.js +114 -0
- package/dist/commands/pull-v3/index.js +25 -30
- package/dist/commands/pull-v3/introspect-generator.js +15 -7
- package/dist/commands/pull-v3/llm-content-merger.js +1 -1
- package/dist/commands/pull-v3/new-component-generator.js +5 -16
- package/dist/commands/pull-v3/project-comparator.js +49 -49
- package/dist/commands/pull-v3/project-validator.js +5 -4
- package/dist/commands/pull-v3/targeted-typescript-placeholders.js +2 -2
- package/dist/commands/pull-v3/utils/component-registry.js +9 -7
- package/dist/commands/pull-v3/utils/component-tracker.js +1 -1
- package/dist/commands/pull-v3/utils/generator-utils.js +2 -2
- package/dist/commands/push.js +9 -9
- package/dist/commands/status.js +4 -8
- package/dist/index.js +2 -2
- package/dist/utils/ci-environment.js +4 -6
- package/dist/utils/cli-pipeline.js +8 -12
- package/dist/utils/config.js +17 -25
- package/dist/utils/json-comparison.js +3 -3
- package/dist/utils/profile-config.js +4 -6
- package/dist/utils/profiles/index.js +2 -2
- package/dist/utils/profiles/profile-manager.js +1 -1
- package/dist/utils/profiles/types.js +21 -7
- package/dist/utils/templates.js +3 -5
- package/package.json +8 -7
package/README.md
CHANGED
|
@@ -77,8 +77,7 @@ inkeep init
|
|
|
77
77
|
# export default defineConfig({
|
|
78
78
|
# tenantId: "your-tenant-id",
|
|
79
79
|
# projectId: "your-project-id",
|
|
80
|
-
#
|
|
81
|
-
# agentsRunApiUrl: "http://localhost:3003"
|
|
80
|
+
# agentsApiUrl: "http://localhost:3002",
|
|
82
81
|
# });
|
|
83
82
|
```
|
|
84
83
|
|
|
@@ -86,10 +85,10 @@ inkeep init
|
|
|
86
85
|
|
|
87
86
|
### Configuration Sources (priority order)
|
|
88
87
|
|
|
89
|
-
1. **Command-line flags** - Highest priority (e.g., `--tenant-id`, `--agents-
|
|
88
|
+
1. **Command-line flags** - Highest priority (e.g., `--tenant-id`, `--agents-api-url`, `--config`)
|
|
90
89
|
2. **Config file** - `inkeep.config.ts` (or file specified with `--config`)
|
|
91
|
-
3. **Environment variables** - `
|
|
92
|
-
4. **Defaults** - Lowest priority (defaults to `http://localhost:3002`
|
|
90
|
+
3. **Environment variables** - `INKEEP_AGENTS_API_URL`
|
|
91
|
+
4. **Defaults** - Lowest priority (defaults to `http://localhost:3002`)
|
|
93
92
|
|
|
94
93
|
### Config File Options
|
|
95
94
|
|
|
@@ -108,15 +107,13 @@ inkeep list-graphs --project my-project --config-file-path ./staging-config.ts
|
|
|
108
107
|
Create a `.env` file in your project directory:
|
|
109
108
|
|
|
110
109
|
```bash
|
|
111
|
-
|
|
112
|
-
INKEEP_AGENTS_RUN_API_URL=http://localhost:3003
|
|
110
|
+
INKEEP_AGENTS_API_URL=http://localhost:3002
|
|
113
111
|
```
|
|
114
112
|
|
|
115
113
|
Or export them in your shell:
|
|
116
114
|
|
|
117
115
|
```bash
|
|
118
|
-
export
|
|
119
|
-
export INKEEP_AGENTS_RUN_API_URL=http://localhost:3003
|
|
116
|
+
export INKEEP_AGENTS_API_URL=http://localhost:3002
|
|
120
117
|
```
|
|
121
118
|
|
|
122
119
|
## Commands
|
|
@@ -251,7 +248,7 @@ List all available graphs for a specific project.
|
|
|
251
248
|
inkeep list-graphs --project my-project-id
|
|
252
249
|
|
|
253
250
|
# With custom API URL
|
|
254
|
-
inkeep list-graphs --project my-project-id --
|
|
251
|
+
inkeep list-graphs --project my-project-id --agent-api-url http://api.example.com:3002
|
|
255
252
|
|
|
256
253
|
# With custom tenant ID
|
|
257
254
|
inkeep list-graphs --project my-project-id --tenant-id my-tenant-id
|
|
@@ -286,7 +283,7 @@ inkeep push --project my-project-id
|
|
|
286
283
|
inkeep push --project my-project-id --config ./my-config.ts
|
|
287
284
|
|
|
288
285
|
# With custom API URLs
|
|
289
|
-
inkeep push --project my-project-id --agents-
|
|
286
|
+
inkeep push --project my-project-id --agents-api-url http://api.example.com
|
|
290
287
|
|
|
291
288
|
# With custom tenant ID
|
|
292
289
|
inkeep push --project my-project-id --tenant-id my-tenant-id
|
|
@@ -490,8 +487,7 @@ inkeep mcp stop --all
|
|
|
490
487
|
INKEEP_AGENTS_MANAGE_API_URL=http://localhost:3002 inkeep list-graphs
|
|
491
488
|
|
|
492
489
|
# Using .env file
|
|
493
|
-
echo "
|
|
494
|
-
echo "INKEEP_AGENTS_RUN_API_URL=http://localhost:3003" >> .env
|
|
490
|
+
echo "INKEEP_AGENTS_API_URL=http://localhost:3002" > .env
|
|
495
491
|
```
|
|
496
492
|
|
|
497
493
|
### Staging
|
|
@@ -499,16 +495,14 @@ echo "INKEEP_AGENTS_RUN_API_URL=http://localhost:3003" >> .env
|
|
|
499
495
|
```bash
|
|
500
496
|
# Set in config file
|
|
501
497
|
# Edit your inkeep.config.ts:
|
|
502
|
-
#
|
|
503
|
-
# agentsRunApiUrl: 'https://staging-run-api.example.com'
|
|
498
|
+
# agentsApiUrl: 'https://staging-api.example.com'
|
|
504
499
|
```
|
|
505
500
|
|
|
506
501
|
### Production
|
|
507
502
|
|
|
508
503
|
```bash
|
|
509
504
|
# Using environment variables
|
|
510
|
-
export
|
|
511
|
-
export INKEEP_AGENTS_RUN_API_URL=https://run-api.example.com
|
|
505
|
+
export INKEEP_AGENTS_API_URL=https://inkeep-api.example.com
|
|
512
506
|
inkeep list-graphs
|
|
513
507
|
```
|
|
514
508
|
|
|
@@ -577,11 +571,10 @@ agents-cli/
|
|
|
577
571
|
curl http://localhost:3002/health
|
|
578
572
|
|
|
579
573
|
# Verify API URLs
|
|
580
|
-
echo $
|
|
581
|
-
echo $INKEEP_AGENTS_RUN_API_URL
|
|
574
|
+
echo $INKEEP_AGENTS_API_URL
|
|
582
575
|
|
|
583
576
|
# Try with explicit URL and project
|
|
584
|
-
inkeep list-graphs --project my-project-id --agents-
|
|
577
|
+
inkeep list-graphs --project my-project-id --agents-api-url http://localhost:3002
|
|
585
578
|
```
|
|
586
579
|
|
|
587
580
|
**Command not found: inkeep**
|
package/dist/api.js
CHANGED
|
@@ -51,13 +51,13 @@ var ManagementApiClient = class ManagementApiClient extends BaseApiClient {
|
|
|
51
51
|
static async create(apiUrl, configPath, tenantIdOverride, projectIdOverride, isCI, apiKeyOverride) {
|
|
52
52
|
const { validateConfiguration } = await import("./utils/config.js");
|
|
53
53
|
const config = await validateConfiguration(configPath);
|
|
54
|
-
return new ManagementApiClient(apiUrl || config.
|
|
54
|
+
return new ManagementApiClient(apiUrl || config.agentsApiUrl, tenantIdOverride || config.tenantId, projectIdOverride || "", apiKeyOverride || config.agentsApiKey, isCI ?? false);
|
|
55
55
|
}
|
|
56
56
|
async listAgents() {
|
|
57
57
|
const tenantId = this.checkTenantId();
|
|
58
58
|
const projectId = this.getProjectId();
|
|
59
|
-
const response = await this.authenticatedFetch(`${this.apiUrl}/tenants/${tenantId}/projects/${projectId}/agents?limit=100`, { method: "GET" });
|
|
60
|
-
if (!response.ok) throw new Error(`Failed to list agents: ${response.statusText}. ${this.apiUrl}/tenants/${tenantId}/projects/${projectId}/agents`);
|
|
59
|
+
const response = await this.authenticatedFetch(`${this.apiUrl}/manage/tenants/${tenantId}/projects/${projectId}/agents?limit=100`, { method: "GET" });
|
|
60
|
+
if (!response.ok) throw new Error(`Failed to list agents: ${response.statusText}. ${this.apiUrl}/manage/tenants/${tenantId}/projects/${projectId}/agents`);
|
|
61
61
|
return (await response.json()).data || [];
|
|
62
62
|
}
|
|
63
63
|
async getAgent(agentId) {
|
|
@@ -68,7 +68,7 @@ var ManagementApiClient = class ManagementApiClient extends BaseApiClient {
|
|
|
68
68
|
const projectId = this.getProjectId();
|
|
69
69
|
const agentId = agentDefinition.id;
|
|
70
70
|
if (!agentId) throw new Error("Agent must have an id property");
|
|
71
|
-
const response = await this.authenticatedFetch(`${this.apiUrl}/tenants/${tenantId}/projects/${projectId}/agents/${agentId}`, {
|
|
71
|
+
const response = await this.authenticatedFetch(`${this.apiUrl}/manage/tenants/${tenantId}/projects/${projectId}/agents/${agentId}`, {
|
|
72
72
|
method: "PUT",
|
|
73
73
|
body: JSON.stringify({
|
|
74
74
|
...agentDefinition,
|
|
@@ -83,7 +83,7 @@ var ManagementApiClient = class ManagementApiClient extends BaseApiClient {
|
|
|
83
83
|
}
|
|
84
84
|
async getFullProject(projectId) {
|
|
85
85
|
const tenantId = this.checkTenantId();
|
|
86
|
-
const response = await this.authenticatedFetch(`${this.apiUrl}/tenants/${tenantId}/project-full/${projectId}`, { method: "GET" });
|
|
86
|
+
const response = await this.authenticatedFetch(`${this.apiUrl}/manage/tenants/${tenantId}/project-full/${projectId}`, { method: "GET" });
|
|
87
87
|
if (!response.ok) {
|
|
88
88
|
if (response.status === 404) throw new Error(`Project "${projectId}" not found`);
|
|
89
89
|
if (response.status === 401 || response.status === 403) {
|
|
@@ -109,7 +109,7 @@ var ManagementApiClient = class ManagementApiClient extends BaseApiClient {
|
|
|
109
109
|
*/
|
|
110
110
|
async listProjects(page = 1, limit = 100) {
|
|
111
111
|
const tenantId = this.checkTenantId();
|
|
112
|
-
const response = await this.authenticatedFetch(`${this.apiUrl}/tenants/${tenantId}/projects?page=${page}&limit=${limit}`, { method: "GET" });
|
|
112
|
+
const response = await this.authenticatedFetch(`${this.apiUrl}/manage/tenants/${tenantId}/projects?page=${page}&limit=${limit}`, { method: "GET" });
|
|
113
113
|
if (!response.ok) {
|
|
114
114
|
if (response.status === 401 || response.status === 403) {
|
|
115
115
|
const errorText$1 = await response.text().catch(() => "");
|
|
@@ -149,10 +149,10 @@ var ExecutionApiClient = class ExecutionApiClient extends BaseApiClient {
|
|
|
149
149
|
static async create(apiUrl, configPath, tenantIdOverride, projectIdOverride, isCI) {
|
|
150
150
|
const { validateConfiguration } = await import("./utils/config.js");
|
|
151
151
|
const config = await validateConfiguration(configPath);
|
|
152
|
-
return new ExecutionApiClient(apiUrl || config.
|
|
152
|
+
return new ExecutionApiClient(apiUrl || config.agentsApiUrl, tenantIdOverride || config.tenantId, projectIdOverride || "", config.agentsApiKey, isCI ?? false);
|
|
153
153
|
}
|
|
154
154
|
async chatCompletion(agentId, messages, conversationId, emitOperations) {
|
|
155
|
-
const response = await this.authenticatedFetch(`${this.apiUrl}/v1/chat/completions`, {
|
|
155
|
+
const response = await this.authenticatedFetch(`${this.apiUrl}/run/v1/chat/completions`, {
|
|
156
156
|
method: "POST",
|
|
157
157
|
headers: {
|
|
158
158
|
Accept: "text/event-stream",
|
package/dist/commands/init.js
CHANGED
|
@@ -56,7 +56,7 @@ async function cloudInitCommand(options) {
|
|
|
56
56
|
const { available: keychainAvailable } = await checkKeychainAvailability();
|
|
57
57
|
if (keychainAvailable) try {
|
|
58
58
|
const existingCreds = await loadCredentials("inkeep-cloud");
|
|
59
|
-
if (existingCreds
|
|
59
|
+
if (existingCreds?.accessToken && existingCreds.organizationId) {
|
|
60
60
|
credentials = {
|
|
61
61
|
accessToken: existingCreds.accessToken,
|
|
62
62
|
organizationId: existingCreds.organizationId,
|
|
@@ -72,7 +72,7 @@ async function cloudInitCommand(options) {
|
|
|
72
72
|
console.log();
|
|
73
73
|
await loginCommand({});
|
|
74
74
|
const newCreds = await loadCredentials("inkeep-cloud");
|
|
75
|
-
if (newCreds
|
|
75
|
+
if (newCreds?.accessToken && newCreds.organizationId) {
|
|
76
76
|
credentials = {
|
|
77
77
|
accessToken: newCreds.accessToken,
|
|
78
78
|
organizationId: newCreds.organizationId,
|
|
@@ -88,7 +88,7 @@ async function cloudInitCommand(options) {
|
|
|
88
88
|
let selectedTenantId;
|
|
89
89
|
let selectedTenantName;
|
|
90
90
|
try {
|
|
91
|
-
const response = await fetch("https://
|
|
91
|
+
const response = await fetch("https://agents-api.inkeep.com/api/cli/me", { headers: { Authorization: `Bearer ${credentials?.accessToken}` } });
|
|
92
92
|
if (!response.ok) {
|
|
93
93
|
s.stop("Failed to fetch organizations");
|
|
94
94
|
console.error(chalk.red("Could not fetch your organizations. Please try logging in again."));
|
|
@@ -98,7 +98,7 @@ async function cloudInitCommand(options) {
|
|
|
98
98
|
selectedTenantId = data.organization.id;
|
|
99
99
|
selectedTenantName = data.organization.name;
|
|
100
100
|
s.stop(`Organization: ${chalk.cyan(selectedTenantName)}`);
|
|
101
|
-
} catch
|
|
101
|
+
} catch {
|
|
102
102
|
s.stop("Failed to fetch organizations");
|
|
103
103
|
console.error(chalk.red("Network error. Please check your connection."));
|
|
104
104
|
process.exit(1);
|
|
@@ -106,7 +106,7 @@ async function cloudInitCommand(options) {
|
|
|
106
106
|
s.start(`Fetching projects for ${selectedTenantName}...`);
|
|
107
107
|
let projects = [];
|
|
108
108
|
try {
|
|
109
|
-
const response = await fetch(`https://
|
|
109
|
+
const response = await fetch(`https://agents-api.inkeep.com/manage/tenants/${selectedTenantId}/projects?limit=100`, { headers: { Authorization: `Bearer ${credentials?.accessToken}` } });
|
|
110
110
|
if (!response.ok) {
|
|
111
111
|
s.stop("Failed to fetch projects");
|
|
112
112
|
console.error(chalk.red("Could not fetch projects."));
|
|
@@ -114,7 +114,7 @@ async function cloudInitCommand(options) {
|
|
|
114
114
|
}
|
|
115
115
|
projects = (await response.json()).data || [];
|
|
116
116
|
s.stop(`Found ${projects.length} project(s)`);
|
|
117
|
-
} catch
|
|
117
|
+
} catch {
|
|
118
118
|
s.stop("Failed to fetch projects");
|
|
119
119
|
console.error(chalk.red("Network error. Please check your connection."));
|
|
120
120
|
process.exit(1);
|
|
@@ -230,6 +230,10 @@ async function localInitCommand(options) {
|
|
|
230
230
|
}
|
|
231
231
|
}
|
|
232
232
|
if (existsSync(configPath)) {
|
|
233
|
+
if (options?.interactive === false) {
|
|
234
|
+
console.log(chalk.yellow(`Config file already exists at ${configPath}, skipping creation.`));
|
|
235
|
+
return;
|
|
236
|
+
}
|
|
233
237
|
const overwrite = await p.confirm({
|
|
234
238
|
message: `${basename(configPath)} already exists. Overwrite?`,
|
|
235
239
|
initialValue: false
|
|
@@ -243,62 +247,87 @@ async function localInitCommand(options) {
|
|
|
243
247
|
return;
|
|
244
248
|
}
|
|
245
249
|
}
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
+
let tenantId;
|
|
251
|
+
let apiUrl;
|
|
252
|
+
if (options?.interactive === false) {
|
|
253
|
+
tenantId = "default";
|
|
254
|
+
apiUrl = "http://localhost:3002";
|
|
255
|
+
} else {
|
|
256
|
+
const tenantIdInput = await p.text({
|
|
257
|
+
message: "Enter your tenant ID:",
|
|
258
|
+
validate: (input) => {
|
|
259
|
+
if (!input || input.trim() === "") return "Tenant ID is required";
|
|
260
|
+
}
|
|
261
|
+
});
|
|
262
|
+
if (p.isCancel(tenantIdInput)) {
|
|
263
|
+
p.cancel("Operation cancelled");
|
|
264
|
+
process.exit(0);
|
|
250
265
|
}
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
if (input && input.trim() !== "") {
|
|
259
|
-
new URL(input);
|
|
266
|
+
tenantId = tenantIdInput;
|
|
267
|
+
const validateUrl = (input) => {
|
|
268
|
+
try {
|
|
269
|
+
if (input && input.trim() !== "") {
|
|
270
|
+
new URL(input);
|
|
271
|
+
return;
|
|
272
|
+
}
|
|
260
273
|
return;
|
|
274
|
+
} catch {
|
|
275
|
+
return "Please enter a valid URL";
|
|
261
276
|
}
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
277
|
+
};
|
|
278
|
+
const apiUrlInput = await p.text({
|
|
279
|
+
message: "Enter the Agents API URL:",
|
|
280
|
+
placeholder: "http://localhost:3002",
|
|
281
|
+
initialValue: "http://localhost:3002",
|
|
282
|
+
validate: validateUrl
|
|
283
|
+
});
|
|
284
|
+
if (p.isCancel(apiUrlInput)) {
|
|
285
|
+
p.cancel("Operation cancelled");
|
|
286
|
+
process.exit(0);
|
|
265
287
|
}
|
|
266
|
-
|
|
267
|
-
const manageApiUrl = await p.text({
|
|
268
|
-
message: "Enter the Management API URL:",
|
|
269
|
-
placeholder: "http://localhost:3002",
|
|
270
|
-
initialValue: "http://localhost:3002",
|
|
271
|
-
validate: validateUrl
|
|
272
|
-
});
|
|
273
|
-
if (p.isCancel(manageApiUrl)) {
|
|
274
|
-
p.cancel("Operation cancelled");
|
|
275
|
-
process.exit(0);
|
|
276
|
-
}
|
|
277
|
-
const runApiUrl = await p.text({
|
|
278
|
-
message: "Enter the Run API URL:",
|
|
279
|
-
placeholder: "http://localhost:3003",
|
|
280
|
-
initialValue: "http://localhost:3003",
|
|
281
|
-
validate: validateUrl
|
|
282
|
-
});
|
|
283
|
-
if (p.isCancel(runApiUrl)) {
|
|
284
|
-
p.cancel("Operation cancelled");
|
|
285
|
-
process.exit(0);
|
|
288
|
+
apiUrl = apiUrlInput;
|
|
286
289
|
}
|
|
287
290
|
const configContent = `import { defineConfig } from '@inkeep/agents-cli/config';
|
|
288
291
|
|
|
289
292
|
export default defineConfig({
|
|
290
293
|
tenantId: '${tenantId}',
|
|
291
|
-
|
|
292
|
-
url: '${
|
|
293
|
-
}
|
|
294
|
-
agentsRunApi: {
|
|
295
|
-
url: '${runApiUrl}',
|
|
296
|
-
},
|
|
294
|
+
agentsApi: {
|
|
295
|
+
url: '${apiUrl}',
|
|
296
|
+
}
|
|
297
297
|
});
|
|
298
298
|
`;
|
|
299
299
|
try {
|
|
300
300
|
writeFileSync(configPath, configContent);
|
|
301
301
|
console.log(chalk.green("✓"), `Created ${chalk.cyan(configPath)}`);
|
|
302
|
+
try {
|
|
303
|
+
const profileManager = new ProfileManager();
|
|
304
|
+
const localProfile = {
|
|
305
|
+
remote: {
|
|
306
|
+
api: apiUrl,
|
|
307
|
+
manageUi: "http://localhost:3001"
|
|
308
|
+
},
|
|
309
|
+
credential: "none",
|
|
310
|
+
environment: "development"
|
|
311
|
+
};
|
|
312
|
+
if (profileManager.profilesFileExists()) if (profileManager.loadProfiles().profiles.local) {
|
|
313
|
+
profileManager.setActiveProfile("local");
|
|
314
|
+
console.log(chalk.green("✓"), "Set local profile as active");
|
|
315
|
+
} else {
|
|
316
|
+
profileManager.addProfile("local", localProfile);
|
|
317
|
+
profileManager.setActiveProfile("local");
|
|
318
|
+
console.log(chalk.green("✓"), "Created and activated local profile");
|
|
319
|
+
}
|
|
320
|
+
else {
|
|
321
|
+
const profilesConfig = {
|
|
322
|
+
activeProfile: "local",
|
|
323
|
+
profiles: { local: localProfile }
|
|
324
|
+
};
|
|
325
|
+
profileManager.saveProfiles(profilesConfig);
|
|
326
|
+
console.log(chalk.green("✓"), "Created local profile");
|
|
327
|
+
}
|
|
328
|
+
} catch (profileError) {
|
|
329
|
+
console.log(chalk.yellow("⚠"), "Could not set up local profile:", profileError instanceof Error ? profileError.message : String(profileError));
|
|
330
|
+
}
|
|
302
331
|
console.log(chalk.gray("\nYou can now use the Inkeep CLI commands."));
|
|
303
332
|
const configDir = dirname(configPath);
|
|
304
333
|
if (configDir !== process.cwd()) {
|
|
@@ -319,11 +348,8 @@ function generateConfigFile(tenantId, projectId) {
|
|
|
319
348
|
export default defineConfig({
|
|
320
349
|
tenantId: '${tenantId}',
|
|
321
350
|
projectId: '${projectId}',
|
|
322
|
-
|
|
323
|
-
url: 'https://
|
|
324
|
-
},
|
|
325
|
-
agentsRunApi: {
|
|
326
|
-
url: 'https://run-api.inkeep.com',
|
|
351
|
+
agentsApi: {
|
|
352
|
+
url: 'https://agents-api.inkeep.com',
|
|
327
353
|
},
|
|
328
354
|
});
|
|
329
355
|
`;
|
|
@@ -13,7 +13,7 @@ async function listAgentsCommand(options) {
|
|
|
13
13
|
logConfig: true
|
|
14
14
|
});
|
|
15
15
|
console.log();
|
|
16
|
-
const api = await ManagementApiClient.create(config.
|
|
16
|
+
const api = await ManagementApiClient.create(config.agentsApiUrl, configPath, config.tenantId, options.project);
|
|
17
17
|
const s = p.spinner();
|
|
18
18
|
s.start("Fetching agent...");
|
|
19
19
|
try {
|
package/dist/commands/login.js
CHANGED
|
@@ -83,19 +83,19 @@ async function loginCommand(options = {}) {
|
|
|
83
83
|
}
|
|
84
84
|
profileName = options.profile;
|
|
85
85
|
credentialKey = profile.credential;
|
|
86
|
-
manageApiUrl = profile.remote.
|
|
86
|
+
manageApiUrl = profile.remote.api;
|
|
87
87
|
manageUiUrl = profile.remote.manageUi;
|
|
88
88
|
} else {
|
|
89
89
|
const activeProfile = profileManager.getActiveProfile();
|
|
90
90
|
profileName = activeProfile.name;
|
|
91
91
|
credentialKey = activeProfile.credential;
|
|
92
|
-
manageApiUrl = activeProfile.remote.
|
|
92
|
+
manageApiUrl = activeProfile.remote.api;
|
|
93
93
|
manageUiUrl = activeProfile.remote.manageUi;
|
|
94
94
|
}
|
|
95
95
|
} catch {
|
|
96
96
|
profileName = "default";
|
|
97
97
|
credentialKey = "inkeep-cloud";
|
|
98
|
-
manageApiUrl = "https://
|
|
98
|
+
manageApiUrl = "https://agents-api.inkeep.com";
|
|
99
99
|
manageUiUrl = "https://manage.inkeep.com";
|
|
100
100
|
}
|
|
101
101
|
console.log(chalk.gray(`Using profile: ${profileName}`));
|
package/dist/commands/profile.js
CHANGED
|
@@ -22,7 +22,7 @@ async function profileListCommand() {
|
|
|
22
22
|
const marker = isActive ? chalk.green("* ") : " ";
|
|
23
23
|
const name = isActive ? chalk.green.bold(profile.name) : profile.name;
|
|
24
24
|
console.log(`${marker}${name}`);
|
|
25
|
-
console.log(chalk.gray(` Remote: ${profile.remote.
|
|
25
|
+
console.log(chalk.gray(` Remote: ${profile.remote.api}`));
|
|
26
26
|
console.log(chalk.gray(` Environment: ${profile.environment}`));
|
|
27
27
|
console.log(chalk.gray(` Credential: ${profile.credential}`));
|
|
28
28
|
console.log();
|
|
@@ -75,8 +75,8 @@ async function profileAddCommand(name) {
|
|
|
75
75
|
let remote;
|
|
76
76
|
if (remoteType === "cloud") remote = "cloud";
|
|
77
77
|
else {
|
|
78
|
-
const
|
|
79
|
-
message: "
|
|
78
|
+
const api = await p.text({
|
|
79
|
+
message: "Agents API URL:",
|
|
80
80
|
placeholder: "http://localhost:3002",
|
|
81
81
|
initialValue: "http://localhost:3002",
|
|
82
82
|
validate: (value) => {
|
|
@@ -88,7 +88,7 @@ async function profileAddCommand(name) {
|
|
|
88
88
|
}
|
|
89
89
|
}
|
|
90
90
|
});
|
|
91
|
-
if (p.isCancel(
|
|
91
|
+
if (p.isCancel(api)) {
|
|
92
92
|
p.cancel("Profile creation cancelled");
|
|
93
93
|
process.exit(0);
|
|
94
94
|
}
|
|
@@ -109,27 +109,9 @@ async function profileAddCommand(name) {
|
|
|
109
109
|
p.cancel("Profile creation cancelled");
|
|
110
110
|
process.exit(0);
|
|
111
111
|
}
|
|
112
|
-
const runApi = await p.text({
|
|
113
|
-
message: "Run API URL:",
|
|
114
|
-
placeholder: "http://localhost:3003",
|
|
115
|
-
initialValue: "http://localhost:3003",
|
|
116
|
-
validate: (value) => {
|
|
117
|
-
try {
|
|
118
|
-
new URL(value);
|
|
119
|
-
return;
|
|
120
|
-
} catch {
|
|
121
|
-
return "Invalid URL format";
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
});
|
|
125
|
-
if (p.isCancel(runApi)) {
|
|
126
|
-
p.cancel("Profile creation cancelled");
|
|
127
|
-
process.exit(0);
|
|
128
|
-
}
|
|
129
112
|
remote = {
|
|
130
|
-
|
|
131
|
-
manageUi
|
|
132
|
-
runApi
|
|
113
|
+
api,
|
|
114
|
+
manageUi
|
|
133
115
|
};
|
|
134
116
|
}
|
|
135
117
|
const environment = await p.text({
|
|
@@ -208,9 +190,8 @@ async function profileCurrentCommand() {
|
|
|
208
190
|
console.log(chalk.cyan(` Name: ${profile.name}`));
|
|
209
191
|
console.log();
|
|
210
192
|
console.log(chalk.gray(" Remote URLs:"));
|
|
211
|
-
console.log(`
|
|
193
|
+
console.log(` Agents API: ${profile.remote.api}`);
|
|
212
194
|
console.log(` Manage UI: ${profile.remote.manageUi}`);
|
|
213
|
-
console.log(` Run API: ${profile.remote.runApi}`);
|
|
214
195
|
console.log();
|
|
215
196
|
console.log(` Environment: ${profile.environment}`);
|
|
216
197
|
console.log(` Credential: ${profile.credential}`);
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { ComponentRegistry } from "./utils/component-registry.js";
|
|
2
2
|
import { existsSync, readFileSync, readdirSync, statSync } from "node:fs";
|
|
3
3
|
import { extname, join, relative } from "node:path";
|
|
4
|
-
import chalk from "chalk";
|
|
5
4
|
import { Node, Project } from "ts-morph";
|
|
6
5
|
|
|
7
6
|
//#region src/commands/pull-v3/component-parser.ts
|
|
@@ -285,7 +284,6 @@ function buildComponentRegistryFromParsing(projectRoot, debug = false) {
|
|
|
285
284
|
else stats.exported++;
|
|
286
285
|
stats.byType[component.type] = (stats.byType[component.type] || 0) + 1;
|
|
287
286
|
}
|
|
288
|
-
stats.exported + stats.inline;
|
|
289
287
|
return registry;
|
|
290
288
|
}
|
|
291
289
|
/**
|