@inkeep/agents-cli 0.0.0-dev-20250911002844 → 0.0.0-dev-20250911052037

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 CHANGED
@@ -1,4 +1,4 @@
1
- import { ModelSettings } from '@inkeep/agents-core';
1
+ import { ProjectModels } from '@inkeep/agents-core';
2
2
 
3
3
  interface InkeepConfig {
4
4
  tenantId: string;
@@ -7,7 +7,7 @@ interface InkeepConfig {
7
7
  agentsRunApiUrl: string;
8
8
  manageUiUrl?: string;
9
9
  outputDirectory?: string;
10
- modelSettings?: ModelSettings;
10
+ modelSettings?: ProjectModels;
11
11
  }
12
12
  declare function defineConfig(config: InkeepConfig): InkeepConfig;
13
13
 
package/dist/index.js CHANGED
@@ -14709,7 +14709,7 @@ __export(chat_enhanced_exports, {
14709
14709
  });
14710
14710
  import * as readline from "readline";
14711
14711
  import chalk7 from "chalk";
14712
- import inquirer3 from "inquirer";
14712
+ import inquirer4 from "inquirer";
14713
14713
  import ora5 from "ora";
14714
14714
  async function chatCommandEnhanced(graphIdInput, options) {
14715
14715
  let config3;
@@ -14757,7 +14757,7 @@ async function chatCommandEnhanced(graphIdInput, options) {
14757
14757
  short: g.id,
14758
14758
  searchText: `${g.id} ${g.name || ""}`.toLowerCase()
14759
14759
  }));
