@inkeep/create-agents 0.41.2 → 0.42.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.
@@ -35,6 +35,7 @@ describe('create-agents quickstart e2e', () => {
35
35
  projectTemplatesPrefix,
36
36
  '--skip-inkeep-cli',
37
37
  '--skip-inkeep-mcp',
38
+ '--skip-install', // Skip initial install so we can link local packages first
38
39
  ], testDir);
39
40
  // Verify the CLI completed successfully
40
41
  expect(result.exitCode, `CLI failed with exit code ${result.exitCode}\nstdout: ${result.stdout}\nstderr: ${result.stderr}`).toBe(0);
@@ -45,13 +46,13 @@ describe('create-agents quickstart e2e', () => {
45
46
  'src',
46
47
  'src/inkeep.config.ts',
47
48
  `src/projects/${projectId}`,
48
- 'apps/manage-api',
49
- 'apps/run-api',
49
+ 'apps/agents-api',
50
50
  'apps/mcp',
51
51
  'apps/manage-ui',
52
52
  '.env',
53
53
  'package.json',
54
- 'drizzle.config.ts',
54
+ 'drizzle.manage.config.ts',
55
+ 'drizzle.run.config.ts',
55
56
  ]);
56
57
  console.log('Directory structure verified');
57
58
  // Verify .env file has required variables
