@soulcraft/brainy 5.7.12 → 5.7.13
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/CHANGELOG.md +7 -0
- package/dist/brainy.js +19 -37
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
### [5.7.13](https://github.com/soulcraftlabs/brainy/compare/v5.7.12...v5.7.13) (2025-11-14)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### 🐛 Bug Fixes
|
|
9
|
+
|
|
10
|
+
* resolve excludeVFS architectural bug across all query paths (v5.7.13) ([e57e947](https://github.com/soulcraftlabs/brainy/commit/e57e9474986097f37e89a8dbfa868005368d645c))
|
|
11
|
+
|
|
5
12
|
### [5.7.12](https://github.com/soulcraftlabs/brainy/compare/v5.7.11...v5.7.12) (2025-11-13)
|
|
6
13
|
|
|
7
14
|
|
package/dist/brainy.js
CHANGED
|
@@ -1164,41 +1164,6 @@ export class Brainy {
|
|
|
1164
1164
|
Object.assign(filter, params.where);
|
|
1165
1165
|
if (params.service)
|
|
1166
1166
|
filter.service = params.service;
|
|
1167
|
-
// v5.7.12: excludeVFS helper - ONLY exclude VFS infrastructure entities
|
|
1168
|
-
// Bug fix: Previously excluded entities with ANY vfsType field
|
|
1169
|
-
// Now ONLY excludes entities with isVFSEntity: true OR vfsType: 'file'/'directory'
|
|
1170
|
-
// This allows extracted entities (concepts/people/etc) to be included even if they
|
|
1171
|
-
// have vfsPath metadata showing where they were imported from
|
|
1172
|
-
if (params.excludeVFS === true) {
|
|
1173
|
-
// Build filter: EXCLUDE WHERE (isVFSEntity == true) OR (vfsType IN ['file', 'directory'])
|
|
1174
|
-
// Implementation: INCLUDE WHERE (isVFSEntity missing/false) AND (vfsType missing/not file or directory)
|
|
1175
|
-
const existingFilter = { ...filter };
|
|
1176
|
-
filter = {
|
|
1177
|
-
allOf: [
|
|
1178
|
-
existingFilter,
|
|
1179
|
-
{
|
|
1180
|
-
// Only include entities WITHOUT isVFSEntity: true
|
|
1181
|
-
anyOf: [
|
|
1182
|
-
{ isVFSEntity: { exists: false } },
|
|
1183
|
-
{ isVFSEntity: { ne: true } }
|
|
1184
|
-
]
|
|
1185
|
-
},
|
|
1186
|
-
{
|
|
1187
|
-
// Only include entities WITHOUT vfsType: 'file' or 'directory'
|
|
1188
|
-
// Since VFS files ALWAYS have vfsType set, we check it's missing OR not file/dir
|
|
1189
|
-
anyOf: [
|
|
1190
|
-
{ vfsType: { exists: false } },
|
|
1191
|
-
{
|
|
1192
|
-
allOf: [
|
|
1193
|
-
{ vfsType: { ne: 'file' } },
|
|
1194
|
-
{ vfsType: { ne: 'directory' } }
|
|
1195
|
-
]
|
|
1196
|
-
}
|
|
1197
|
-
]
|
|
1198
|
-
}
|
|
1199
|
-
]
|
|
1200
|
-
};
|
|
1201
|
-
}
|
|
1202
1167
|
if (params.type) {
|
|
1203
1168
|
const types = Array.isArray(params.type) ? params.type : [params.type];
|
|
1204
1169
|
if (types.length === 1) {
|
|
@@ -1213,6 +1178,19 @@ export class Brainy {
|
|
|
1213
1178
|
};
|
|
1214
1179
|
}
|
|
1215
1180
|
}
|
|
1181
|
+
// v5.7.13: excludeVFS helper - ONLY exclude VFS infrastructure entities
|
|
1182
|
+
// Applied AFTER type filter to avoid execution order bugs
|
|
1183
|
+
// Excludes entities where:
|
|
1184
|
+
// - vfsType is 'file' or 'directory' (VFS files/folders)
|
|
1185
|
+
// - isVFSEntity is true (explicitly marked as VFS)
|
|
1186
|
+
// Includes extracted entities (person/concept/etc) even if they have vfsPath metadata
|
|
1187
|
+
if (params.excludeVFS === true) {
|
|
1188
|
+
// VFS infrastructure entities ALWAYS have vfsType set
|
|
1189
|
+
// Extracted entities do NOT have vfsType (undefined)
|
|
1190
|
+
filter.vfsType = { exists: false };
|
|
1191
|
+
// Extra safety: exclude entities explicitly marked as VFS
|
|
1192
|
+
filter.isVFSEntity = { ne: true };
|
|
1193
|
+
}
|
|
1216
1194
|
// v4.5.4: Apply sorting if requested, otherwise just filter
|
|
1217
1195
|
let filteredIds;
|
|
1218
1196
|
if (params.orderBy) {
|
|
@@ -1240,10 +1218,12 @@ export class Brainy {
|
|
|
1240
1218
|
if (!hasVectorSearchCriteria && !hasFilterCriteria && !hasGraphCriteria) {
|
|
1241
1219
|
const limit = params.limit || 20;
|
|
1242
1220
|
const offset = params.offset || 0;
|
|
1243
|
-
//
|
|
1221
|
+
// v5.7.13: excludeVFS helper - exclude VFS infrastructure entities
|
|
1222
|
+
// VFS files/folders have vfsType set, extracted entities do NOT
|
|
1244
1223
|
let filter = {};
|
|
1245
1224
|
if (params.excludeVFS === true) {
|
|
1246
1225
|
filter.vfsType = { exists: false };
|
|
1226
|
+
filter.isVFSEntity = { ne: true };
|
|
1247
1227
|
}
|
|
1248
1228
|
// Use metadata index if we need to filter
|
|
1249
1229
|
if (Object.keys(filter).length > 0) {
|
|
@@ -1308,9 +1288,11 @@ export class Brainy {
|
|
|
1308
1288
|
Object.assign(filter, params.where);
|
|
1309
1289
|
if (params.service)
|
|
1310
1290
|
filter.service = params.service;
|
|
1311
|
-
//
|
|
1291
|
+
// v5.7.13: excludeVFS helper - exclude VFS infrastructure entities
|
|
1292
|
+
// VFS files/folders have vfsType set, extracted entities do NOT
|
|
1312
1293
|
if (params.excludeVFS === true) {
|
|
1313
1294
|
filter.vfsType = { exists: false };
|
|
1295
|
+
filter.isVFSEntity = { ne: true };
|
|
1314
1296
|
}
|
|
1315
1297
|
if (params.type) {
|
|
1316
1298
|
const types = Array.isArray(params.type) ? params.type : [params.type];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@soulcraft/brainy",
|
|
3
|
-
"version": "5.7.
|
|
3
|
+
"version": "5.7.13",
|
|
4
4
|
"description": "Universal Knowledge Protocol™ - World's first Triple Intelligence database unifying vector, graph, and document search in one API. Stage 3 CANONICAL: 42 nouns × 127 verbs covering 96-97% of all human knowledge.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.js",
|