create-byan-agent 2.4.0 → 2.4.1

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.
@@ -498,7 +498,7 @@ async function install() {
498
498
  '-s'
499
499
  ], spawnOpts);
500
500
  } else if (detectedPlatforms.codex) {
501
- res = spawnSync('codex', ['exec'], { ...spawnOpts, input: promptContent });
501
+ res = spawnSync('codex', ['exec', promptContent], spawnOpts);
502
502
  } else if (detectedPlatforms.claude) {
503
503
  res = spawnSync('claude', ['-p', promptContent], spawnOpts);
504
504
  }
@@ -32,6 +32,13 @@ function runCliCommand(cmd, args, cwd, stdinInput) {
32
32
 
33
33
  const res = spawnSync(cmd, args, opts);
34
34
  if (res.error) throw res.error;
35
+
36
+ // Check for non-zero exit code with stderr
37
+ if (res.status !== 0 && res.stderr) {
38
+ const stderr = res.stderr.toString().trim();
39
+ if (stderr) throw new Error(stderr);
40
+ }
41
+
35
42
  return (res.stdout || '').toString();
36
43
  }
37
44
 
@@ -185,7 +192,8 @@ Continue la conversation pour comprendre le projet et personnaliser les agents.`
185
192
  if (selectedPlatform === 'copilot') {
186
193
  result = runCliCommand('copilot', ['-p', fullPrompt, '-s'], projectRoot);
187
194
  } else if (selectedPlatform === 'codex') {
188
- result = runCliCommand('codex', ['exec'], projectRoot, fullPrompt);
195
+ // Codex takes prompt as argument to exec command
196
+ result = runCliCommand('codex', ['exec', fullPrompt], projectRoot);
189
197
  } else if (selectedPlatform === 'claude') {
190
198
  result = runCliCommand('claude', ['-p', fullPrompt], projectRoot);
191
199
  } else {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-byan-agent",
3
- "version": "2.4.0",
3
+ "version": "2.4.1",
4
4
  "description": "BYAN v2.3.2 - Intelligent AI agent ecosystem with Hermes universal dispatcher + Multi-platform support (Copilot CLI, Claude, Codex) + Automatic LLM cost optimization (87.5% savings) + Node 12+ compatible",
5
5
  "main": "src/index.js",
6
6
  "bin": {