@inkeep/agents-cli 0.22.4 → 0.22.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +34 -9
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -234313,10 +234313,24 @@ ${errorText}`);
|
|
|
234313
234313
|
if (response.status === 404) {
|
|
234314
234314
|
throw new Error(`Project "${projectId}" not found`);
|
|
234315
234315
|
}
|
|
234316
|
-
if (response.status === 401) {
|
|
234317
|
-
|
|
234318
|
-
|
|
234319
|
-
|
|
234316
|
+
if (response.status === 401 || response.status === 403) {
|
|
234317
|
+
const errorText2 = await response.text().catch(() => "");
|
|
234318
|
+
let errorMessage = "Authentication failed - check your API key configuration\n\n";
|
|
234319
|
+
errorMessage += "Common issues:\n";
|
|
234320
|
+
errorMessage += " \u2022 Missing or invalid API key in inkeep.config.ts\n";
|
|
234321
|
+
errorMessage += " \u2022 API key does not have access to this tenant/project\n";
|
|
234322
|
+
errorMessage += " \u2022 For local development, ensure INKEEP_AGENTS_MANAGE_API_BYPASS_SECRET is set\n";
|
|
234323
|
+
if (errorText2) {
|
|
234324
|
+
errorMessage += `
|
|
234325
|
+
Server response: ${errorText2}`;
|
|
234326
|
+
}
|
|
234327
|
+
throw new Error(errorMessage);
|
|
234328
|
+
}
|
|
234329
|
+
const errorText = await response.text().catch(() => "");
|
|
234330
|
+
throw new Error(
|
|
234331
|
+
`Failed to fetch project: ${response.statusText}${errorText ? `
|
|
234332
|
+
${errorText}` : ""}`
|
|
234333
|
+
);
|
|
234320
234334
|
}
|
|
234321
234335
|
const responseData = await response.json();
|
|
234322
234336
|
return responseData.data;
|
|
@@ -239011,13 +239025,24 @@ function createProjectStructure(projectDir, projectId, useCurrentDirectory = fal
|
|
|
239011
239025
|
}
|
|
239012
239026
|
async function pullProjectCommand(options) {
|
|
239013
239027
|
performBackgroundVersionCheck();
|
|
239014
|
-
|
|
239028
|
+
const anthropicKey = env2.ANTHROPIC_API_KEY?.trim();
|
|
239029
|
+
if (!anthropicKey) {
|
|
239030
|
+
console.error(
|
|
239031
|
+
chalk9.red("\n\u274C Error: ANTHROPIC_API_KEY is required for the pull command")
|
|
239032
|
+
);
|
|
239015
239033
|
console.error(
|
|
239016
|
-
chalk9.
|
|
239034
|
+
chalk9.yellow(
|
|
239035
|
+
"\nThe pull command uses AI to generate TypeScript files from your project configuration."
|
|
239036
|
+
)
|
|
239017
239037
|
);
|
|
239018
|
-
console.error(chalk9.
|
|
239019
|
-
console.error(chalk9.
|
|
239020
|
-
console.error(chalk9.gray("
|
|
239038
|
+
console.error(chalk9.yellow("This requires a valid Anthropic API key.\n"));
|
|
239039
|
+
console.error(chalk9.cyan("How to fix:"));
|
|
239040
|
+
console.error(chalk9.gray(" 1. Get an API key from: https://console.anthropic.com/"));
|
|
239041
|
+
console.error(chalk9.gray(" 2. Set it in your environment:"));
|
|
239042
|
+
console.error(chalk9.gray(" export ANTHROPIC_API_KEY=your_api_key_here"));
|
|
239043
|
+
console.error(chalk9.gray(" 3. Or add it to your .env file:"));
|
|
239044
|
+
console.error(chalk9.gray(" ANTHROPIC_API_KEY=your_api_key_here\n"));
|
|
239045
|
+
console.error(chalk9.yellow("\u{1F4A1} Note: Make sure the value is not empty or whitespace-only"));
|
|
239021
239046
|
process.exit(1);
|
|
239022
239047
|
}
|
|
239023
239048
|
const spinner = ora5("Loading configuration...").start();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inkeep/agents-cli",
|
|
3
|
-
"version": "0.22.
|
|
3
|
+
"version": "0.22.5",
|
|
4
4
|
"description": "Inkeep CLI tool",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -46,8 +46,8 @@
|
|
|
46
46
|
"recast": "^0.23.0",
|
|
47
47
|
"ts-morph": "^26.0.0",
|
|
48
48
|
"tsx": "^4.20.5",
|
|
49
|
-
"@inkeep/agents-core": "^0.22.
|
|
50
|
-
"@inkeep/agents-sdk": "^0.22.
|
|
49
|
+
"@inkeep/agents-core": "^0.22.5",
|
|
50
|
+
"@inkeep/agents-sdk": "^0.22.5"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
53
|
"@types/degit": "^2.8.6",
|