@inkeep/create-agents 0.2.2 → 0.5.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.
@@ -49,17 +49,17 @@ describe('createAgents - Template and Project ID Logic', () => {
49
49
  vi.mocked(fs.remove).mockResolvedValue(undefined);
50
50
  // Mock templates
51
51
  vi.mocked(getAvailableTemplates).mockResolvedValue([
52
- 'weather-graph',
52
+ 'weather-project',
53
53
  'chatbot',
54
54
  'data-analysis',
55
55
  ]);
56
56
  vi.mocked(cloneTemplate).mockResolvedValue(undefined);
57
57
  // Mock util.promisify to return a mock exec function
58
58
  const mockExecAsync = vi.fn().mockResolvedValue({ stdout: '', stderr: '' });
59
- const util = require('util');
59
+ const util = require('node:util');
60
60
  util.promisify = vi.fn(() => mockExecAsync);
61
61
  // Mock child_process.spawn
62
- const childProcess = require('child_process');
62
+ const childProcess = require('node:child_process');
63
63
  childProcess.spawn = vi.fn(() => ({
64
64
  pid: 12345,
65
65
  stdio: ['pipe', 'pipe', 'pipe'],
@@ -72,27 +72,27 @@ describe('createAgents - Template and Project ID Logic', () => {
72
72
  processChdirSpy.mockRestore();
73
73
  });
74
74
  describe('Default behavior (no template or customProjectId)', () => {
75
- it('should use weather-graph as default template and project ID', async () => {
75
+ it('should use weather-project as default template and project ID', async () => {
76
76
  await createAgents({
77
77
  dirName: 'test-dir',
78
78
  openAiKey: 'test-openai-key',
79
79
  anthropicKey: 'test-anthropic-key',
80
80
  });
81
- // Should clone base template and weather-graph template
81
+ // Should clone base template and weather-project template
82
82
  expect(cloneTemplate).toHaveBeenCalledTimes(2);
83
83
  expect(cloneTemplate).toHaveBeenCalledWith('https://github.com/inkeep/create-agents-template', expect.any(String));
84
- expect(cloneTemplate).toHaveBeenCalledWith('https://github.com/inkeep/agents-cookbook/templates/weather-graph', 'src/weather-graph');
84
+ expect(cloneTemplate).toHaveBeenCalledWith('https://github.com/inkeep/agents-cookbook/template-projects/weather-project', 'src/weather-project');
85
85
  // Should not call getAvailableTemplates since no template validation needed
86
86
  expect(getAvailableTemplates).not.toHaveBeenCalled();
87
87
  });
88
- it('should create project with weather-graph as project ID', async () => {
88
+ it('should create project with weather-project as project ID', async () => {
89
89
  await createAgents({
90
90
  dirName: 'test-dir',
91
91
  openAiKey: 'test-openai-key',
92
92
  anthropicKey: 'test-anthropic-key',
93
93
  });
94
94
  // Check that inkeep.config.ts is created with correct project ID
95
- expect(fs.writeFile).toHaveBeenCalledWith('src/weather-graph/inkeep.config.ts', expect.stringContaining('projectId: "weather-graph"'));
95
+ expect(fs.writeFile).toHaveBeenCalledWith('src/weather-project/inkeep.config.ts', expect.stringContaining('projectId: "weather-project"'));
96
96
  });
97
97
  });
98
98
  describe('Template provided', () => {
@@ -108,11 +108,11 @@ describe('createAgents - Template and Project ID Logic', () => {
108
108
  // Should clone base template and the specified template
109
109
  expect(cloneTemplate).toHaveBeenCalledTimes(2);
110
110
  expect(cloneTemplate).toHaveBeenCalledWith('https://github.com/inkeep/create-agents-template', expect.any(String));
111
- expect(cloneTemplate).toHaveBeenCalledWith('https://github.com/inkeep/agents-cookbook/templates/chatbot', 'src/chatbot');
111
+ expect(cloneTemplate).toHaveBeenCalledWith('https://github.com/inkeep/agents-cookbook/template-projects/chatbot', 'src/chatbot');
112
112
  expect(fs.writeFile).toHaveBeenCalledWith('src/chatbot/inkeep.config.ts', expect.stringContaining('projectId: "chatbot"'));
113
113
  });
114
114
  it('should exit with error when template does not exist', async () => {
115
- vi.mocked(getAvailableTemplates).mockResolvedValue(['weather-graph', 'chatbot']);
115
+ vi.mocked(getAvailableTemplates).mockResolvedValue(['weather-project', 'chatbot']);
116
116
  await expect(createAgents({
117
117
  dirName: 'test-dir',
118
118
  template: 'non-existent-template',
@@ -123,7 +123,7 @@ describe('createAgents - Template and Project ID Logic', () => {
123
123
  });
124
124
  it('should show available templates when invalid template is provided', async () => {
125
125
  vi.mocked(getAvailableTemplates).mockResolvedValue([
126
- 'weather-graph',
126
+ 'weather-project',
127
127
  'chatbot',
128
128
  'data-analysis',
129
129
  ]);
@@ -133,7 +133,7 @@ describe('createAgents - Template and Project ID Logic', () => {
133
133
  openAiKey: 'test-openai-key',
134
134
  })).rejects.toThrow('process.exit called');
135
135
  const cancelCall = vi.mocked(p.cancel).mock.calls[0][0];
136
- expect(cancelCall).toContain('weather-graph');
136
+ expect(cancelCall).toContain('weather-project');
137
137
  expect(cancelCall).toContain('chatbot');
138
138
  expect(cancelCall).toContain('data-analysis');
139
139
  });
@@ -185,7 +185,7 @@ describe('createAgents - Template and Project ID Logic', () => {
185
185
  anthropicKey: 'test-key',
186
186
  });
187
187
  expect(cloneTemplate).toHaveBeenCalledTimes(2);
188
- expect(cloneTemplate).toHaveBeenCalledWith('https://github.com/inkeep/agents-cookbook/templates/my-complex-template', 'src/my-complex-template');
188
+ expect(cloneTemplate).toHaveBeenCalledWith('https://github.com/inkeep/agents-cookbook/template-projects/my-complex-template', 'src/my-complex-template');
189
189
  });
190
190
  it('should handle custom project IDs with special characters', async () => {
191
191
  await createAgents({
@@ -237,6 +237,10 @@ function setupDefaultMocks() {
237
237
  vi.mocked(fs.pathExists).mockResolvedValue(false);
238
238
  vi.mocked(fs.ensureDir).mockResolvedValue(undefined);
239
239
  vi.mocked(fs.writeFile).mockResolvedValue(undefined);
240
- vi.mocked(getAvailableTemplates).mockResolvedValue(['weather-graph', 'chatbot', 'data-analysis']);
240
+ vi.mocked(getAvailableTemplates).mockResolvedValue([
241
+ 'weather-project',
242
+ 'chatbot',
243
+ 'data-analysis',
244
+ ]);
241
245
  vi.mocked(cloneTemplate).mockResolvedValue(undefined);
242
246
  }
package/dist/templates.js CHANGED
@@ -1,5 +1,5 @@
1
- import fs from 'fs-extra';
2
1
  import degit from 'degit';
2
+ import fs from 'fs-extra';
3
3
  //Duplicating function here so we dont have to add a dependency on the agents-cli package
4
4
  export async function cloneTemplate(templatePath, targetPath) {
5
5
  await fs.mkdir(targetPath, { recursive: true });
@@ -8,15 +8,13 @@ export async function cloneTemplate(templatePath, targetPath) {
8
8
  try {
9
9
  await emitter.clone(targetPath);
10
10
  }
11
- catch (error) {
11
+ catch (_error) {
12
12
  process.exit(1);
13
13
  }
14
14
  }
15
15
  export async function getAvailableTemplates() {
16
16
  // Fetch the list of templates from your repo
17
- const response = await fetch('https://api.github.com/repos/inkeep/agents-cookbook/contents/templates');
17
+ const response = await fetch('https://api.github.com/repos/inkeep/agents-cookbook/contents/template-projects');
18
18
  const contents = await response.json();
19
- return contents
20
- .filter((item) => item.type === 'dir')
21
- .map((item) => item.name);
19
+ return contents.filter((item) => item.type === 'dir').map((item) => item.name);
22
20
  }
package/dist/utils.js CHANGED
@@ -1,9 +1,9 @@
1
1
  import * as p from '@clack/prompts';
2
- import { exec } from 'child_process';
2
+ import { exec } from 'node:child_process';
3
3
  import fs from 'fs-extra';
4
- import path from 'path';
4
+ import path from 'node:path';
5
5
  import color from 'picocolors';
6
- import { promisify } from 'util';
6
+ import { promisify } from 'node:util';
7
7
  import { cloneTemplate, getAvailableTemplates } from './templates.js';
8
8
  const execAsync = promisify(exec);
9
9
  export const defaultGoogleModelConfigurations = {
@@ -19,7 +19,7 @@ export const defaultGoogleModelConfigurations = {
19
19
  };
20
20
  export const defaultOpenaiModelConfigurations = {
21
21
  base: {
22
- model: 'openai/gpt-5-2025-08-07',
22
+ model: 'openai/gpt-4.1-2025-04-14',
23
23
  },
24
24
  structuredOutput: {
25
25
  model: 'openai/gpt-4.1-mini-2025-04-14',
@@ -66,8 +66,8 @@ export const createAgents = async (args = {}) => {
66
66
  }
67
67
  else {
68
68
  // No template or custom project ID provided - use defaults
69
- projectId = 'weather-graph';
70
- templateName = 'weather-graph';
69
+ projectId = 'weather-project';
70
+ templateName = 'weather-project';
71
71
  }
72
72
  p.intro(color.inverse(' Create Agents Directory '));
73
73
  // Prompt for directory name if not provided
@@ -93,7 +93,7 @@ export const createAgents = async (args = {}) => {
93
93
  // If keys aren't provided via CLI args, prompt for provider selection and keys
94
94
  if (!anthropicKey && !openAiKey) {
95
95
  const providerChoice = await p.select({
96
- message: 'Which AI provider(s) would you like to use?',
96
+ message: 'Which AI provider would you like to use?',
97
97
  options: [
98
98
  { value: 'anthropic', label: 'Anthropic' },
99
99
  { value: 'openai', label: 'OpenAI' },
@@ -172,7 +172,7 @@ export const createAgents = async (args = {}) => {
172
172
  try {
173
173
  const agentsTemplateRepo = 'https://github.com/inkeep/create-agents-template';
174
174
  const projectTemplateRepo = templateName
175
- ? `https://github.com/inkeep/agents-cookbook/templates/${templateName}`
175
+ ? `https://github.com/inkeep/agents-cookbook/template-projects/${templateName}`
176
176
  : null;
177
177
  const directoryPath = path.resolve(process.cwd(), dirName);
178
178
  // Check if directory already exists
@@ -203,7 +203,7 @@ export const createAgents = async (args = {}) => {
203
203
  manageApiPort: manageApiPort || '3002',
204
204
  runApiPort: runApiPort || '3003',
205
205
  modelSettings: defaultModelSettings,
206
- customProject: customProjectId ? true : false,
206
+ customProject: !!customProjectId,
207
207
  };
208
208
  // Create workspace structure for project-specific files
209
209
  s.message('Setting up project structure...');
@@ -281,13 +281,15 @@ GOOGLE_GENERATIVE_AI_API_KEY=${config.googleKey || 'your-google-key-here'}
281
281
  INKEEP_AGENTS_MANAGE_API_URL="http://localhost:3002"
282
282
  INKEEP_AGENTS_RUN_API_URL="http://localhost:3003"
283
283
 
284
- # SigNoz
284
+ # SigNoz Configuration
285
285
  SIGNOZ_URL=your-signoz-url-here
286
286
  SIGNOZ_API_KEY=your-signoz-api-key-here
287
287
 
288
- # Nango
289
- NANGO_HOST=your-nango-host-here
290
- NANGO_CONNECT_BASE_URL=your-nango-connect-base-url-here
288
+ # OTEL Configuration
289
+ OTEL_EXPORTER_OTLP_TRACES_ENDPOINT=https://ingest.us.signoz.cloud:443/v1/traces
290
+ OTEL_EXPORTER_OTLP_TRACES_HEADERS="signoz-ingestion-key=<your-ingestion-key>"
291
+
292
+ # Nango Configuration
291
293
  NANGO_SECRET_KEY=
292
294
  `;
293
295
  await fs.writeFile('.env', envContent);
@@ -322,7 +324,7 @@ async function installDependencies() {
322
324
  }
323
325
  async function setupProjectInDatabase(config) {
324
326
  // Start development servers in background
325
- const { spawn } = await import('child_process');
327
+ const { spawn } = await import('node:child_process');
326
328
  const devProcess = spawn('pnpm', ['dev:apis'], {
327
329
  stdio: ['pipe', 'pipe', 'pipe'],
328
330
  detached: true, // Detach so we can kill the process group
@@ -333,9 +335,9 @@ async function setupProjectInDatabase(config) {
333
335
  // Run inkeep push
334
336
  try {
335
337
  // Suppress all output
336
- const { stdout, stderr } = await execAsync(`pnpm inkeep push --project src/${config.projectId}`);
338
+ await execAsync(`pnpm inkeep push --project src/${config.projectId}`);
337
339
  }
338
- catch (error) {
340
+ catch (_error) {
339
341
  //Continue despite error - user can setup project manually
340
342
  }
341
343
  finally {
@@ -354,7 +356,7 @@ async function setupProjectInDatabase(config) {
354
356
  // Process already terminated
355
357
  }
356
358
  }
357
- catch (error) {
359
+ catch (_error) {
358
360
  // Process might already be dead, that's fine
359
361
  console.log('Note: Dev servers may still be running in background');
360
362
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inkeep/create-agents",
3
- "version": "0.2.2",
3
+ "version": "0.5.0",
4
4
  "description": "Create an Inkeep Agent Framework project",
5
5
  "type": "module",
6
6
  "bin": {