synabun 2026.4.26-beta.14 → 2026.4.26-beta.16
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/neural-interface/server.js +27 -13
- package/package.json +1 -1
|
@@ -2556,9 +2556,14 @@ function getClaudeBin() {
|
|
|
2556
2556
|
// Might be a bare command in PATH — try which/where
|
|
2557
2557
|
try {
|
|
2558
2558
|
const envWithPath = { ...process.env, PATH: getAugmentedPath() };
|
|
2559
|
-
|
|
2560
|
-
|
|
2561
|
-
|
|
2559
|
+
let lookup;
|
|
2560
|
+
if (process.platform === 'win32') {
|
|
2561
|
+
const lines = execSync(`where "${userCmd}"`, { encoding: 'utf-8', env: envWithPath })
|
|
2562
|
+
.split(/\r?\n/).map(l => l.trim()).filter(Boolean);
|
|
2563
|
+
lookup = lines.find(l => /\.(cmd|exe|bat|ps1)$/i.test(l)) || lines[0];
|
|
2564
|
+
} else {
|
|
2565
|
+
lookup = execSync(`which "${userCmd}"`, { encoding: 'utf-8', env: envWithPath }).trim();
|
|
2566
|
+
}
|
|
2562
2567
|
if (lookup) { _claudeBinPath = lookup; return _claudeBinPath; }
|
|
2563
2568
|
} catch {}
|
|
2564
2569
|
}
|
|
@@ -2596,8 +2601,12 @@ function getClaudeBin() {
|
|
|
2596
2601
|
// 2. Fall back to global install via which/where (with augmented PATH)
|
|
2597
2602
|
const envWithPath = { ...process.env, PATH: getAugmentedPath() };
|
|
2598
2603
|
if (process.platform === 'win32') {
|
|
2599
|
-
try {
|
|
2600
|
-
|
|
2604
|
+
try {
|
|
2605
|
+
const lines = execSync('where claude', { encoding: 'utf-8', env: envWithPath })
|
|
2606
|
+
.split(/\r?\n/).map(l => l.trim()).filter(Boolean);
|
|
2607
|
+
// Prefer .cmd/.exe/.bat/.ps1 over the bare extensionless shim (which is a sh script Windows can't spawn)
|
|
2608
|
+
_claudeBinPath = lines.find(l => /\.(cmd|exe|bat|ps1)$/i.test(l)) || lines[0] || null;
|
|
2609
|
+
} catch { _claudeBinPath = null; }
|
|
2601
2610
|
} else {
|
|
2602
2611
|
try { _claudeBinPath = execSync('which claude', { encoding: 'utf-8', env: envWithPath }).trim(); }
|
|
2603
2612
|
catch { _claudeBinPath = null; }
|
|
@@ -10908,6 +10917,7 @@ function detectInstallSource(binPath) {
|
|
|
10908
10917
|
if (/\/node_modules\//.test(p) || /\/npm\/node_modules\//.test(p)) return 'npm';
|
|
10909
10918
|
if (p.includes('/opt/homebrew/') || p.includes('/usr/local/cellar/') || /\/homebrew\//.test(p)) return 'brew';
|
|
10910
10919
|
if (p.includes('/.claude/local/') || p.includes('/anthropicclaude/')) return 'native';
|
|
10920
|
+
if (/\/\.local\/bin\//.test(p)) return 'native';
|
|
10911
10921
|
if (/\/program files( \(x86\))?\//.test(p) || /\/localappdata\/.*anthropicclaude/.test(p)) return 'native';
|
|
10912
10922
|
if (p.includes('/winget/') || p.includes('/microsoft/winget/')) return 'winget';
|
|
10913
10923
|
if (/\/usr\/local\/lib\/node_modules\//.test(p)) return 'npm';
|
|
@@ -11036,15 +11046,19 @@ async function checkToolVersions() {
|
|
|
11036
11046
|
}
|
|
11037
11047
|
|
|
11038
11048
|
// Nuclear safety net for the recurring claude phantom-version bug:
|
|
11039
|
-
//
|
|
11040
|
-
//
|
|
11041
|
-
//
|
|
11042
|
-
//
|
|
11043
|
-
if (
|
|
11049
|
+
// only reject when binary path detection failed (truly phantom). If we
|
|
11050
|
+
// resolved a path AND it's outside SynaBun's own dirs, trust the version
|
|
11051
|
+
// — Anthropic ships these versions in the native installer too, so a
|
|
11052
|
+
// version-only blacklist hits legit installs at ~/.local/bin/claude.exe.
|
|
11053
|
+
if (
|
|
11054
|
+
tool.key === 'claude-code' &&
|
|
11055
|
+
installed &&
|
|
11056
|
+
KNOWN_STALE_CLAUDE_VERSIONS.has(installed) &&
|
|
11057
|
+
!probedBinPath
|
|
11058
|
+
) {
|
|
11044
11059
|
console.warn(
|
|
11045
|
-
` [version-guard] Rejected claude v${installed} from
|
|
11046
|
-
` — matches known-stale SynaBun bundle
|
|
11047
|
-
`If you actually have this version installed, remove it from KNOWN_STALE_CLAUDE_VERSIONS.`
|
|
11060
|
+
` [version-guard] Rejected claude v${installed} from (unknown path)` +
|
|
11061
|
+
` — matches known-stale SynaBun bundle and no binary path could be resolved.`
|
|
11048
11062
|
);
|
|
11049
11063
|
installed = null;
|
|
11050
11064
|
}
|