2ndbrain 2026.1.34 → 2026.1.35

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.
@@ -15,7 +15,11 @@
15
15
  "Bash(node:*)",
16
16
  "Bash(ls -la \"c:\\\\dev\\\\fingerskier\\\\agent\\\\2ndbrain\\\\src\\\\web\"\" 2>/dev/null || echo \"web directory not found \")",
17
17
  "Bash(ls -la \"c:\\\\dev\\\\fingerskier\\\\agent\\\\2ndbrain\\\\db\"\" 2>/dev/null || echo \"Directory not accessible \")",
18
- "Bash(npm install:*)"
18
+ "Bash(npm install:*)",
19
+ "mcp__dude__get_project_context",
20
+ "mcp__dude__create_project",
21
+ "mcp__dude__create_issue",
22
+ "mcp__dude__update_issue"
19
23
  ]
20
24
  }
21
25
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "2ndbrain",
3
- "version": "2026.1.34",
3
+ "version": "2026.1.35",
4
4
  "description": "Always-on Node.js service bridging Telegram messaging to Claude AI with knowledge graph, journal, project management, and semantic search.",
5
5
  "main": "src/index.js",
6
6
  "bin": {
package/src/config.js CHANGED
@@ -7,9 +7,22 @@ import { fileURLToPath } from 'node:url';
7
7
  const __filename = fileURLToPath(import.meta.url);
8
8
  const __dirname = path.dirname(__filename);
9
9
  const PROJECT_ROOT = path.resolve(__dirname, '..');
10
- const ENV_PATH = path.join(PROJECT_ROOT, '.env');
10
+ const SETTINGS_DIR = path.join(os.homedir(), '.2ndbrain');
11
+ const ENV_PATH = path.join(SETTINGS_DIR, '.env');
12
+ const LEGACY_ENV_PATH = path.join(PROJECT_ROOT, '.env');
11
13
 
12
- // Load .env from project root
14
+ // Migrate legacy .env from package root to stable user directory
15
+ if (!fs.existsSync(ENV_PATH) && fs.existsSync(LEGACY_ENV_PATH)) {
16
+ try {
17
+ fs.mkdirSync(SETTINGS_DIR, { recursive: true });
18
+ fs.copyFileSync(LEGACY_ENV_PATH, ENV_PATH);
19
+ } catch { /* fall through to first-run */ }
20
+ }
21
+
22
+ // Ensure settings directory exists
23
+ try { fs.mkdirSync(SETTINGS_DIR, { recursive: true }); } catch { /* ignore */ }
24
+
25
+ // Load .env from stable user directory
13
26
  dotenvConfig({ path: ENV_PATH });
14
27
 
15
28
  const env = process.env;
@@ -99,5 +112,5 @@ function isFirstRun() {
99
112
  return !valid;
100
113
  }
101
114
 
102
- export { config, validateConfig, isFirstRun, PROJECT_ROOT, ENV_PATH };
115
+ export { config, validateConfig, isFirstRun, PROJECT_ROOT, ENV_PATH, SETTINGS_DIR };
103
116
  export default config;
package/src/web/server.js CHANGED
@@ -4,11 +4,10 @@ import fs from 'node:fs';
4
4
  import path from 'node:path';
5
5
  import { fileURLToPath } from 'node:url';
6
6
  import { migrate, getMigrationFiles, ensureMigrationsTable } from '../db/migrate.js';
7
+ import { ENV_PATH } from '../config.js';
7
8
 
8
- // Resolve project root (two directories up from src/web/)
9
9
  const __filename = fileURLToPath(import.meta.url);
10
10
  const __dirname = path.dirname(__filename);
11
- const DEFAULT_ENV_PATH = path.resolve(__dirname, '..', '..', '.env');
12
11
 
13
12
  // ---------------------------------------------------------------------------
14
13
  // Settings field definitions -- drives both the form UI and save logic
@@ -107,7 +106,7 @@ class WebServer {
107
106
  this._logger = logger;
108
107
  this._server = null;
109
108
  this._app = null;
110
- this._envPath = config.ENV_PATH || DEFAULT_ENV_PATH;
109
+ this._envPath = ENV_PATH;
111
110
  }
112
111
 
113
112
  /**