@@ -59,9 +60,9 @@ describe('create-agents quickstart e2e', () => {
59
60
  await verifyFile(path.join(projectDir, '.env'), [
60
61
  /ENVIRONMENT=development/,
61
62
  /OPENAI_API_KEY=test-openai-key/,
62
- /DATABASE_URL=postgresql:\/\/appuser:password@localhost:5432\/inkeep_agents/,
63
- /INKEEP_AGENTS_MANAGE_API_URL="http:\/\/127\.0\.0\.1:3002"/,
64
- /INKEEP_AGENTS_RUN_API_URL="http:\/\/127\.0\.0\.1:3003"/,
63
+ /INKEEP_AGENTS_MANAGE_DATABASE_URL=postgresql:\/\/appuser:password@localhost:5432\/inkeep_agents/,
64
+ /INKEEP_AGENTS_RUN_DATABASE_URL=postgresql:\/\/appuser:password@localhost:5433\/inkeep_agents/,
65
+ /INKEEP_AGENTS_API_URL="http:\/\/127\.0\.0\.1:3002"/,
65
66
  /INKEEP_AGENTS_JWT_SIGNING_SECRET=\w+/, // Random secret should be generated
66
67
  ]);
67
68
  console.log('.env file verified');
@@ -69,13 +70,17 @@ describe('create-agents quickstart e2e', () => {
69
70
  console.log('Verifying inkeep.config.ts...');
70
71
  await verifyFile(path.join(projectDir, 'src/inkeep.config.ts'));
71
72
  console.log('inkeep.config.ts verified');
73
+ // Link to local monorepo packages (also runs pnpm install --no-frozen-lockfile)
74
+ console.log('Linking local monorepo packages...');
75
+ await linkLocalPackages(projectDir, monorepoRoot);
76
+ console.log('Local monorepo packages linked and dependencies installed');
72
77
  console.log('Setting up project in database');
73
78
  await runCommand('pnpm', ['setup-dev:cloud'], projectDir, 600000); // 10 minutes for CI (includes pnpm install, migrations, server startup, push)
74
79
  console.log('Project setup in database');
75
80
  console.log('Starting dev servers');
76
81
  // Start dev servers in background with output monitoring
77
82
  const devProcess = execa('pnpm', ['dev'], {
78
- cwd: path.join(projectDir, 'apps/manage-api'),
83
+ cwd: path.join(projectDir, 'apps/agents-api'),
79
84
  env: {
80
85
  ...process.env,
81
86
  FORCE_COLOR: '0',
@@ -121,24 +126,10 @@ describe('create-agents quickstart e2e', () => {
121
126
  expect(pushResult.exitCode, `Push failed with exit code ${pushResult.exitCode}\nstdout: ${pushResult.stdout}\nstderr: ${pushResult.stderr}`).toBe(0);
122
127
  console.log('Testing API requests');
123
128
  // Test API requests
124
- const response = await fetch(`${manageApiUrl}/tenants/default/projects/${projectId}`);
129
+ const response = await fetch(`${manageApiUrl}/manage/tenants/default/projects/${projectId}`);
125
130
  const data = await response.json();
126
131
  expect(data.data.tenantId).toBe('default');
127
132
  expect(data.data.id).toBe(projectId);
128
- // Link to local monorepo packages
129
- await linkLocalPackages(projectDir, monorepoRoot);
130
- const pushResultLocal = await runCommand('pnpm', [
131
- 'inkeep',
132
- 'push',
133
- '--project',
134
- `src/projects/${projectId}`,
135
- '--config',
136
- 'src/inkeep.config.ts',
137
- ], projectDir, 30000);
138
- expect(pushResultLocal.exitCode, `Push with local packages failed with exit code ${pushResultLocal.exitCode}\nstdout: ${pushResultLocal.stdout}\nstderr: ${pushResultLocal.stderr}`).toBe(0);
139
- // Test that the project works with local packages
140
- const responseLocal = await fetch(`${manageApiUrl}/tenants/default/projects/${projectId}`);
141
- expect(responseLocal.status).toBe(200);
142
133
  }
143
134
  catch (error) {
144
135
  console.error('Test failed with error:', error);
@@ -138,8 +138,7 @@ export async function verifyDirectoryStructure(baseDir, expectedPaths) {
138
138
  export async function linkLocalPackages(projectDir, monorepoRoot) {
139
139
  const packageJsonPaths = [
140
140
  path.join(projectDir, 'package.json'),
141
- path.join(projectDir, 'apps/manage-api/package.json'),
142
- path.join(projectDir, 'apps/run-api/package.json'),
141
+ path.join(projectDir, 'apps/agents-api/package.json'),
143
142
  ];
144
143
  const packageJsons = {};
145
144
  for (const packageJsonPath of packageJsonPaths) {
@@ -149,8 +148,7 @@ export async function linkLocalPackages(projectDir, monorepoRoot) {
149
148
  const inkeepPackages = {
150
149
  '@inkeep/agents-sdk': `link:${path.join(monorepoRoot, 'packages/agents-sdk')}`,
151
150
  '@inkeep/agents-core': `link:${path.join(monorepoRoot, 'packages/agents-core')}`,
152
- '@inkeep/agents-manage-api': `link:${path.join(monorepoRoot, 'agents-manage-api')}`,
153
- '@inkeep/agents-run-api': `link:${path.join(monorepoRoot, 'agents-run-api')}`,
151
+ '@inkeep/agents-api': `link:${path.join(monorepoRoot, 'agents-api')}`,
154
152
  '@inkeep/agents-cli': `link:${path.join(monorepoRoot, 'agents-cli')}`,
155
153
  };
156
154
  // Replace package versions with local links
package/dist/index.js CHANGED
@@ -15,6 +15,7 @@ program
15
15
  .option('--local-templates-prefix <local-templates-prefix>', 'Local prefix for project templates')
16
16
  .option('--skip-inkeep-cli', 'Skip installing Inkeep CLI globally')
17
17
  .option('--skip-inkeep-mcp', 'Skip installing Inkeep MCP server')
18
+ .option('--skip-install', 'Skip installing dependencies')
18
19
  .parse();
19
20
  async function main() {
20
21
  const options = program.opts();
@@ -31,6 +32,7 @@ async function main() {
31
32
  localTemplatesPrefix: options.localTemplatesPrefix,
32
33
  skipInkeepCli: options.skipInkeepCli,
33
34
  skipInkeepMcp: options.skipInkeepMcp,
35
+ skipInstall: options.skipInstall,
34
36
  });
35
37
  }
36
38
  catch (error) {
package/dist/templates.js CHANGED
@@ -14,6 +14,7 @@ export async function cloneTemplate(templatePath, targetPath, replacements) {
14
14
  }
15
15
  }
16
16
  catch (_error) {
17
+ console.error('Error cloning template:', _error);
17
18
  process.exit(1);
18
19
  }
19
20
  }
package/dist/utils.d.ts CHANGED
@@ -45,6 +45,7 @@ export declare const createAgents: (args?: {
45
45
  localTemplatesPrefix?: string;
46
46
  skipInkeepCli?: boolean;
47
47
  skipInkeepMcp?: boolean;
48
+ skipInstall?: boolean;
48
49
  }) => Promise<void>;
49
50
  export declare function createCommand(dirName?: string, options?: any): Promise<void>;
50
51
  export declare function addInkeepMcp(): Promise<void>;
package/dist/utils.js CHANGED
@@ -32,8 +32,7 @@ const DIRECTORY_VALIDATION = {
32
32
  const agentsTemplateRepo = 'https://github.com/inkeep/agents/create-agents-template';
33
33
  const projectTemplateRepo = 'https://github.com/inkeep/agents/agents-cookbook/template-projects';
34
34
  const execAsync = promisify(exec);
35
- const manageApiPort = '3002';
36
- const runApiPort = '3003';
35
+ const agentsApiPort = '3002';
37
36
  export const defaultGoogleModelConfigurations = {
38
37
  base: {
39
38
  model: GOOGLE_MODELS.GEMINI_2_5_FLASH,
@@ -68,7 +67,7 @@ export const defaultAnthropicModelConfigurations = {
68
67
  },
69
68
  };
70
69
  export const createAgents = async (args = {}) => {
71
- let { dirName, openAiKey, anthropicKey, googleKey, azureKey, template, customProjectId, disableGit, localAgentsPrefix, localTemplatesPrefix, skipInkeepCli, skipInkeepMcp, } = args;
70
+ let { dirName, openAiKey, anthropicKey, googleKey, azureKey, template, customProjectId, disableGit, localAgentsPrefix, localTemplatesPrefix, skipInkeepCli, skipInkeepMcp, skipInstall, } = args;
72
71
  const tenantId = 'default';
73
72
  let projectId;
74
73
  let templateName;
@@ -342,8 +341,10 @@ export const createAgents = async (args = {}) => {
342
341
  }
343
342
  s.message('Creating inkeep.config.ts...');
344
343
  await createInkeepConfig(config);
345
- s.message('Installing dependencies (this may take a while)...');
346
- await installDependencies();
344
+ if (!skipInstall) {
345
+ s.message('Installing dependencies (this may take a while)...');
346
+ await installDependencies();
347
+ }
347
348
  if (!config.disableGit) {
348
349
  await initializeGit();
349
350
  }
@@ -383,8 +384,7 @@ export const createAgents = async (args = {}) => {
383
384
  ` pnpm setup # Setup project in database\n` +
384
385
  ` pnpm dev # Start development servers\n\n` +
385
386
  `${color.yellow('Available services:')}\n` +
386
- ` • Manage API: http://127.0.0.1:3002\n` +
387
- ` • Run API: http://127.0.0.1:3003\n` +
387
+ ` • Agents API: http://127.0.0.1:3002\n` +
388
388
  ` • Manage UI: Available with management API\n` +
389
389
  `\n${color.yellow('Configuration:')}\n` +
390
390
  ` • Edit .env for environment variables\n` +
@@ -424,8 +424,11 @@ async function createEnvironmentFiles(config) {
424
424
  const envContent = `# Environment
425
425
  ENVIRONMENT=development
426
426
 
427
- # Database
428
- DATABASE_URL=postgresql://appuser:password@localhost:5432/inkeep_agents
427
+ # Database Configuration (Split Database Setup)
428
+ # Management entities database uses DoltgreSQL on port 5432 for version control features
429
+ INKEEP_AGENTS_MANAGE_DATABASE_URL=postgresql://appuser:password@localhost:5432/inkeep_agents
430
+ # Runtime entities database uses PostgreSQL on port 5433 for runtime operations
431
+ INKEEP_AGENTS_RUN_DATABASE_URL=postgresql://appuser:password@localhost:5433/inkeep_agents
429
432
 
430
433
  # AI Provider Keys
431
434
  ANTHROPIC_API_KEY=${config.anthropicKey || 'your-anthropic-key-here'}
@@ -436,12 +439,10 @@ AZURE_API_KEY=${config.azureKey || 'your-azure-key-here'}
436
439
  # Inkeep API URLs
437
440
  # Internal URLs (server-side, Docker internal networking)
438
441
  # Using 127.0.0.1 instead of localhost to avoid IPv6/IPv4 resolution issues
439
- INKEEP_AGENTS_MANAGE_API_URL="http://127.0.0.1:3002"
440
- INKEEP_AGENTS_RUN_API_URL="http://127.0.0.1:3003"
442
+ INKEEP_AGENTS_API_URL="http://127.0.0.1:3002"
441
443
 
442
444
  # Public URLs (client-side, browser accessible)
443
- PUBLIC_INKEEP_AGENTS_MANAGE_API_URL="http://127.0.0.1:3002"
444
- PUBLIC_INKEEP_AGENTS_RUN_API_URL="http://127.0.0.1:3003"
445
+ PUBLIC_INKEEP_AGENTS_API_URL="http://127.0.0.1:3002"
445
446
 
446
447
  # SigNoz Configuration
447
448
  SIGNOZ_URL=your-signoz-url-here
@@ -470,6 +471,8 @@ DEFAULT_PROJECT_ID=${config.projectId}
470
471
  BETTER_AUTH_SECRET=${betterAuthSecret}
471
472
  DISABLE_AUTH=true
472
473
 
474
+ ENABLE_AUTHZ=false
475
+
473
476
  `;
474
477
  await fs.writeFile('.env', envContent);
475
478
  }
@@ -478,13 +481,10 @@ async function createInkeepConfig(config) {
478
481
 
479
482
  const config = defineConfig({
480
483
  tenantId: "${config.tenantId}",
481
- agentsManageApi: {
484
+ agentsApi: {
482
485
  // Using 127.0.0.1 instead of localhost to avoid IPv6/IPv4 resolution issues
483
486
  url: 'http://127.0.0.1:3002',
484
487
  },
485
- agentsRunApi: {
486
- url: 'http://127.0.0.1:3003',
487
- },
488
488
  });
489
489
 
490
490
  export default config;`;
@@ -583,11 +583,8 @@ async function isPortAvailable(port) {
583
583
  */
584
584
  function displayPortConflictError(unavailablePorts) {
585
585
  let errorMessage = '';
586
- if (unavailablePorts.runApi) {
587
- errorMessage += `${color.red(`Run API port ${runApiPort} is already in use`)}\n`;
588
- }
589
- if (unavailablePorts.manageApi) {
590
- errorMessage += `${color.red(`Manage API port ${manageApiPort} is already in use`)}\n`;
586
+ if (unavailablePorts.agentsApi) {
587
+ errorMessage += `${color.red(`Agents API port ${agentsApiPort} is already in use`)}\n`;
591
588
  }
592
589
  p.cancel(`\n${color.red('✗ Port conflicts detected')}\n\n` +
593
590
  `${errorMessage}\n` +
@@ -598,14 +595,10 @@ function displayPortConflictError(unavailablePorts) {
598
595
  * Check port availability and display errors if needed
599
596
  */
600
597
  async function checkPortsAvailability() {
601
- const [runApiAvailable, manageApiAvailable] = await Promise.all([
602
- isPortAvailable(Number(runApiPort)),
603
- isPortAvailable(Number(manageApiPort)),
604
- ]);
605
- if (!runApiAvailable || !manageApiAvailable) {
598
+ const [agentsApiAvailable] = await Promise.all([isPortAvailable(Number(agentsApiPort))]);
599
+ if (!agentsApiAvailable) {
606
600
  displayPortConflictError({
607
- runApi: !runApiAvailable,
608
- manageApi: !manageApiAvailable,
601
+ agentsApi: !agentsApiAvailable,
609
602
  });
610
603
  }
611
604
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inkeep/create-agents",
3
- "version": "0.41.2",
3
+ "version": "0.42.0",
4
4
  "description": "Create an Inkeep Agent Framework project",
5
5
  "type": "module",
6
6
  "bin": {
@@ -33,7 +33,7 @@
33
33
  "degit": "^2.8.4",
34
34
  "fs-extra": "^11.0.0",
35
35
  "picocolors": "^1.0.0",
36
- "@inkeep/agents-core": "0.41.2"
36
+ "@inkeep/agents-core": "0.42.0"
37
37
  },
38
38
  "devDependencies": {
39
39
  "@types/degit": "^2.8.6",