@soulcraft/brainy 4.5.2 → 4.5.3
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.
|
@@ -106,10 +106,11 @@ export class VirtualFileSystem {
|
|
|
106
106
|
if (existing.length > 1) {
|
|
107
107
|
console.warn(`⚠️ Found ${existing.length} root entities! Using first one, consider cleanup.`);
|
|
108
108
|
// Sort by creation time - use oldest root (most likely to have children)
|
|
109
|
-
// v4.5.
|
|
109
|
+
// v4.5.3: FIX - createdAt is in entity object, not at Result level!
|
|
110
|
+
// brain.find() returns Result[], which has entity.createdAt, not top-level createdAt
|
|
110
111
|
existing.sort((a, b) => {
|
|
111
|
-
const aTime = a.createdAt || a.metadata?.modified || 0;
|
|
112
|
-
const bTime = b.createdAt || b.metadata?.modified || 0;
|
|
112
|
+
const aTime = a.entity?.createdAt || a.metadata?.modified || 0;
|
|
113
|
+
const bTime = b.entity?.createdAt || b.metadata?.modified || 0;
|
|
113
114
|
return aTime - bTime;
|
|
114
115
|
});
|
|
115
116
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@soulcraft/brainy",
|
|
3
|
-
"version": "4.5.
|
|
3
|
+
"version": "4.5.3",
|
|
4
4
|
"description": "Universal Knowledge Protocol™ - World's first Triple Intelligence database unifying vector, graph, and document search in one API. 31 nouns × 40 verbs for infinite expressiveness.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.js",
|