nano-brain 2026.8.7 → 2026.8.8
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/codebase.ts +6 -5
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nano-brain",
|
|
3
|
-
"version": "2026.8.
|
|
3
|
+
"version": "2026.8.8",
|
|
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/codebase.ts
CHANGED
|
@@ -322,10 +322,11 @@ export async function indexCodebase(
|
|
|
322
322
|
const content = fs.readFileSync(filePath, 'utf-8')
|
|
323
323
|
const contentSize = Buffer.byteLength(content, 'utf-8')
|
|
324
324
|
const hash = computeHash(content)
|
|
325
|
-
const
|
|
325
|
+
const docPath = filePath.startsWith(workspaceRoot + '/') ? filePath.slice(workspaceRoot.length + 1) : filePath
|
|
326
|
+
const existingDoc = store.findDocument(docPath)
|
|
326
327
|
if (existingDoc && existingDoc.hash === hash) {
|
|
327
328
|
filesSkippedUnchanged++
|
|
328
|
-
activePaths.push(
|
|
329
|
+
activePaths.push(docPath)
|
|
329
330
|
scannedFiles.push({ path: filePath, content })
|
|
330
331
|
continue
|
|
331
332
|
}
|
|
@@ -334,7 +335,7 @@ export async function indexCodebase(
|
|
|
334
335
|
if (currentStorageUsed + netIncrease > effectiveMaxSize) {
|
|
335
336
|
filesSkippedBudget++
|
|
336
337
|
if (existingDoc) {
|
|
337
|
-
activePaths.push(
|
|
338
|
+
activePaths.push(docPath)
|
|
338
339
|
}
|
|
339
340
|
continue
|
|
340
341
|
}
|
|
@@ -355,7 +356,7 @@ export async function indexCodebase(
|
|
|
355
356
|
const now = new Date().toISOString()
|
|
356
357
|
store.insertDocument({
|
|
357
358
|
collection: 'codebase',
|
|
358
|
-
path:
|
|
359
|
+
path: docPath,
|
|
359
360
|
title,
|
|
360
361
|
hash,
|
|
361
362
|
createdAt: existingDoc?.createdAt ?? now,
|
|
@@ -391,7 +392,7 @@ export async function indexCodebase(
|
|
|
391
392
|
|
|
392
393
|
currentStorageUsed += netIncrease
|
|
393
394
|
filesIndexed++
|
|
394
|
-
activePaths.push(
|
|
395
|
+
activePaths.push(docPath)
|
|
395
396
|
scannedFiles.push({ path: filePath, content })
|
|
396
397
|
} catch {
|
|
397
398
|
continue
|