@openagents-org/agent-launcher 0.2.59 → 0.2.61
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/claude.js +13 -2
- package/src/paths.js +2 -1
package/package.json
CHANGED
package/src/adapters/claude.js
CHANGED
|
@@ -339,9 +339,19 @@ class ClaudeAdapter extends BaseAdapter {
|
|
|
339
339
|
delete cleanEnv.CLAUDE_CODE_SESSION;
|
|
340
340
|
|
|
341
341
|
try {
|
|
342
|
-
// On Windows, .cmd
|
|
342
|
+
// On Windows, spawn node.exe directly instead of .cmd shims to avoid
|
|
343
|
+
// visible console windows and Unicode path issues
|
|
343
344
|
if (IS_WINDOWS && cmd[0].toLowerCase().endsWith('.cmd')) {
|
|
344
|
-
|
|
345
|
+
// Resolve .cmd shim → actual JS entry point
|
|
346
|
+
const cmdContent = fs.readFileSync(cmd[0], 'utf-8');
|
|
347
|
+
const jsMatch = cmdContent.match(/"([^"]+\.js)"/);
|
|
348
|
+
if (jsMatch) {
|
|
349
|
+
const nodeExe = path.join(os.homedir(), '.openagents', 'nodejs', 'node.exe');
|
|
350
|
+
const nodeBin = fs.existsSync(nodeExe) ? nodeExe : 'node';
|
|
351
|
+
cmd = [nodeBin, jsMatch[1], ...cmd.slice(1)];
|
|
352
|
+
} else {
|
|
353
|
+
cmd = ['cmd.exe', '/c', ...cmd];
|
|
354
|
+
}
|
|
345
355
|
}
|
|
346
356
|
|
|
347
357
|
const proc = spawn(cmd[0], cmd.slice(1), {
|
|
@@ -349,6 +359,7 @@ class ClaudeAdapter extends BaseAdapter {
|
|
|
349
359
|
env: cleanEnv,
|
|
350
360
|
cwd: this.workingDir,
|
|
351
361
|
detached: !IS_WINDOWS,
|
|
362
|
+
windowsHide: true,
|
|
352
363
|
});
|
|
353
364
|
this._channelProcesses[msgChannel] = proc;
|
|
354
365
|
|
package/src/paths.js
CHANGED
|
@@ -42,8 +42,9 @@ function getExtraBinDirs() {
|
|
|
42
42
|
if (nodeDir) _push(dirs, nodeDir);
|
|
43
43
|
} catch {}
|
|
44
44
|
|
|
45
|
-
// Add portable Node.js directory (~/.openagents/nodejs/)
|
|
45
|
+
// Add portable Node.js directory (~/.openagents/nodejs/) and agent binaries
|
|
46
46
|
const portableNode = path.join(HOME, '.openagents', 'nodejs');
|
|
47
|
+
_push(dirs, path.join(portableNode, 'node_modules', '.bin'));
|
|
47
48
|
_push(dirs, portableNode);
|
|
48
49
|
|
|
49
50
|
// Filter to existing directories only, deduplicate
|