@inkeep/agents-cli 0.33.2 → 0.34.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/dist/config.d.ts +24 -0
- package/dist/index.js +83 -38
- package/package.json +3 -3
package/dist/config.d.ts
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
interface ApiConfig {
|
|
2
|
+
/**
|
|
3
|
+
* API endpoint URL
|
|
4
|
+
*/
|
|
2
5
|
url: string;
|
|
6
|
+
/**
|
|
7
|
+
* API key
|
|
8
|
+
*/
|
|
3
9
|
apiKey?: string;
|
|
4
10
|
}
|
|
5
11
|
interface FlatInkeepConfig {
|
|
@@ -16,10 +22,28 @@ interface FlatInkeepConfig {
|
|
|
16
22
|
outputDirectory?: string;
|
|
17
23
|
}
|
|
18
24
|
interface NestedInkeepConfig {
|
|
25
|
+
/**
|
|
26
|
+
* Tenant identifier
|
|
27
|
+
*/
|
|
19
28
|
tenantId: string;
|
|
29
|
+
/**
|
|
30
|
+
* Management API configuration
|
|
31
|
+
* @default http://localhost:3002
|
|
32
|
+
*/
|
|
20
33
|
agentsManageApi: ApiConfig;
|
|
34
|
+
/**
|
|
35
|
+
* Runtime API configuration
|
|
36
|
+
* @default http://localhost:3002
|
|
37
|
+
*/
|
|
21
38
|
agentsRunApi: ApiConfig;
|
|
39
|
+
/**
|
|
40
|
+
* Management UI URL
|
|
41
|
+
* @default http://localhost:3000
|
|
42
|
+
*/
|
|
22
43
|
manageUiUrl?: string;
|
|
44
|
+
/**
|
|
45
|
+
* Output directory for generated files
|
|
46
|
+
*/
|
|
23
47
|
outputDirectory?: string;
|
|
24
48
|
}
|
|
25
49
|
type InkeepConfig = FlatInkeepConfig | NestedInkeepConfig;
|
package/dist/index.js
CHANGED
|
@@ -304,6 +304,7 @@ var init_models = __esm({
|
|
|
304
304
|
CLAUDE_3_5_HAIKU_20241022: "anthropic/claude-3-5-haiku-20241022"
|
|
305
305
|
};
|
|
306
306
|
OPENAI_MODELS = {
|
|
307
|
+
GPT_5_1: "openai/gpt-5.1",
|
|
307
308
|
GPT_5: "openai/gpt-5",
|
|
308
309
|
GPT_5_20250807: "openai/gpt-5-2025-08-07",
|
|
309
310
|
GPT_5_MINI: "openai/gpt-5-mini",
|
|
@@ -318,6 +319,7 @@ var init_models = __esm({
|
|
|
318
319
|
GPT_4_1_NANO_20250414: "openai/gpt-4.1-nano-2025-04-14"
|
|
319
320
|
};
|
|
320
321
|
GOOGLE_MODELS = {
|
|
322
|
+
GEMINI_3_PRO_PREVIEW: "google/gemini-3-pro-preview",
|
|
321
323
|
GEMINI_2_5_PRO: "google/gemini-2.5-pro",
|
|
322
324
|
GEMINI_2_5_FLASH: "google/gemini-2.5-flash",
|
|
323
325
|
GEMINI_2_5_FLASH_LITE: "google/gemini-2.5-flash-lite"
|
|
@@ -1694,7 +1696,7 @@ var init_schema = __esm({
|
|
|
1694
1696
|
...agentScoped,
|
|
1695
1697
|
...uiProperties,
|
|
1696
1698
|
prompt: text("prompt").notNull(),
|
|
1697
|
-
conversationHistoryConfig: jsonb("conversation_history_config").$type().
|
|
1699
|
+
conversationHistoryConfig: jsonb("conversation_history_config").$type().default({
|
|
1698
1700
|
mode: "full",
|
|
1699
1701
|
limit: 50,
|
|
1700
1702
|
maxOutputTokens: 4e3,
|
|
@@ -3425,7 +3427,8 @@ var init_schemas = __esm({
|
|
|
3425
3427
|
version: z5.string().optional(),
|
|
3426
3428
|
createdAt: z5.date(),
|
|
3427
3429
|
updatedAt: z5.date(),
|
|
3428
|
-
expiresAt: z5.date().optional()
|
|
3430
|
+
expiresAt: z5.date().optional(),
|
|
3431
|
+
relationshipId: z5.string().optional()
|
|
3429
3432
|
}).openapi("McpTool");
|
|
3430
3433
|
MCPToolConfigSchema = McpToolSchema.omit({
|
|
3431
3434
|
config: true,
|
|
@@ -239997,7 +240000,7 @@ function getAvailableModel() {
|
|
|
239997
240000
|
}
|
|
239998
240001
|
}
|
|
239999
240002
|
throw new Error(
|
|
240000
|
-
"No API keys detected. Please set ANTHROPIC_API_KEY, OPENAI_API_KEY, or
|
|
240003
|
+
"No API keys detected. Please set ANTHROPIC_API_KEY, OPENAI_API_KEY, or GOOGLE_GENERATIVE_AI_API_KEY"
|
|
240001
240004
|
);
|
|
240002
240005
|
}
|
|
240003
240006
|
var PROVIDER_CONFIGS;
|
|
@@ -240014,11 +240017,11 @@ var init_model_provider_detector = __esm({
|
|
|
240014
240017
|
{
|
|
240015
240018
|
name: "openai",
|
|
240016
240019
|
envVars: ["OPENAI_API_KEY"],
|
|
240017
|
-
model: "gpt-
|
|
240020
|
+
model: "gpt-5.1"
|
|
240018
240021
|
},
|
|
240019
240022
|
{
|
|
240020
240023
|
name: "google",
|
|
240021
|
-
envVars: ["
|
|
240024
|
+
envVars: ["GOOGLE_GENERATIVE_AI_API_KEY"],
|
|
240022
240025
|
model: "gemini-2.5-flash"
|
|
240023
240026
|
}
|
|
240024
240027
|
];
|
|
@@ -241730,42 +241733,68 @@ async function pullV3Command(options) {
|
|
|
241730
241733
|
});
|
|
241731
241734
|
s4.start("Detecting project...");
|
|
241732
241735
|
let projectDir;
|
|
241733
|
-
|
|
241734
|
-
|
|
241735
|
-
|
|
241736
|
-
|
|
241737
|
-
|
|
241738
|
-
|
|
241736
|
+
let projectId;
|
|
241737
|
+
let localProjectForId = null;
|
|
241738
|
+
const currentDir = process.cwd();
|
|
241739
|
+
const hasIndexInCurrent = existsSync12(join15(currentDir, "index.ts"));
|
|
241740
|
+
if (hasIndexInCurrent) {
|
|
241741
|
+
projectDir = currentDir;
|
|
241742
|
+
s4.start("Loading local project...");
|
|
241743
|
+
try {
|
|
241744
|
+
localProjectForId = await loadProject(projectDir);
|
|
241745
|
+
const localProjectId = localProjectForId.getId();
|
|
241746
|
+
if (options.project) {
|
|
241747
|
+
if (localProjectId !== options.project) {
|
|
241748
|
+
s4.stop("Project ID mismatch");
|
|
241749
|
+
console.error(
|
|
241750
|
+
chalk14.red(
|
|
241751
|
+
`Local project ID "${localProjectId}" doesn't match --project "${options.project}"`
|
|
241752
|
+
)
|
|
241753
|
+
);
|
|
241754
|
+
console.error(
|
|
241755
|
+
chalk14.yellow("Either remove --project flag or ensure it matches the local project ID")
|
|
241756
|
+
);
|
|
241757
|
+
process.exit(1);
|
|
241758
|
+
}
|
|
241759
|
+
}
|
|
241760
|
+
projectId = localProjectId;
|
|
241761
|
+
s4.stop(`Using local project: ${projectId}`);
|
|
241762
|
+
} catch (error) {
|
|
241763
|
+
s4.stop("Failed to load local project");
|
|
241764
|
+
throw new Error(
|
|
241765
|
+
`Could not load local project: ${error instanceof Error ? error.message : String(error)}`
|
|
241739
241766
|
);
|
|
241740
|
-
process.exit(1);
|
|
241741
241767
|
}
|
|
241742
241768
|
} else {
|
|
241743
|
-
|
|
241744
|
-
if (existsSync12(join15(currentDir, "index.ts"))) {
|
|
241745
|
-
projectDir = currentDir;
|
|
241746
|
-
} else {
|
|
241769
|
+
if (!options.project) {
|
|
241747
241770
|
s4.stop("No index.ts found in current directory");
|
|
241748
241771
|
console.error(
|
|
241749
241772
|
chalk14.yellow(
|
|
241750
|
-
"Please run this command from a directory containing index.ts or use --project <
|
|
241773
|
+
"Please run this command from a directory containing index.ts or use --project <project-id>"
|
|
241751
241774
|
)
|
|
241752
241775
|
);
|
|
241753
241776
|
process.exit(1);
|
|
241754
241777
|
}
|
|
241755
|
-
|
|
241756
|
-
|
|
241757
|
-
|
|
241758
|
-
|
|
241759
|
-
|
|
241760
|
-
|
|
241761
|
-
|
|
241762
|
-
|
|
241763
|
-
|
|
241764
|
-
|
|
241765
|
-
|
|
241766
|
-
|
|
241767
|
-
|
|
241768
|
-
|
|
241778
|
+
const projectPath = resolve4(currentDir, options.project);
|
|
241779
|
+
const hasIndexInPath = existsSync12(join15(projectPath, "index.ts"));
|
|
241780
|
+
if (hasIndexInPath) {
|
|
241781
|
+
projectDir = projectPath;
|
|
241782
|
+
s4.start("Loading project from specified path...");
|
|
241783
|
+
try {
|
|
241784
|
+
localProjectForId = await loadProject(projectDir);
|
|
241785
|
+
projectId = localProjectForId.getId();
|
|
241786
|
+
s4.stop(`Using project from path: ${projectId}`);
|
|
241787
|
+
} catch (error) {
|
|
241788
|
+
s4.stop("Failed to load project from path");
|
|
241789
|
+
throw new Error(
|
|
241790
|
+
`Could not load project from ${projectPath}: ${error instanceof Error ? error.message : String(error)}`
|
|
241791
|
+
);
|
|
241792
|
+
}
|
|
241793
|
+
} else {
|
|
241794
|
+
projectId = options.project;
|
|
241795
|
+
projectDir = join15(currentDir, projectId);
|
|
241796
|
+
s4.stop(`Creating new project directory: ${projectDir}`);
|
|
241797
|
+
}
|
|
241769
241798
|
}
|
|
241770
241799
|
s4.start(`Fetching project: ${projectId}`);
|
|
241771
241800
|
const apiClient = await ManagementApiClient.create(
|
|
@@ -242039,7 +242068,7 @@ var envSchema2 = z15.object({
|
|
|
242039
242068
|
// Secrets loaded from .env files (relative to where CLI is executed)
|
|
242040
242069
|
ANTHROPIC_API_KEY: z15.string().optional(),
|
|
242041
242070
|
OPENAI_API_KEY: z15.string().optional(),
|
|
242042
|
-
|
|
242071
|
+
GOOGLE_GENERATIVE_AI_API_KEY: z15.string().optional(),
|
|
242043
242072
|
// Langfuse configuration for LLM observability
|
|
242044
242073
|
LANGFUSE_SECRET_KEY: z15.string().optional(),
|
|
242045
242074
|
LANGFUSE_PUBLIC_KEY: z15.string().optional(),
|
|
@@ -242314,13 +242343,29 @@ async function getAvailableTemplates(templatePath = "template-projects", local)
|
|
|
242314
242343
|
}
|
|
242315
242344
|
}
|
|
242316
242345
|
return directories;
|
|
242317
|
-
}
|
|
242318
|
-
|
|
242319
|
-
|
|
242346
|
+
}
|
|
242347
|
+
const response = await fetch(
|
|
242348
|
+
`https://api.github.com/repos/inkeep/agents/contents/agents-cookbook/${templatePath}`
|
|
242349
|
+
);
|
|
242350
|
+
if (!response.ok) {
|
|
242351
|
+
throw new Error(
|
|
242352
|
+
`Failed to fetch templates. Please check your internet connection and try again.`
|
|
242353
|
+
);
|
|
242354
|
+
}
|
|
242355
|
+
let contents;
|
|
242356
|
+
try {
|
|
242357
|
+
contents = await response.json();
|
|
242358
|
+
} catch (error) {
|
|
242359
|
+
throw new Error(
|
|
242360
|
+
`Failed to parse templates response. Please check your internet connection and try again. ${error}`
|
|
242361
|
+
);
|
|
242362
|
+
}
|
|
242363
|
+
if (!Array.isArray(contents)) {
|
|
242364
|
+
throw new Error(
|
|
242365
|
+
"Unexpected response format from templates. Please check your internet connection and try again"
|
|
242320
242366
|
);
|
|
242321
|
-
const contents = await response.json();
|
|
242322
|
-
return contents.filter((item) => item.type === "dir" && item.name !== "weather-project").map((item) => item.name);
|
|
242323
242367
|
}
|
|
242368
|
+
return contents.filter((item) => item.type === "dir" && item.name !== "weather-project").map((item) => item.name);
|
|
242324
242369
|
}
|
|
242325
242370
|
|
|
242326
242371
|
// src/commands/add.ts
|
|
@@ -243510,7 +243555,7 @@ program.command("push").description("Push a project configuration to the backend
|
|
|
243510
243555
|
});
|
|
243511
243556
|
program.command("pull").description("Pull project configuration with clean, efficient code generation").option(
|
|
243512
243557
|
"--project <project-id>",
|
|
243513
|
-
"
|
|
243558
|
+
"Project ID to pull (or path to project directory). If in project directory, validates against local project ID."
|
|
243514
243559
|
).option("--config <path>", "Path to configuration file").option(
|
|
243515
243560
|
"--env <environment>",
|
|
243516
243561
|
"Environment file to generate (development, staging, production). Defaults to development"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inkeep/agents-cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.34.0",
|
|
4
4
|
"description": "Inkeep CLI tool",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -49,8 +49,8 @@
|
|
|
49
49
|
"ts-morph": "^26.0.0",
|
|
50
50
|
"tsx": "^4.20.5",
|
|
51
51
|
"open": "^10.2.0",
|
|
52
|
-
"@inkeep/agents-core": "^0.
|
|
53
|
-
"@inkeep/agents-sdk": "^0.
|
|
52
|
+
"@inkeep/agents-core": "^0.34.0",
|
|
53
|
+
"@inkeep/agents-sdk": "^0.34.0"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
56
|
"@types/degit": "^2.8.6",
|