@inkeep/create-agents 0.3.0 → 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.
- package/dist/__tests__/utils.test.js +2 -2
- package/dist/templates.js +1 -1
- package/dist/utils.js +9 -9
- package/package.json +1 -1
|
@@ -56,10 +56,10 @@ describe('createAgents - Template and Project ID Logic', () => {
|
|
|
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'],
|
package/dist/templates.js
CHANGED
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-
|
|
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',
|
|
@@ -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
|
|
206
|
+
customProject: !!customProjectId,
|
|
207
207
|
};
|
|
208
208
|
// Create workspace structure for project-specific files
|
|
209
209
|
s.message('Setting up project structure...');
|
|
@@ -324,7 +324,7 @@ async function installDependencies() {
|
|
|
324
324
|
}
|
|
325
325
|
async function setupProjectInDatabase(config) {
|
|
326
326
|
// Start development servers in background
|
|
327
|
-
const { spawn } = await import('child_process');
|
|
327
|
+
const { spawn } = await import('node:child_process');
|
|
328
328
|
const devProcess = spawn('pnpm', ['dev:apis'], {
|
|
329
329
|
stdio: ['pipe', 'pipe', 'pipe'],
|
|
330
330
|
detached: true, // Detach so we can kill the process group
|
|
@@ -335,9 +335,9 @@ async function setupProjectInDatabase(config) {
|
|
|
335
335
|
// Run inkeep push
|
|
336
336
|
try {
|
|
337
337
|
// Suppress all output
|
|
338
|
-
|
|
338
|
+
await execAsync(`pnpm inkeep push --project src/${config.projectId}`);
|
|
339
339
|
}
|
|
340
|
-
catch (
|
|
340
|
+
catch (_error) {
|
|
341
341
|
//Continue despite error - user can setup project manually
|
|
342
342
|
}
|
|
343
343
|
finally {
|
|
@@ -356,7 +356,7 @@ async function setupProjectInDatabase(config) {
|
|
|
356
356
|
// Process already terminated
|
|
357
357
|
}
|
|
358
358
|
}
|
|
359
|
-
catch (
|
|
359
|
+
catch (_error) {
|
|
360
360
|
// Process might already be dead, that's fine
|
|
361
361
|
console.log('Note: Dev servers may still be running in background');
|
|
362
362
|
}
|