synabun 2026.4.20-beta.6 → 2026.4.20-beta.7

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.
@@ -9841,9 +9841,18 @@ function isInsideSynabun(binPath) {
9841
9841
  }
9842
9842
  }
9843
9843
 
9844
+ // Versions of @anthropic-ai/claude-code that SynaBun has historically shipped
9845
+ // as a bundled dependency. If a `claude --version` probe returns one of these,
9846
+ // it's almost certainly the stale bundle (a real user-global install would be
9847
+ // the current 2.1.116+). Reject hard regardless of where the binary path looks
9848
+ // to come from. Add new versions here if SynaBun ever ships claude-code again.
9849
+ const KNOWN_STALE_CLAUDE_VERSIONS = new Set(['2.1.71', '2.1.89', '2.1.91']);
9850
+
9844
9851
  // Aggressively delete any stale bundled CLI tool packages left over in our
9845
9852
  // own node_modules. Idempotent — runs on every startup. Belt-and-suspenders
9846
9853
  // against `npm install` not auto-pruning packages removed from package.json.
9854
+ // Logs every found package (deleted or not) so Windows users can confirm the
9855
+ // prune is actually firing on their box.
9847
9856
  function pruneBundledCliTools() {
9848
9857
  const stalePkgs = ['@anthropic-ai/claude-code', '@openai/codex', 'opencode-ai', '@google/gemini-cli'];
9849
9858
  const moduleRoots = [
@@ -9897,6 +9906,20 @@ async function checkToolVersions() {
9897
9906
  } catch { /* not installed or errored */ }
9898
9907
  }
9899
9908
 
9909
+ // Nuclear safety net for the recurring claude phantom-version bug:
9910
+ // if the probe returned a known historical bundled version of claude-code,
9911
+ // reject it even if the binary-path detection failed. A real user-global
9912
+ // install of claude is always current (2.1.116+), so seeing 2.1.89 etc.
9913
+ // means we're reading a stale bundle SynaBun shipped in a prior release.
9914
+ if (tool.key === 'claude-code' && installed && KNOWN_STALE_CLAUDE_VERSIONS.has(installed)) {
9915
+ console.warn(
9916
+ ` [version-guard] Rejected claude v${installed} from ${probedBinPath || '(unknown path)'}` +
9917
+ ` — matches known-stale SynaBun bundle. Treating as not installed. ` +
9918
+ `If you actually have this version installed, remove it from KNOWN_STALE_CLAUDE_VERSIONS.`
9919
+ );
9920
+ installed = null;
9921
+ }
9922
+
9900
9923
  let latest = null;
9901
9924
  try {
9902
9925
  const controller = new AbortController();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "synabun",
3
- "version": "2026.4.20-beta.6",
3
+ "version": "2026.4.20-beta.7",
4
4
  "description": "Persistent vector memory for AI assistants",
5
5
  "license": "Apache-2.0",
6
6
  "author": "The SynaBun Authors",