14760
- const answer = await inquirer3.prompt([
14760
+ const answer = await inquirer4.prompt([
14761
14761
  {
14762
14762
  type: "list",
14763
14763
  name: "graphId",
@@ -15934,7 +15934,108 @@ init_esm_shims();
15934
15934
  import { existsSync as existsSync3, readdirSync, writeFileSync as writeFileSync2 } from "fs";
15935
15935
  import { basename, dirname as dirname2, join as join3, resolve } from "path";
15936
15936
  import chalk3 from "chalk";
15937
+ import inquirer2 from "inquirer";
15938
+
15939
+ // src/utils/model-config.ts
15940
+ init_esm_shims();
15937
15941
  import inquirer from "inquirer";
15942
+ async function promptForModelConfiguration() {
15943
+ const { providers } = await inquirer.prompt([
15944
+ {
15945
+ type: "checkbox",
15946
+ name: "providers",
15947
+ message: "Which AI providers would you like to configure?",
15948
+ choices: [
15949
+ { name: "Anthropic (Claude)", value: "anthropic" },
15950
+ { name: "OpenAI (GPT)", value: "openai" }
15951
+ ],
15952
+ validate: (input) => {
15953
+ if (input.length === 0) {
15954
+ return "Please select at least one provider";
15955
+ }
15956
+ return true;
15957
+ }
15958
+ }
15959
+ ]);
15960
+ const anthropicModels = [
15961
+ { name: "Claude Opus 4.1", value: "anthropic/claude-opus-4-1-20250805" },
15962
+ { name: "Claude Sonnet 4", value: "anthropic/claude-sonnet-4-20250514" }
15963
+ ];
15964
+ const openaiModels = [
15965
+ { name: "GPT-5", value: "openai/gpt-5-2025-08-07" },
15966
+ { name: "GPT-5 Mini", value: "openai/gpt-5-mini-2025-08-07" },
15967
+ { name: "GPT-5 Nano", value: "openai/gpt-5-nano-2025-08-07" },
15968
+ { name: "GPT-4.1", value: "openai/gpt-4.1-2025-04-14" },
15969
+ { name: "GPT-4.1 Mini", value: "openai/gpt-4.1-mini-2025-04-14" },
15970
+ { name: "GPT-4.1 Nano", value: "openai/gpt-4.1-nano-2025-04-14" }
15971
+ ];
15972
+ const availableModels = [];
15973
+ if (providers.includes("anthropic")) {
15974
+ availableModels.push(...anthropicModels);
15975
+ }
15976
+ if (providers.includes("openai")) {
15977
+ availableModels.push(...openaiModels);
15978
+ }
15979
+ const modelAnswers = await inquirer.prompt([
15980
+ {
15981
+ type: "list",
15982
+ name: "baseModel",
15983
+ message: "Select your default model for general tasks (required):",
15984
+ choices: availableModels
15985
+ },
15986
+ {
15987
+ type: "list",
15988
+ name: "pullModel",
15989
+ message: "Select your model for TypeScript code generation (inkeep pull command, required):",
15990
+ choices: availableModels
15991
+ },
15992
+ {
15993
+ type: "confirm",
15994
+ name: "configureOptionalModels",
15995
+ message: "Would you like to configure optional models for structured output and summaries?",
15996
+ default: false
15997
+ }
15998
+ ]);
15999
+ let optionalModels = {};
16000
+ if (modelAnswers.configureOptionalModels) {
16001
+ const optionalChoices = [...availableModels, { name: "Use base model", value: null }];
16002
+ optionalModels = await inquirer.prompt([
16003
+ {
16004
+ type: "list",
16005
+ name: "structuredOutputModel",
16006
+ message: "Select your model for structured output tasks (or use base model):",
16007
+ choices: optionalChoices
16008
+ },
16009
+ {
16010
+ type: "list",
16011
+ name: "summarizerModel",
16012
+ message: "Select your model for summaries and quick tasks (or use base model):",
16013
+ choices: optionalChoices
16014
+ }
16015
+ ]);
16016
+ }
16017
+ const modelSettings = {
16018
+ base: {
16019
+ model: modelAnswers.baseModel
16020
+ },
16021
+ pull: {
16022
+ model: modelAnswers.pullModel
16023
+ }
16024
+ };
16025
+ if (optionalModels.structuredOutputModel) {
16026
+ modelSettings.structuredOutput = {
16027
+ model: optionalModels.structuredOutputModel
16028
+ };
16029
+ }
16030
+ if (optionalModels.summarizerModel) {
16031
+ modelSettings.summarizer = {
16032
+ model: optionalModels.summarizerModel
16033
+ };
16034
+ }
16035
+ return { modelSettings };
16036
+ }
16037
+
16038
+ // src/commands/init.ts
15938
16039
  function findProjectRoot(startPath) {
15939
16040
  let currentPath = resolve(startPath);
15940
16041
  const root = dirname2(currentPath);
@@ -15975,7 +16076,7 @@ async function initCommand(options) {
15975
16076
  if (options?.interactive === false) {
15976
16077
  configPath = suggestedPath;
15977
16078
  } else {
15978
- const { confirmedPath } = await inquirer.prompt([
16079
+ const { confirmedPath } = await inquirer2.prompt([
15979
16080
  {
15980
16081
  type: "input",
15981
16082
  name: "confirmedPath",
@@ -15999,7 +16100,7 @@ async function initCommand(options) {
15999
16100
  }
16000
16101
  }
16001
16102
  if (existsSync3(configPath)) {
16002
- const { overwrite } = await inquirer.prompt([
16103
+ const { overwrite } = await inquirer2.prompt([
16003
16104
  {
16004
16105
  type: "confirm",
16005
16106
  name: "overwrite",
@@ -16012,7 +16113,7 @@ async function initCommand(options) {
16012
16113
  return;
16013
16114
  }
16014
16115
  }
16015
- const answers = await inquirer.prompt([
16116
+ const answers = await inquirer2.prompt([
16016
16117
  {
16017
16118
  type: "input",
16018
16119
  name: "tenantId",
@@ -16051,12 +16152,15 @@ async function initCommand(options) {
16051
16152
  }
16052
16153
  }
16053
16154
  ]);
16155
+ const { modelSettings } = await promptForModelConfiguration();
16054
16156
  const configContent = `import { defineConfig } from '@inkeep/agents-cli';
16055
16157
 
16056
16158
  export default defineConfig({
16057
16159
  tenantId: '${answers.tenantId}',
16058
16160
  projectId: '${answers.projectId}',
16059
- apiUrl: '${answers.apiUrl}',
16161
+ managementApiUrl: '${answers.apiUrl}',
16162
+ executionApiUrl: '${answers.apiUrl}',
16163
+ modelSettings: ${JSON.stringify(modelSettings, null, 2)},
16060
16164
  });
16061
16165
  `;
16062
16166
  try {
@@ -16346,7 +16450,10 @@ import { anthropic, createAnthropic } from "@ai-sdk/anthropic";
16346
16450
  import { createOpenAI, openai } from "@ai-sdk/openai";
16347
16451
  import { generateText } from "ai";
16348
16452
  function createModel(config3) {
16349
- const modelString = config3.model || "anthropic/claude-4-sonnet-20250514";
16453
+ if (!config3.model) {
16454
+ throw new Error("Model configuration is required for pull command");
16455
+ }
16456
+ const modelString = config3.model;
16350
16457
  const providerOptions = config3.providerOptions;
16351
16458
  const { provider, modelName } = parseModelString(modelString);
16352
16459
  switch (provider) {
@@ -16613,14 +16720,14 @@ async function pullCommand(graphId, options) {
16613
16720
  console.log(chalk5.gray(` \u2022 View the file: ${outputFilePath}`));
16614
16721
  console.log(chalk5.gray(` \u2022 Use the data in your application`));
16615
16722
  } else {
16616
- if (!config3.modelSettings) {
16617
- spinner2.fail("Model Settings is required for TypeScript generation");
16618
- console.error(chalk5.red("Error: No modelSettings found in configuration."));
16619
- console.error(chalk5.yellow("Please add modelSettings to your inkeep.config.ts file."));
16723
+ if (!config3.modelSettings?.pull) {
16724
+ spinner2.fail("Pull model configuration is required for TypeScript generation");
16725
+ console.error(chalk5.red("Error: No pull model found in configuration."));
16726
+ console.error(chalk5.yellow("Please add pull model to your inkeep.config.ts file."));
16620
16727
  console.error(chalk5.gray("Example:"));
16621
16728
  console.error(chalk5.gray(" modelSettings: {"));
16622
- console.error(chalk5.gray(' model: "anthropic/claude-3-5-sonnet-20241022",'));
16623
- console.error(chalk5.gray(" providerOptions: { anthropic: {} }"));
16729
+ console.error(chalk5.gray(' base: { model: "anthropic/claude-sonnet-4-20250514" },'));
16730
+ console.error(chalk5.gray(' pull: { model: "anthropic/claude-sonnet-4-20250514" },'));
16624
16731
  console.error(chalk5.gray(" }"));
16625
16732
  process.exit(1);
16626
16733
  }
@@ -16639,7 +16746,7 @@ async function pullCommand(graphId, options) {
16639
16746
  graphData,
16640
16747
  graphId,
16641
16748
  outputFilePath,
16642
- config3.modelSettings,
16749
+ config3.modelSettings.pull,
16643
16750
  {
16644
16751
  attempt,
16645
16752
  maxRetries,
@@ -30737,6 +30844,12 @@ var ModelSchema = external_exports.object({
30737
30844
  structuredOutput: ModelSettingsSchema.optional(),
30738
30845
  summarizer: ModelSettingsSchema.optional()
30739
30846
  });
30847
+ var ProjectModelSchema = external_exports.object({
30848
+ base: ModelSettingsSchema,
30849
+ structuredOutput: ModelSettingsSchema.optional(),
30850
+ summarizer: ModelSettingsSchema.optional(),
30851
+ pull: ModelSettingsSchema
30852
+ });
30740
30853
  var createApiSchema = (schema) => schema.omit({ tenantId: true, projectId: true });
30741
30854
  var createApiInsertSchema = (schema) => schema.omit({ tenantId: true, projectId: true });
30742
30855
  var createApiUpdateSchema = (schema) => schema.omit({ tenantId: true, projectId: true }).partial();
@@ -31185,7 +31298,9 @@ var RemovedResponseSchema = external_exports.object({
31185
31298
  removed: external_exports.boolean()
31186
31299
  });
31187
31300
  var ProjectSelectSchema = createSelectSchema(projects);
31188
- var ProjectInsertSchema = createInsertSchema(projects).omit({
31301
+ var ProjectInsertSchema = createInsertSchema(projects).extend({
31302
+ models: ProjectModelSchema.optional()
31303
+ }).omit({
31189
31304
  createdAt: true,
31190
31305
  updatedAt: true
31191
31306
  });
@@ -37969,10 +38084,10 @@ init_esm_shims();
37969
38084
  // src/commands/push.ts
37970
38085
  init_api();
37971
38086
  init_config();
37972
- init_tsx_loader();
37973
38087
  import chalk6 from "chalk";
37974
- import inquirer2 from "inquirer";
38088
+ import inquirer3 from "inquirer";
37975
38089
  import ora4 from "ora";
38090
+ init_tsx_loader();
37976
38091
 
37977
38092
  // src/utils/url.ts
37978
38093
  init_esm_shims();
@@ -38067,7 +38182,7 @@ async function pushCommand(graphPath, options) {
38067
38182
  if (!existingProject) {
38068
38183
  spinner2.warn(`Project "${projectId}" does not exist`);
38069
38184
  spinner2.stop();
38070
- const { shouldCreate } = await inquirer2.prompt([
38185
+ const { shouldCreate } = await inquirer3.prompt([
38071
38186
  {
38072
38187
  type: "confirm",
38073
38188
  name: "shouldCreate",
@@ -38079,7 +38194,7 @@ async function pushCommand(graphPath, options) {
38079
38194
  console.log(chalk6.yellow("Push cancelled. Project must exist before pushing a graph."));
38080
38195
  process.exit(0);
38081
38196
  }
38082
- const { projectName, projectDescription } = await inquirer2.prompt([
38197
+ const { projectName, projectDescription } = await inquirer3.prompt([
38083
38198
  {
38084
38199
  type: "input",
38085
38200
  name: "projectName",
@@ -38099,15 +38214,27 @@ async function pushCommand(graphPath, options) {
38099
38214
  default: ""
38100
38215
  }
38101
38216
  ]);
38102
- spinner2.start("Creating project...");
38217
+ let models = config3.modelSettings;
38218
+ if (!models || !models.base) {
38219
+ spinner2.stop();
38220
+ console.log(chalk6.cyan("\nNow let's configure the AI models for this project."));
38221
+ console.log(chalk6.gray("Models are required for agents to function properly.\n"));
38222
+ const { modelSettings } = await promptForModelConfiguration();
38223
+ models = modelSettings;
38224
+ } else {
38225
+ console.log(chalk6.gray("\nUsing model settings from config file."));
38226
+ }
38227
+ spinner2.start("Creating project with configured models...");
38103
38228
  try {
38104
38229
  await createProject(dbClient)({
38105
38230
  id: projectId,
38106
38231
  tenantId,
38107
38232
  name: projectName,
38108
- description: projectDescription || "No description provided"
38233
+ description: projectDescription || "No description provided",
38234
+ models
38235
+ // Pass models directly when creating the project
38109
38236
  });
38110
- spinner2.succeed(`Project "${projectName}" created successfully`);
38237
+ spinner2.succeed(`Project "${projectName}" created successfully with model configuration`);
38111
38238
  } catch (error43) {
38112
38239
  spinner2.fail("Failed to create project");
38113
38240
  console.error(chalk6.red("Error:"), error43.message);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inkeep/agents-cli",
3
- "version": "0.0.0-dev-20250911002844",
3
+ "version": "0.0.0-dev-20250911052037",
4
4
  "description": "Inkeep CLI tool",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -42,8 +42,8 @@
42
42
  "recast": "^0.23.0",
43
43
  "ts-morph": "^26.0.0",
44
44
  "tsx": "^4.20.5",
45
- "@inkeep/agents-core": "^0.0.0-dev-20250911002844",
46
- "@inkeep/agents-manage-ui": "^0.0.0-dev-20250911002844"
45
+ "@inkeep/agents-core": "^0.0.0-dev-20250911052037",
46
+ "@inkeep/agents-manage-ui": "^0.0.0-dev-20250911052037"
47
47
  },
48
48
  "devDependencies": {
49
49
  "@types/fs-extra": "^11.0.4",