@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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openagents-org/agent-launcher",
3
- "version": "0.2.46",
3
+ "version": "0.2.47",
4
4
  "description": "OpenAgents Launcher — install, configure, and run AI coding agents from your terminal",
5
5
  "main": "src/index.js",
6
6
  "bin": {
@@ -247,8 +247,18 @@ class OpenClawAdapter extends BaseAdapter {
247
247
  let spawnBin = binary;
248
248
  let spawnArgs = args;
249
249
  if (IS_WINDOWS) {
250
- spawnBin = process.env.COMSPEC || 'cmd.exe';
251
- spawnArgs = ['/C', binary, ...args.map(a => a.includes(' ') ? `"${a}"` : a)];
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],