@openagents-org/agent-launcher 0.2.21 → 0.2.22

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openagents-org/agent-launcher",
3
- "version": "0.2.21",
3
+ "version": "0.2.22",
4
4
  "description": "OpenAgents Launcher — install, configure, and run AI coding agents from your terminal",
5
5
  "main": "src/index.js",
6
6
  "bin": {
@@ -211,9 +211,19 @@ class OpenClawAdapter extends BaseAdapter {
211
211
  };
212
212
 
213
213
  if (IS_WINDOWS) {
214
- spawnBinary = process.env.COMSPEC || 'cmd.exe';
215
- const quotedArgs = args.map((a) => a.includes(' ') ? `"${a}"` : a);
216
- spawnArgs = ['/C', binary, ...quotedArgs];
214
+ // Spawn node directly with the JS entry point instead of cmd.exe /C
215
+ // to get unbuffered stderr for real-time tool status streaming
216
+ const nodeBin = path.join(path.dirname(binary), 'node.exe');
217
+ const entryPoint = path.join(path.dirname(binary), 'node_modules', 'openclaw', 'openclaw.mjs');
218
+ if (fs.existsSync(nodeBin) && fs.existsSync(entryPoint)) {
219
+ spawnBinary = nodeBin;
220
+ spawnArgs = [entryPoint, ...args];
221
+ } else {
222
+ // Fallback to cmd.exe (buffered stderr)
223
+ spawnBinary = process.env.COMSPEC || 'cmd.exe';
224
+ const quotedArgs = args.map((a) => a.includes(' ') ? `"${a}"` : a);
225
+ spawnArgs = ['/C', binary, ...quotedArgs];
226
+ }
217
227
  }
218
228
 
219
229
  const proc = spawn(spawnBinary, spawnArgs, spawnOpts);