nano-brain 2026.6.13 → 2026.6.15
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/package.json +1 -1
- package/src/watcher.ts +13 -5
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nano-brain",
|
|
3
|
-
"version": "2026.6.
|
|
3
|
+
"version": "2026.6.15",
|
|
4
4
|
"description": "Persistent memory and code intelligence for AI coding agents. Local MCP server with self-learning hybrid search (BM25 + vector + knowledge graph + LLM reranking), automatic session ingestion, codebase indexing, and 22 tools. Learns your preferences over time. Works with OpenCode, Claude, Cursor, Windsurf, and any MCP client.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
package/src/watcher.ts
CHANGED
|
@@ -329,7 +329,15 @@ export function startWatcher(options: WatcherOptions): Watcher {
|
|
|
329
329
|
|
|
330
330
|
const setupWatcher = () => {
|
|
331
331
|
const pathsToWatch: string[] = []
|
|
332
|
-
const
|
|
332
|
+
const SKIP_DIRS = new Set(['node_modules', '.git', 'dist', 'build', '.next', '.nuxt', '__pycache__', '.venv', 'venv', '.tox', 'target', 'vendor', '.bundle'])
|
|
333
|
+
const ignoredPatterns: (string | RegExp | ((path: string) => boolean))[] = [
|
|
334
|
+
(p: string) => {
|
|
335
|
+
const base = path.basename(p)
|
|
336
|
+
if (SKIP_DIRS.has(base)) return true
|
|
337
|
+
if (base.startsWith('.') && base !== '.nano-brain') return true
|
|
338
|
+
return false
|
|
339
|
+
},
|
|
340
|
+
]
|
|
333
341
|
for (const collection of collections) {
|
|
334
342
|
const expandedPath = collection.path.replace(/^~/, os.homedir())
|
|
335
343
|
if (fs.existsSync(expandedPath)) {
|
|
@@ -337,10 +345,6 @@ export function startWatcher(options: WatcherOptions): Watcher {
|
|
|
337
345
|
watchedPaths.add(expandedPath)
|
|
338
346
|
}
|
|
339
347
|
}
|
|
340
|
-
// NOTE: We intentionally do NOT watch the workspace root for codebase changes.
|
|
341
|
-
// Large workspaces (e.g. 30+ subprojects, 8000+ dirs) exhaust OS file descriptor
|
|
342
|
-
// limits even with node_modules excluded. Codebase changes are picked up by the
|
|
343
|
-
// poll-based reindex cycle instead (pollIntervalMs, default 5min).
|
|
344
348
|
if (codebaseConfig?.enabled) {
|
|
345
349
|
log('watcher', 'Codebase watching uses poll-based reindex (not fs.watch) to avoid EMFILE on large workspaces')
|
|
346
350
|
}
|
|
@@ -358,11 +362,15 @@ export function startWatcher(options: WatcherOptions): Watcher {
|
|
|
358
362
|
ignored: ignoredPatterns,
|
|
359
363
|
persistent: true,
|
|
360
364
|
ignoreInitial: true,
|
|
365
|
+
usePolling: true,
|
|
366
|
+
interval: 5000,
|
|
367
|
+
binaryInterval: 10000,
|
|
361
368
|
awaitWriteFinish: {
|
|
362
369
|
stabilityThreshold: 100,
|
|
363
370
|
pollInterval: 100,
|
|
364
371
|
},
|
|
365
372
|
})
|
|
373
|
+
log('watcher', `Watching ${deduped.length} collection paths (polling mode)`)
|
|
366
374
|
watcher.on('error', (err: unknown) => {
|
|
367
375
|
log('watcher', `Error: ${err instanceof Error ? err.message : String(err)}`, 'error')
|
|
368
376
|
})
|