@inkeep/agents-cli 0.41.2 → 0.43.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 +19 -39
- package/dist/commands/list-agents.js +1 -1
- package/dist/commands/login.js +4 -4
- 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 +185 -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/profile-manager.js +1 -1
- package/dist/utils/profiles/types.js +6 -9
- package/dist/utils/templates.js +3 -5
- package/package.json +7 -8
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://api.pilot.inkeep.com/manage/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);
|
|
@@ -248,12 +248,10 @@ async function localInitCommand(options) {
|
|
|
248
248
|
}
|
|
249
249
|
}
|
|
250
250
|
let tenantId;
|
|
251
|
-
let
|
|
252
|
-
let runApiUrl;
|
|
251
|
+
let apiUrl;
|
|
253
252
|
if (options?.interactive === false) {
|
|
254
253
|
tenantId = "default";
|
|
255
|
-
|
|
256
|
-
runApiUrl = "http://localhost:3003";
|
|
254
|
+
apiUrl = "http://localhost:3002";
|
|
257
255
|
} else {
|
|
258
256
|
const tenantIdInput = await p.text({
|
|
259
257
|
message: "Enter your tenant ID:",
|
|
@@ -277,39 +275,25 @@ async function localInitCommand(options) {
|
|
|
277
275
|
return "Please enter a valid URL";
|
|
278
276
|
}
|
|
279
277
|
};
|
|
280
|
-
const
|
|
281
|
-
message: "Enter the
|
|
278
|
+
const apiUrlInput = await p.text({
|
|
279
|
+
message: "Enter the Agents API URL:",
|
|
282
280
|
placeholder: "http://localhost:3002",
|
|
283
281
|
initialValue: "http://localhost:3002",
|
|
284
282
|
validate: validateUrl
|
|
285
283
|
});
|
|
286
|
-
if (p.isCancel(
|
|
287
|
-
p.cancel("Operation cancelled");
|
|
288
|
-
process.exit(0);
|
|
289
|
-
}
|
|
290
|
-
manageApiUrl = manageApiUrlInput;
|
|
291
|
-
const runApiUrlInput = await p.text({
|
|
292
|
-
message: "Enter the Run API URL:",
|
|
293
|
-
placeholder: "http://localhost:3003",
|
|
294
|
-
initialValue: "http://localhost:3003",
|
|
295
|
-
validate: validateUrl
|
|
296
|
-
});
|
|
297
|
-
if (p.isCancel(runApiUrlInput)) {
|
|
284
|
+
if (p.isCancel(apiUrlInput)) {
|
|
298
285
|
p.cancel("Operation cancelled");
|
|
299
286
|
process.exit(0);
|
|
300
287
|
}
|
|
301
|
-
|
|
288
|
+
apiUrl = apiUrlInput;
|
|
302
289
|
}
|
|
303
290
|
const configContent = `import { defineConfig } from '@inkeep/agents-cli/config';
|
|
304
291
|
|
|
305
292
|
export default defineConfig({
|
|
306
293
|
tenantId: '${tenantId}',
|
|
307
|
-
|
|
308
|
-
url: '${
|
|
309
|
-
}
|
|
310
|
-
agentsRunApi: {
|
|
311
|
-
url: '${runApiUrl}',
|
|
312
|
-
},
|
|
294
|
+
agentsApi: {
|
|
295
|
+
url: '${apiUrl}',
|
|
296
|
+
}
|
|
313
297
|
});
|
|
314
298
|
`;
|
|
315
299
|
try {
|
|
@@ -319,9 +303,8 @@ export default defineConfig({
|
|
|
319
303
|
const profileManager = new ProfileManager();
|
|
320
304
|
const localProfile = {
|
|
321
305
|
remote: {
|
|
322
|
-
|
|
323
|
-
manageUi: "http://localhost:3001"
|
|
324
|
-
runApi: runApiUrl
|
|
306
|
+
api: apiUrl,
|
|
307
|
+
manageUi: "http://localhost:3001"
|
|
325
308
|
},
|
|
326
309
|
credential: "none",
|
|
327
310
|
environment: "development"
|
|
@@ -365,11 +348,8 @@ function generateConfigFile(tenantId, projectId) {
|
|
|
365
348
|
export default defineConfig({
|
|
366
349
|
tenantId: '${tenantId}',
|
|
367
350
|
projectId: '${projectId}',
|
|
368
|
-
|
|
369
|
-
url: 'https://
|
|
370
|
-
},
|
|
371
|
-
agentsRunApi: {
|
|
372
|
-
url: 'https://run-api.inkeep.com',
|
|
351
|
+
agentsApi: {
|
|
352
|
+
url: 'https://agents-api.inkeep.com',
|
|
373
353
|
},
|
|
374
354
|
});
|
|
375
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, void 0, config.agentsApiKey);
|
|
17
17
|
const s = p.spinner();
|
|
18
18
|
s.start("Fetching agent...");
|
|
19
19
|
try {
|
package/dist/commands/login.js
CHANGED
|
@@ -55,7 +55,7 @@ async function fetchUserInfo(cloudUrl, accessToken) {
|
|
|
55
55
|
if (!sessionResponse.ok) throw new Error("Failed to fetch user session");
|
|
56
56
|
const user = (await sessionResponse.json()).user;
|
|
57
57
|
if (!user) throw new Error("No user found in session");
|
|
58
|
-
const orgResponse = await fetch(`${cloudUrl}/api/cli/me`, { headers: { Authorization: `Bearer ${accessToken}` } });
|
|
58
|
+
const orgResponse = await fetch(`${cloudUrl}/manage/api/cli/me`, { headers: { Authorization: `Bearer ${accessToken}` } });
|
|
59
59
|
if (!orgResponse.ok) throw new Error("Failed to fetch organization info. Please ensure that you are a member of an organization.");
|
|
60
60
|
const orgData = await orgResponse.json();
|
|
61
61
|
return {
|
|
@@ -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
|
/**
|