@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 +1 -1
- package/src/adapters/openclaw.js +13 -3
package/package.json
CHANGED
package/src/adapters/openclaw.js
CHANGED
|
@@ -211,9 +211,19 @@ class OpenClawAdapter extends BaseAdapter {
|
|
|
211
211
|
};
|
|
212
212
|
|
|
213
213
|
if (IS_WINDOWS) {
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
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);
|