brains-mcp 1.76.3 → 1.77.0
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/dist/httpServer.d.ts.map +1 -1
- package/dist/httpServer.js +9 -1
- package/dist/httpServer.js.map +1 -1
- package/dist/search/postgresIndex.d.ts +22 -0
- package/dist/search/postgresIndex.d.ts.map +1 -1
- package/dist/search/postgresIndex.js +36 -0
- package/dist/search/postgresIndex.js.map +1 -1
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +12 -1
- package/dist/server.js.map +1 -1
- package/dist/tools/importWikiZip.d.ts +5 -0
- package/dist/tools/importWikiZip.d.ts.map +1 -1
- package/dist/tools/importWikiZip.js +9 -0
- package/dist/tools/importWikiZip.js.map +1 -1
- package/dist/tools/stalePages.d.ts +29 -0
- package/dist/tools/stalePages.d.ts.map +1 -0
- package/dist/tools/stalePages.js +91 -0
- package/dist/tools/stalePages.js.map +1 -0
- package/package.json +1 -1
package/dist/httpServer.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"httpServer.d.ts","sourceRoot":"","sources":["../src/httpServer.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;AAQxB,OAAO,EAAsD,KAAK,aAAa,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"httpServer.d.ts","sourceRoot":"","sources":["../src/httpServer.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;AAQxB,OAAO,EAAsD,KAAK,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAmH7G,wBAAgB,8BAA8B,IAAI,IAAI,CAErD;AA+7BD;;;;;;;;;;;;GAYG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAI9D;AAgsBD,wBAAsB,eAAe,CAAC,KAAK,EAAE,aAAa,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAmrF9F"}
|
package/dist/httpServer.js
CHANGED
|
@@ -527,6 +527,9 @@ async function scanImportDiffFromBuffer(drive, buffer, opts) {
|
|
|
527
527
|
folderScope = scope.folderScope;
|
|
528
528
|
}
|
|
529
529
|
const diff = [];
|
|
530
|
+
// GH #366: per-file tolerance — record why each file was skipped instead of
|
|
531
|
+
// only exposing an opaque count.
|
|
532
|
+
const skipped = [];
|
|
530
533
|
let newCount = 0;
|
|
531
534
|
let modifiedCount = 0;
|
|
532
535
|
let unchangedCount = 0;
|
|
@@ -544,16 +547,19 @@ async function scanImportDiffFromBuffer(drive, buffer, opts) {
|
|
|
544
547
|
// Reject path-traversal and absolute-path entries before any filesystem access.
|
|
545
548
|
if (name.startsWith("/") || name.split("/").some((segment) => segment === "..")) {
|
|
546
549
|
diff.push({ name, status: "skipped" });
|
|
550
|
+
skipped.push({ path: name, reason: "path traversal (absolute path or '..' segment)" });
|
|
547
551
|
skippedCount++;
|
|
548
552
|
continue;
|
|
549
553
|
}
|
|
550
554
|
if (!opts.includeSystem && systemFiles.has(name)) {
|
|
551
555
|
diff.push({ name, status: "skipped" });
|
|
556
|
+
skipped.push({ path: name, reason: "system file (pass includeSystem: true to include)" });
|
|
552
557
|
skippedCount++;
|
|
553
558
|
continue;
|
|
554
559
|
}
|
|
555
560
|
if (!isValidWikiFilename(name)) {
|
|
556
561
|
diff.push({ name, status: "skipped" });
|
|
562
|
+
skipped.push({ path: name, reason: "unsupported file type (only lowercase .md wiki pages are supported)" });
|
|
557
563
|
skippedCount++;
|
|
558
564
|
continue;
|
|
559
565
|
}
|
|
@@ -574,6 +580,7 @@ async function scanImportDiffFromBuffer(drive, buffer, opts) {
|
|
|
574
580
|
}
|
|
575
581
|
if (effectiveConflictStrategy === "skip") {
|
|
576
582
|
diff.push({ name, status: "skipped" });
|
|
583
|
+
skipped.push({ path: name, reason: "already exists and conflictStrategy is 'skip'" });
|
|
577
584
|
skippedCount++;
|
|
578
585
|
continue;
|
|
579
586
|
}
|
|
@@ -599,7 +606,7 @@ async function scanImportDiffFromBuffer(drive, buffer, opts) {
|
|
|
599
606
|
}
|
|
600
607
|
}
|
|
601
608
|
}
|
|
602
|
-
return { totalEntries: entries.length, newCount, modifiedCount, unchangedCount, skippedCount, deletedCount, diff, folderScope };
|
|
609
|
+
return { totalEntries: entries.length, newCount, modifiedCount, unchangedCount, skippedCount, deletedCount, diff, skipped, folderScope };
|
|
603
610
|
}
|
|
604
611
|
/** Thrown by scanImportDiffFromBuffer when an unscoped replace is refused (GH #695 phase 4). */
|
|
605
612
|
class ImportScopeRefusedError extends Error {
|
|
@@ -3499,6 +3506,7 @@ export async function startHttpServer(drive, port) {
|
|
|
3499
3506
|
skippedCount: preview.skippedCount,
|
|
3500
3507
|
deletedCount: preview.deletedCount,
|
|
3501
3508
|
diff: preview.diff,
|
|
3509
|
+
skipped: preview.skipped,
|
|
3502
3510
|
},
|
|
3503
3511
|
});
|
|
3504
3512
|
}
|