@inkeep/agents-cli 0.0.0-dev-20260120222159 → 0.0.0-dev-20260121022749
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 +15 -35
- 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/components/trigger-generator.js +18 -5
- package/dist/commands/pull-v3/index.js +3 -3
- package/dist/commands/push.js +4 -4
- package/dist/commands/status.js +4 -8
- package/dist/index.js +2 -2
- package/dist/utils/ci-environment.js +3 -5
- package/dist/utils/cli-pipeline.js +8 -12
- package/dist/utils/config.js +14 -23
- package/dist/utils/profile-config.js +3 -5
- package/dist/utils/profiles/types.js +6 -9
- package/package.json +4 -4
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
|
@@ -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."));
|
|
@@ -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."));
|
|
@@ -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(
|
|
284
|
+
if (p.isCancel(apiUrlInput)) {
|
|
287
285
|
p.cancel("Operation cancelled");
|
|
288
286
|
process.exit(0);
|
|
289
287
|
}
|
|
290
|
-
|
|
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)) {
|
|
298
|
-
p.cancel("Operation cancelled");
|
|
299
|
-
process.exit(0);
|
|
300
|
-
}
|
|
301
|
-
runApiUrl = runApiUrlInput;
|
|
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);
|
|
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}`);
|
|
@@ -9,17 +9,30 @@ import { DEFAULT_STYLE, formatString, generateFileContent, generateImport, toCam
|
|
|
9
9
|
*/
|
|
10
10
|
/**
|
|
11
11
|
* Format authentication configuration
|
|
12
|
+
* New format uses headers array: { headers: [{ name, valueHash, valuePrefix }] }
|
|
13
|
+
* We generate code that uses environment variables for the secret values
|
|
12
14
|
*/
|
|
13
15
|
function formatAuthentication(auth, style, indentLevel) {
|
|
14
16
|
if (!auth) return "";
|
|
15
|
-
const { indentation } = style;
|
|
17
|
+
const { indentation, quotes } = style;
|
|
18
|
+
const q = quotes === "single" ? "'" : "\"";
|
|
16
19
|
const indent = indentation.repeat(indentLevel);
|
|
17
20
|
const innerIndent = indentation.repeat(indentLevel + 1);
|
|
21
|
+
const headerIndent = indentation.repeat(indentLevel + 2);
|
|
18
22
|
const lines = [];
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
+
if (auth.headers && Array.isArray(auth.headers) && auth.headers.length > 0) {
|
|
24
|
+
lines.push(`${indent}authentication: {`);
|
|
25
|
+
lines.push(`${innerIndent}headers: [`);
|
|
26
|
+
for (const header of auth.headers) {
|
|
27
|
+
const envVarName = `TRIGGER_AUTH_${header.name.toUpperCase().replace(/[^A-Z0-9]/g, "_")}`;
|
|
28
|
+
lines.push(`${headerIndent}{`);
|
|
29
|
+
lines.push(`${headerIndent}${indentation}name: ${q}${header.name}${q},`);
|
|
30
|
+
lines.push(`${headerIndent}${indentation}value: process.env.${envVarName} || ${q}${q},`);
|
|
31
|
+
lines.push(`${headerIndent}},`);
|
|
32
|
+
}
|
|
33
|
+
lines.push(`${innerIndent}],`);
|
|
34
|
+
lines.push(`${indent}},`);
|
|
35
|
+
}
|
|
23
36
|
return lines.join("\n");
|
|
24
37
|
}
|
|
25
38
|
/**
|
|
@@ -188,7 +188,7 @@ async function pullV3Command(options) {
|
|
|
188
188
|
}
|
|
189
189
|
}
|
|
190
190
|
s.start(`Fetching project: ${projectId}`);
|
|
191
|
-
const remoteProject = await (await ManagementApiClient.create(config.
|
|
191
|
+
const remoteProject = await (await ManagementApiClient.create(config.agentsApiUrl, options.config, config.tenantId, projectId, isCI, config.agentsApiKey)).getFullProject(projectId);
|
|
192
192
|
if (options.debug && remoteProject.functions) {
|
|
193
193
|
console.log(chalk.gray(" 📋 Project-level functions from API:"), Object.keys(remoteProject.functions));
|
|
194
194
|
Object.entries(remoteProject.functions).forEach(([id, data]) => {
|
|
@@ -387,7 +387,7 @@ async function pullAllProjects(options) {
|
|
|
387
387
|
const s = p.spinner();
|
|
388
388
|
try {
|
|
389
389
|
s.start("Fetching project list from API...");
|
|
390
|
-
const projects = await (await ManagementApiClient.create(config.
|
|
390
|
+
const projects = await (await ManagementApiClient.create(config.agentsApiUrl, options.config, config.tenantId, void 0, isCI, config.agentsApiKey)).listAllProjects();
|
|
391
391
|
s.stop(`Found ${projects.length} project(s)`);
|
|
392
392
|
if (projects.length === 0) {
|
|
393
393
|
console.log(chalk.yellow("No projects found for this tenant."));
|
|
@@ -481,7 +481,7 @@ async function pullSingleProject(projectId, projectName, options, config, isCI)
|
|
|
481
481
|
if (originalLogLevel !== void 0) process.env.LOG_LEVEL = originalLogLevel;
|
|
482
482
|
else delete process.env.LOG_LEVEL;
|
|
483
483
|
};
|
|
484
|
-
const remoteProject = await (await ManagementApiClient.create(config.
|
|
484
|
+
const remoteProject = await (await ManagementApiClient.create(config.agentsApiUrl, options.config, config.tenantId, projectId, isCI, config.agentsApiKey)).getFullProject(projectId);
|
|
485
485
|
await introspectGenerate(remoteProject, createProjectStructure(targetDir), options.env || "development", false);
|
|
486
486
|
restoreLogLevel();
|
|
487
487
|
return {
|
package/dist/commands/push.js
CHANGED
|
@@ -63,7 +63,7 @@ async function pushCommand(options) {
|
|
|
63
63
|
const originalTenantId = process.env.INKEEP_TENANT_ID;
|
|
64
64
|
const originalApiUrl = process.env.INKEEP_API_URL;
|
|
65
65
|
process.env.INKEEP_TENANT_ID = config.tenantId;
|
|
66
|
-
process.env.INKEEP_API_URL = config.
|
|
66
|
+
process.env.INKEEP_API_URL = config.agentsApiUrl;
|
|
67
67
|
s.start("Loading project from index.ts...");
|
|
68
68
|
const project = await loadProject(projectDir);
|
|
69
69
|
if (originalTenantId !== void 0) process.env.INKEEP_TENANT_ID = originalTenantId;
|
|
@@ -71,7 +71,7 @@ async function pushCommand(options) {
|
|
|
71
71
|
if (originalApiUrl !== void 0) process.env.INKEEP_API_URL = originalApiUrl;
|
|
72
72
|
else delete process.env.INKEEP_API_URL;
|
|
73
73
|
s.stop("Project loaded successfully");
|
|
74
|
-
if (typeof project.setConfig === "function") project.setConfig(config.tenantId, config.
|
|
74
|
+
if (typeof project.setConfig === "function") project.setConfig(config.tenantId, config.agentsApiUrl, void 0, config.agentsApiKey);
|
|
75
75
|
if (options.env && typeof project.setCredentials === "function") {
|
|
76
76
|
s.start(`Loading credentials for environment '${options.env}'...`);
|
|
77
77
|
try {
|
|
@@ -295,13 +295,13 @@ async function pushSingleProject(projectDir, options) {
|
|
|
295
295
|
const originalTenantId = process.env.INKEEP_TENANT_ID;
|
|
296
296
|
const originalApiUrl = process.env.INKEEP_API_URL;
|
|
297
297
|
process.env.INKEEP_TENANT_ID = config.tenantId;
|
|
298
|
-
process.env.INKEEP_API_URL = config.
|
|
298
|
+
process.env.INKEEP_API_URL = config.agentsApiUrl;
|
|
299
299
|
const project = await loadProject(projectDir);
|
|
300
300
|
if (originalTenantId !== void 0) process.env.INKEEP_TENANT_ID = originalTenantId;
|
|
301
301
|
else delete process.env.INKEEP_TENANT_ID;
|
|
302
302
|
if (originalApiUrl !== void 0) process.env.INKEEP_API_URL = originalApiUrl;
|
|
303
303
|
else delete process.env.INKEEP_API_URL;
|
|
304
|
-
if (typeof project.setConfig === "function") project.setConfig(config.tenantId, config.
|
|
304
|
+
if (typeof project.setConfig === "function") project.setConfig(config.tenantId, config.agentsApiUrl, void 0, config.agentsApiKey);
|
|
305
305
|
if (options.env && typeof project.setCredentials === "function") {
|
|
306
306
|
const credentials = await loadEnvironmentCredentials(projectDir, options.env);
|
|
307
307
|
project.setCredentials(credentials);
|
package/dist/commands/status.js
CHANGED
|
@@ -8,9 +8,8 @@ async function statusCommand(options = {}) {
|
|
|
8
8
|
const profileManager = new ProfileManager();
|
|
9
9
|
let profileName;
|
|
10
10
|
let credentialKey;
|
|
11
|
-
let
|
|
11
|
+
let agentsApiUrl;
|
|
12
12
|
let manageUiUrl;
|
|
13
|
-
let runApiUrl;
|
|
14
13
|
let environment;
|
|
15
14
|
try {
|
|
16
15
|
if (options.profile) {
|
|
@@ -22,17 +21,15 @@ async function statusCommand(options = {}) {
|
|
|
22
21
|
}
|
|
23
22
|
profileName = options.profile;
|
|
24
23
|
credentialKey = profile.credential;
|
|
25
|
-
|
|
24
|
+
agentsApiUrl = profile.remote.api;
|
|
26
25
|
manageUiUrl = profile.remote.manageUi;
|
|
27
|
-
runApiUrl = profile.remote.runApi;
|
|
28
26
|
environment = profile.environment;
|
|
29
27
|
} else {
|
|
30
28
|
const activeProfile = profileManager.getActiveProfile();
|
|
31
29
|
profileName = activeProfile.name;
|
|
32
30
|
credentialKey = activeProfile.credential;
|
|
33
|
-
|
|
31
|
+
agentsApiUrl = activeProfile.remote.api;
|
|
34
32
|
manageUiUrl = activeProfile.remote.manageUi;
|
|
35
|
-
runApiUrl = activeProfile.remote.runApi;
|
|
36
33
|
environment = activeProfile.environment;
|
|
37
34
|
}
|
|
38
35
|
} catch {
|
|
@@ -77,9 +74,8 @@ async function statusCommand(options = {}) {
|
|
|
77
74
|
}
|
|
78
75
|
}
|
|
79
76
|
console.log(chalk.bold("Remote:"));
|
|
80
|
-
console.log(chalk.gray(`
|
|
77
|
+
console.log(chalk.gray(` Agents API: ${agentsApiUrl}`));
|
|
81
78
|
console.log(chalk.gray(` Manage UI: ${manageUiUrl}`));
|
|
82
|
-
console.log(chalk.gray(` Run API: ${runApiUrl}`));
|
|
83
79
|
console.log();
|
|
84
80
|
console.log(chalk.bold("Environment:"), environment);
|
|
85
81
|
console.log();
|
package/dist/index.js
CHANGED
|
@@ -47,13 +47,13 @@ configCommand.command("set <key> <value>").description("Set a configuration valu
|
|
|
47
47
|
configCommand.command("list").description("List all configuration values").option("--config <path>", "Path to configuration file").option("--config-file-path <path>", "Path to configuration file (deprecated, use --config)").action(async (options) => {
|
|
48
48
|
await configListCommand({ config: options.config || options.configFilePath });
|
|
49
49
|
});
|
|
50
|
-
program.command("push").description("Push a project configuration to the backend").option("--project <project-id>", "Project ID or path to project directory").option("--config <path>", "Path to configuration file").option("--profile <name>", "Profile to use for remote URLs and authentication").option("--tenant-id <id>", "Override tenant ID").option("--agents-
|
|
50
|
+
program.command("push").description("Push a project configuration to the backend").option("--project <project-id>", "Project ID or path to project directory").option("--config <path>", "Path to configuration file").option("--profile <name>", "Profile to use for remote URLs and authentication").option("--tenant-id <id>", "Override tenant ID").option("--agents-api-url <url>", "Override agents API URL").option("--env <environment>", "Environment to use for credential resolution (e.g., development, production)").option("--json", "Generate project data JSON file instead of pushing to backend").option("--all", "Push all projects found in current directory tree").option("--tag <tag>", "Use tagged config file (e.g., --tag prod loads prod.__inkeep.config.ts__)").option("--quiet", "Suppress profile/config logging").action(async (options) => {
|
|
51
51
|
await pushCommand(options);
|
|
52
52
|
});
|
|
53
53
|
program.command("pull").description("Pull project configuration with clean, efficient code generation").option("--project <project-id>", "Project ID to pull (or path to project directory). If in project directory, validates against local project ID.").option("--config <path>", "Path to configuration file").option("--profile <name>", "Profile to use for remote URLs and authentication").option("--env <environment>", "Environment file to generate (development, staging, production). Defaults to development").option("--json", "Output project data as JSON instead of generating files").option("--debug", "Enable debug logging").option("--verbose", "Enable verbose logging").option("--force", "Force regeneration even if no changes detected").option("--introspect", "Completely regenerate all files from scratch (no comparison needed)").option("--all", "Pull all projects for current tenant").option("--tag <tag>", "Use tagged config file (e.g., --tag prod loads prod.__inkeep.config.ts__)").option("--quiet", "Suppress profile/config logging").action(async (options) => {
|
|
54
54
|
await pullV3Command(options);
|
|
55
55
|
});
|
|
56
|
-
program.command("list-agent").description("List all available agents for a specific project").requiredOption("--project <project-id>", "Project ID to list agent for").option("--tenant-id <tenant-id>", "Tenant ID").option("--agents-
|
|
56
|
+
program.command("list-agent").description("List all available agents for a specific project").requiredOption("--project <project-id>", "Project ID to list agent for").option("--tenant-id <tenant-id>", "Tenant ID").option("--agents-api-url <url>", "Agents API URL").option("--config <path>", "Path to configuration file").option("--config-file-path <path>", "Path to configuration file (deprecated, use --config)").action(async (options) => {
|
|
57
57
|
const config = options.config || options.configFilePath;
|
|
58
58
|
await listAgentsCommand({
|
|
59
59
|
...options,
|
|
@@ -47,23 +47,21 @@ async function detectCIEnvironment() {
|
|
|
47
47
|
}
|
|
48
48
|
function loadCIEnvironmentConfig() {
|
|
49
49
|
const apiKey = process.env.INKEEP_API_KEY;
|
|
50
|
-
const
|
|
51
|
-
const runApiUrl = process.env.INKEEP_RUN_API_URL;
|
|
50
|
+
const agentsApiUrl = process.env.INKEEP_AGENTS_API_URL;
|
|
52
51
|
const environment = process.env.INKEEP_ENVIRONMENT || "production";
|
|
53
52
|
const tenantId = process.env.INKEEP_TENANT_ID;
|
|
54
53
|
if (!apiKey) return null;
|
|
55
54
|
return {
|
|
56
55
|
isCI: true,
|
|
57
56
|
apiKey,
|
|
58
|
-
|
|
59
|
-
runApiUrl: runApiUrl || "https://run-api.inkeep.com",
|
|
57
|
+
agentsApiUrl: agentsApiUrl || "https://agents-api.inkeep.com",
|
|
60
58
|
environment,
|
|
61
59
|
tenantId
|
|
62
60
|
};
|
|
63
61
|
}
|
|
64
62
|
function logCIConfig(config, reason) {
|
|
65
63
|
console.log(chalk.yellow(`CI mode detected (${reason})`));
|
|
66
|
-
console.log(chalk.gray(` Remote: ${config.
|
|
64
|
+
console.log(chalk.gray(` Remote: ${config.agentsApiUrl}`));
|
|
67
65
|
console.log(chalk.gray(` Environment: ${config.environment}`));
|
|
68
66
|
console.log(chalk.gray(` Auth: API key (INKEEP_API_KEY)`));
|
|
69
67
|
if (config.tenantId) console.log(chalk.gray(` Tenant: ${config.tenantId}`));
|
|
@@ -45,9 +45,8 @@ async function initializeCommand(options = {}) {
|
|
|
45
45
|
if (ciDetection.isCI) {
|
|
46
46
|
const config$1 = await validateConfiguration(configPath, tag);
|
|
47
47
|
if (ciConfig) {
|
|
48
|
-
if (ciConfig.
|
|
49
|
-
if (ciConfig.
|
|
50
|
-
if (ciConfig.apiKey) config$1.agentsManageApiKey = ciConfig.apiKey;
|
|
48
|
+
if (ciConfig.agentsApiUrl) config$1.agentsApiUrl = ciConfig.agentsApiUrl;
|
|
49
|
+
if (ciConfig.apiKey) config$1.agentsApiKey = ciConfig.apiKey;
|
|
51
50
|
if (ciConfig.tenantId) config$1.tenantId = ciConfig.tenantId;
|
|
52
51
|
}
|
|
53
52
|
if (s) s.stop("Configuration loaded");
|
|
@@ -55,7 +54,7 @@ async function initializeCommand(options = {}) {
|
|
|
55
54
|
else {
|
|
56
55
|
console.log(chalk.yellow(`CI mode detected (${ciDetection.reason})`));
|
|
57
56
|
console.log(chalk.gray(` Using config file settings (no INKEEP_API_KEY set)`));
|
|
58
|
-
console.log(chalk.gray(` Remote: ${config$1.
|
|
57
|
+
console.log(chalk.gray(` Remote: ${config$1.agentsApiUrl}`));
|
|
59
58
|
}
|
|
60
59
|
return {
|
|
61
60
|
config: config$1,
|
|
@@ -91,10 +90,9 @@ async function initializeCommand(options = {}) {
|
|
|
91
90
|
} catch {}
|
|
92
91
|
const config = await validateConfiguration(configPath, tag);
|
|
93
92
|
if (profile) {
|
|
94
|
-
config.
|
|
95
|
-
config.agentsRunApiUrl = profile.remote.runApi;
|
|
93
|
+
config.agentsApiUrl = profile.remote.api;
|
|
96
94
|
config.manageUiUrl = profile.remote.manageUi;
|
|
97
|
-
if (profileAccessToken) config.
|
|
95
|
+
if (profileAccessToken) config.agentsApiKey = profileAccessToken;
|
|
98
96
|
if (profileOrganizationId) config.tenantId = profileOrganizationId;
|
|
99
97
|
}
|
|
100
98
|
if (s) s.stop("Configuration loaded");
|
|
@@ -102,14 +100,13 @@ async function initializeCommand(options = {}) {
|
|
|
102
100
|
const expiryText = authExpiry ? ` (expires in ${authExpiry})` : "";
|
|
103
101
|
const authStatus = isAuthenticated ? chalk.green("authenticated") + expiryText : chalk.yellow("not authenticated");
|
|
104
102
|
console.log(chalk.gray(`Using profile: ${chalk.cyan(profile.name)}`));
|
|
105
|
-
console.log(chalk.gray(` Remote: ${config.
|
|
103
|
+
console.log(chalk.gray(` Remote: ${config.agentsApiUrl}`));
|
|
106
104
|
console.log(chalk.gray(` Environment: ${profile.environment}`));
|
|
107
105
|
console.log(chalk.gray(` Auth: ${authStatus}`));
|
|
108
106
|
} else {
|
|
109
107
|
console.log(chalk.gray("Configuration:"));
|
|
110
108
|
console.log(chalk.gray(` • Tenant ID: ${config.tenantId}`));
|
|
111
|
-
console.log(chalk.gray(` •
|
|
112
|
-
console.log(chalk.gray(` • Run API URL: ${config.agentsRunApiUrl}`));
|
|
109
|
+
console.log(chalk.gray(` • Agents API URL: ${config.agentsApiUrl}`));
|
|
113
110
|
if (config.sources.configFile) console.log(chalk.gray(` • Config file: ${config.sources.configFile}`));
|
|
114
111
|
}
|
|
115
112
|
return {
|
|
@@ -130,8 +127,7 @@ async function initializeCommand(options = {}) {
|
|
|
130
127
|
else if (error.message.includes("tenantId") || error.message.includes("API URL")) {
|
|
131
128
|
console.log(chalk.yellow("\nHint: Ensure your inkeep.config.ts has all required fields:"));
|
|
132
129
|
console.log(chalk.gray(" - tenantId"));
|
|
133
|
-
console.log(chalk.gray(" -
|
|
134
|
-
console.log(chalk.gray(" - agentsRunApiUrl (or agentsRunApi.url)"));
|
|
130
|
+
console.log(chalk.gray(" - agentsApiUrl (or agentsApi.url)"));
|
|
135
131
|
}
|
|
136
132
|
process.exit(1);
|
|
137
133
|
}
|
package/dist/utils/config.js
CHANGED
|
@@ -13,15 +13,14 @@ const logger = getLogger("config");
|
|
|
13
13
|
function maskSensitiveConfig(config) {
|
|
14
14
|
if (!config) return config;
|
|
15
15
|
const masked = { ...config };
|
|
16
|
-
if (masked.
|
|
17
|
-
if (masked.agentsRunApiKey) masked.agentsRunApiKey = `***${masked.agentsRunApiKey.slice(-4)}`;
|
|
16
|
+
if (masked.agentsApiKey) masked.agentsApiKey = `***${masked.agentsApiKey.slice(-4)}`;
|
|
18
17
|
return masked;
|
|
19
18
|
}
|
|
20
19
|
/**
|
|
21
20
|
* Type guard to check if config uses nested format
|
|
22
21
|
*/
|
|
23
22
|
function isNestedConfig(config) {
|
|
24
|
-
return config &&
|
|
23
|
+
return config && config.agentsApi !== void 0;
|
|
25
24
|
}
|
|
26
25
|
/**
|
|
27
26
|
* Normalize config from either flat or nested format to internal format
|
|
@@ -29,17 +28,14 @@ function isNestedConfig(config) {
|
|
|
29
28
|
function normalizeConfig(config) {
|
|
30
29
|
if (isNestedConfig(config)) return {
|
|
31
30
|
tenantId: config.tenantId,
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
agentsManageApiKey: config.agentsManageApi?.apiKey,
|
|
35
|
-
agentsRunApiKey: config.agentsRunApi?.apiKey,
|
|
31
|
+
agentsApiUrl: config.agentsApi?.url,
|
|
32
|
+
agentsApiKey: config.agentsApi?.apiKey,
|
|
36
33
|
manageUiUrl: config.manageUiUrl,
|
|
37
34
|
outputDirectory: config.outputDirectory
|
|
38
35
|
};
|
|
39
36
|
return {
|
|
40
37
|
tenantId: config.tenantId,
|
|
41
|
-
|
|
42
|
-
agentsRunApiUrl: config.agentsRunApiUrl,
|
|
38
|
+
agentsApiUrl: config.agentsApiUrl,
|
|
43
39
|
manageUiUrl: config.manageUiUrl,
|
|
44
40
|
outputDirectory: config.outputDirectory
|
|
45
41
|
};
|
|
@@ -205,8 +201,7 @@ async function loadConfigFromFile(configPath, tag) {
|
|
|
205
201
|
*/
|
|
206
202
|
async function loadConfig(configPath, tag) {
|
|
207
203
|
const config = {
|
|
208
|
-
|
|
209
|
-
agentsRunApiUrl: "http://localhost:3003",
|
|
204
|
+
agentsApiUrl: "http://localhost:3002",
|
|
210
205
|
manageUiUrl: "http://localhost:3000"
|
|
211
206
|
};
|
|
212
207
|
const fileConfig = await loadConfigFromFile(configPath, tag);
|
|
@@ -226,7 +221,7 @@ async function loadConfig(configPath, tag) {
|
|
|
226
221
|
* Configuration priority:
|
|
227
222
|
* 1. Config file (inkeep.config.ts or --config path/to/config.ts)
|
|
228
223
|
* 2. CLI credentials (from `inkeep login`) - for API key and tenant ID fallback
|
|
229
|
-
* 3. Default values (http://localhost:3002
|
|
224
|
+
* 3. Default values (http://localhost:3002)
|
|
230
225
|
*
|
|
231
226
|
* Note: API URLs and keys are loaded ONLY from the config file, NOT from environment
|
|
232
227
|
* variables or CLI flags. This ensures explicit control over where the CLI connects.
|
|
@@ -236,7 +231,7 @@ async function loadConfig(configPath, tag) {
|
|
|
236
231
|
*
|
|
237
232
|
* @param configPath - explicit path to config file (from --config parameter)
|
|
238
233
|
* @param tag - optional tag for environment-specific config (e.g., 'prod', 'staging')
|
|
239
|
-
* @returns configuration with tenantId,
|
|
234
|
+
* @returns configuration with tenantId, agentsApiUrl, and source info
|
|
240
235
|
*/
|
|
241
236
|
async function validateConfiguration(configPath, tag) {
|
|
242
237
|
const config = await loadConfig(configPath, tag);
|
|
@@ -255,8 +250,8 @@ async function validateConfiguration(configPath, tag) {
|
|
|
255
250
|
logger.debug({}, "Could not load CLI credentials");
|
|
256
251
|
}
|
|
257
252
|
else logger.debug({}, "Skipping keychain credential loading in CI environment");
|
|
258
|
-
if (!config.
|
|
259
|
-
config.
|
|
253
|
+
if (!config.agentsApiKey && cliCredentials) {
|
|
254
|
+
config.agentsApiKey = cliCredentials.accessToken;
|
|
260
255
|
logger.info({}, "Using CLI session token as API key");
|
|
261
256
|
}
|
|
262
257
|
if (!config.tenantId && cliCredentials) {
|
|
@@ -268,20 +263,16 @@ async function validateConfiguration(configPath, tag) {
|
|
|
268
263
|
or run "inkeep login" to authenticate with Inkeep Cloud.`);
|
|
269
264
|
throw new Error("No configuration found. Please:\n 1. Run \"inkeep login\" to authenticate with Inkeep Cloud\n 2. Or create \"inkeep.config.ts\" by running \"inkeep init\"\n 3. Or provide --config to specify a config file path");
|
|
270
265
|
}
|
|
271
|
-
if (!config.
|
|
272
|
-
if (!config.agentsRunApiUrl) throw new Error(`Agents Run API URL is missing from config file${actualConfigFile ? `: ${actualConfigFile}` : ""}\nPlease add agentsRunApiUrl to your configuration file`);
|
|
266
|
+
if (!config.agentsApiUrl) throw new Error(`Agents API URL is missing from config file${actualConfigFile ? `: ${actualConfigFile}` : ""}\nPlease add agentsApiUrl to your configuration file`);
|
|
273
267
|
const sources = {
|
|
274
268
|
tenantId: cliCredentials && !actualConfigFile ? "CLI login (organization ID)" : actualConfigFile ? `config file (${actualConfigFile})` : "default",
|
|
275
|
-
|
|
276
|
-
agentsRunApiUrl: actualConfigFile ? `config file (${actualConfigFile})` : "default value"
|
|
269
|
+
agentsApiUrl: actualConfigFile ? `config file (${actualConfigFile})` : "default value"
|
|
277
270
|
};
|
|
278
271
|
if (actualConfigFile) sources.configFile = actualConfigFile;
|
|
279
272
|
return {
|
|
280
273
|
tenantId: config.tenantId,
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
agentsManageApiKey: config.agentsManageApiKey,
|
|
284
|
-
agentsRunApiKey: config.agentsRunApiKey,
|
|
274
|
+
agentsApiUrl: config.agentsApiUrl,
|
|
275
|
+
agentsApiKey: config.agentsApiKey,
|
|
285
276
|
manageUiUrl: config.manageUiUrl,
|
|
286
277
|
sources
|
|
287
278
|
};
|
|
@@ -28,8 +28,7 @@ async function resolveProfileConfig(options = {}) {
|
|
|
28
28
|
} catch {
|
|
29
29
|
return {
|
|
30
30
|
profileName: "default",
|
|
31
|
-
|
|
32
|
-
agentsRunApiUrl: "http://localhost:3003",
|
|
31
|
+
agentsApiUrl: "http://localhost:3002",
|
|
33
32
|
manageUiUrl: "http://localhost:3000",
|
|
34
33
|
environment: "development",
|
|
35
34
|
credentialKey: "auth-credentials",
|
|
@@ -55,8 +54,7 @@ async function resolveProfileConfig(options = {}) {
|
|
|
55
54
|
return {
|
|
56
55
|
profileName,
|
|
57
56
|
tenantId: credentials?.organizationId,
|
|
58
|
-
|
|
59
|
-
agentsRunApiUrl: profile.remote.runApi,
|
|
57
|
+
agentsApiUrl: profile.remote.api,
|
|
60
58
|
manageUiUrl: profile.remote.manageUi,
|
|
61
59
|
environment: profile.environment,
|
|
62
60
|
credentialKey: profile.credential,
|
|
@@ -68,7 +66,7 @@ async function resolveProfileConfig(options = {}) {
|
|
|
68
66
|
function logProfileConfig(config, quiet = false) {
|
|
69
67
|
if (quiet) return;
|
|
70
68
|
console.log(chalk.gray(`Using profile: ${chalk.cyan(config.profileName)}`));
|
|
71
|
-
console.log(chalk.gray(` Remote: ${config.
|
|
69
|
+
console.log(chalk.gray(` Remote: ${config.agentsApiUrl}`));
|
|
72
70
|
console.log(chalk.gray(` Environment: ${config.environment}`));
|
|
73
71
|
if (config.isAuthenticated) {
|
|
74
72
|
const expiryText = config.authExpiry ? ` (expires in ${config.authExpiry})` : "";
|
|
@@ -5,17 +5,15 @@ import { z } from "zod";
|
|
|
5
5
|
* Baked-in URLs for Inkeep Cloud deployment
|
|
6
6
|
*/
|
|
7
7
|
const CLOUD_REMOTE = {
|
|
8
|
-
|
|
9
|
-
manageUi: "https://manage.inkeep.com"
|
|
10
|
-
runApi: "https://run-api.inkeep.com"
|
|
8
|
+
api: "https://agents-api.inkeep.com",
|
|
9
|
+
manageUi: "https://manage.inkeep.com"
|
|
11
10
|
};
|
|
12
11
|
/**
|
|
13
12
|
* Schema for explicit remote URLs (custom/local deployments)
|
|
14
13
|
*/
|
|
15
14
|
const explicitRemoteSchema = z.object({
|
|
16
|
-
|
|
17
|
-
manageUi: z.string().url("manageUi must be a valid URL")
|
|
18
|
-
runApi: z.string().url("runApi must be a valid URL")
|
|
15
|
+
api: z.string().url("api must be a valid URL"),
|
|
16
|
+
manageUi: z.string().url("manageUi must be a valid URL")
|
|
19
17
|
});
|
|
20
18
|
/**
|
|
21
19
|
* Schema for remote configuration - either 'cloud' shorthand or explicit URLs
|
|
@@ -61,9 +59,8 @@ const DEFAULT_PROFILES_CONFIG = {
|
|
|
61
59
|
* Baked-in URLs for local development deployment
|
|
62
60
|
*/
|
|
63
61
|
const LOCAL_REMOTE = {
|
|
64
|
-
|
|
65
|
-
manageUi: "http://localhost:3001"
|
|
66
|
-
runApi: "http://localhost:3003"
|
|
62
|
+
api: "http://localhost:3002",
|
|
63
|
+
manageUi: "http://localhost:3001"
|
|
67
64
|
};
|
|
68
65
|
/**
|
|
69
66
|
* Default local profile configuration
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inkeep/agents-cli",
|
|
3
|
-
"version": "0.0.0-dev-
|
|
3
|
+
"version": "0.0.0-dev-20260121022749",
|
|
4
4
|
"description": "Inkeep CLI tool",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -41,8 +41,8 @@
|
|
|
41
41
|
"tsx": "^4.20.5",
|
|
42
42
|
"yaml": "^2.7.0",
|
|
43
43
|
"zod": "^4.1.11",
|
|
44
|
-
"@inkeep/agents-
|
|
45
|
-
"@inkeep/agents-
|
|
44
|
+
"@inkeep/agents-core": "^0.0.0-dev-20260121022749",
|
|
45
|
+
"@inkeep/agents-sdk": "^0.0.0-dev-20260121022749"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"@types/degit": "^2.8.6",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"vitest": "^3.2.4"
|
|
54
54
|
},
|
|
55
55
|
"peerDependencies": {
|
|
56
|
-
"@inkeep/agents-manage-ui": "0.0.0-dev-
|
|
56
|
+
"@inkeep/agents-manage-ui": "0.0.0-dev-20260121022749"
|
|
57
57
|
},
|
|
58
58
|
"publishConfig": {
|
|
59
59
|
"access": "public",
|