@openagents-org/agent-launcher 0.2.46 → 0.2.47
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 +12 -2
package/package.json
CHANGED
package/src/adapters/openclaw.js
CHANGED
|
@@ -247,8 +247,18 @@ class OpenClawAdapter extends BaseAdapter {
|
|
|
247
247
|
let spawnBin = binary;
|
|
248
248
|
let spawnArgs = args;
|
|
249
249
|
if (IS_WINDOWS) {
|
|
250
|
-
|
|
251
|
-
|
|
250
|
+
// Avoid cmd.exe — it can't handle Unicode paths (Chinese/Japanese/Korean usernames)
|
|
251
|
+
// Find node.exe + openclaw.mjs and spawn directly
|
|
252
|
+
const portableNode = path.join(os.homedir(), '.openagents', 'nodejs', 'node.exe');
|
|
253
|
+
const openclawMjs = path.join(os.homedir(), '.openagents', 'nodejs', 'node_modules', 'openclaw', 'openclaw.mjs');
|
|
254
|
+
if (fs.existsSync(portableNode) && fs.existsSync(openclawMjs)) {
|
|
255
|
+
spawnBin = portableNode;
|
|
256
|
+
spawnArgs = [openclawMjs, ...args];
|
|
257
|
+
} else {
|
|
258
|
+
// Fallback to cmd.exe (works for ASCII-only paths)
|
|
259
|
+
spawnBin = process.env.COMSPEC || 'cmd.exe';
|
|
260
|
+
spawnArgs = ['/C', binary, ...args.map(a => a.includes(' ') ? `"${a}"` : a)];
|
|
261
|
+
}
|
|
252
262
|
}
|
|
253
263
|
const proc = spawn(spawnBin, spawnArgs, {
|
|
254
264
|
stdio: ['ignore', 'pipe', stderrFd],
|