orchestrix-yuri 2.0.1 → 2.0.2
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/lib/gateway/engine/claude-cli.js +14 -12
- package/package.json +1 -1
|
@@ -67,18 +67,11 @@ function resolveProjectRoot() {
|
|
|
67
67
|
|
|
68
68
|
/**
|
|
69
69
|
* Find the claude binary path.
|
|
70
|
-
*
|
|
71
|
-
*
|
|
70
|
+
* Shell aliases (like `cc`) are not available in child_process, so we
|
|
71
|
+
* resolve the actual binary via the user's login shell PATH.
|
|
72
72
|
*/
|
|
73
73
|
function findClaudeBinary() {
|
|
74
|
-
|
|
75
|
-
path.join(os.homedir(), '.npm-global', 'bin', 'claude'),
|
|
76
|
-
path.join(os.homedir(), '.local', 'bin', 'claude'),
|
|
77
|
-
'/usr/local/bin/claude',
|
|
78
|
-
'/opt/homebrew/bin/claude',
|
|
79
|
-
];
|
|
80
|
-
|
|
81
|
-
// Also try resolving via shell (handles PATH correctly)
|
|
74
|
+
// Primary: resolve via user's login shell (handles all install methods)
|
|
82
75
|
try {
|
|
83
76
|
const resolved = require('child_process')
|
|
84
77
|
.execSync('zsh -lc "which claude" 2>/dev/null', { encoding: 'utf8' })
|
|
@@ -87,16 +80,25 @@ function findClaudeBinary() {
|
|
|
87
80
|
return resolved;
|
|
88
81
|
}
|
|
89
82
|
} catch {
|
|
90
|
-
// fall through
|
|
83
|
+
// fall through
|
|
91
84
|
}
|
|
92
85
|
|
|
86
|
+
// Fallback: check common install locations
|
|
87
|
+
const candidates = [
|
|
88
|
+
'/usr/local/bin/claude',
|
|
89
|
+
'/opt/homebrew/bin/claude',
|
|
90
|
+
path.join(os.homedir(), '.npm-global', 'bin', 'claude'),
|
|
91
|
+
path.join(os.homedir(), '.local', 'bin', 'claude'),
|
|
92
|
+
path.join(os.homedir(), '.claude', 'bin', 'claude'),
|
|
93
|
+
];
|
|
94
|
+
|
|
93
95
|
for (const candidate of candidates) {
|
|
94
96
|
if (fs.existsSync(candidate)) {
|
|
95
97
|
return candidate;
|
|
96
98
|
}
|
|
97
99
|
}
|
|
98
100
|
|
|
99
|
-
// Last resort:
|
|
101
|
+
// Last resort: let the shell find it
|
|
100
102
|
return 'claude';
|
|
101
103
|
}
|
|
102
104
|
|