@nano-step/nano-brain 2026.6.305 → 2026.6.306

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.
Files changed (2) hide show
  1. package/npm/run.js +17 -0
  2. package/package.json +1 -1
package/npm/run.js CHANGED
@@ -9,6 +9,23 @@ const os = require("os");
9
9
  const binName = os.platform() === "win32" ? "nano-brain.exe" : "nano-brain";
10
10
  const binPath = path.join(__dirname, binName);
11
11
 
12
+ const envBin = process.env.NANO_BRAIN_BIN;
13
+ if (envBin && envBin.trim() !== "") {
14
+ const trimmed = envBin.trim();
15
+ if (!fs.existsSync(trimmed)) {
16
+ process.stderr.write(`Error: NANO_BRAIN_BIN points to ${trimmed} which does not exist. Unset the variable or correct the path.\n`);
17
+ process.exit(1);
18
+ }
19
+ const mode = fs.statSync(trimmed).mode;
20
+ if ((mode & 0o111) === 0) {
21
+ process.stderr.write(`Error: NANO_BRAIN_BIN points to ${trimmed} which is not executable. Run: chmod +x ${trimmed}\n`);
22
+ process.exit(1);
23
+ }
24
+ try { execFileSync(trimmed, process.argv.slice(2), { stdio: "inherit" }); }
25
+ catch (e) { process.exit(e.status || 1); }
26
+ process.exit(0);
27
+ }
28
+
12
29
  if (!fs.existsSync(binPath)) {
13
30
  console.error("nano-brain binary not found at " + binPath + ".");
14
31
  console.error("The postinstall script may have failed during npm install.");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nano-step/nano-brain",
3
- "version": "2026.6.305",
3
+ "version": "2026.6.306",
4
4
  "description": "Persistent memory and code intelligence for AI coding agents",
5
5
  "bin": {
6
6
  "nano-brain": "npm/run.js"