@soulcraft/brainy 4.5.1 → 4.5.2

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,9 +106,10 @@ 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.2: FIX - createdAt is at entity level, not metadata level!
109
110
  existing.sort((a, b) => {
110
- const aTime = a.metadata?.createdAt || a.metadata?.modified || 0;
111
- const bTime = b.metadata?.createdAt || b.metadata?.modified || 0;
111
+ const aTime = a.createdAt || a.metadata?.modified || 0;
112
+ const bTime = b.createdAt || b.metadata?.modified || 0;
112
113
  return aTime - bTime;
113
114
  });
114
115
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@soulcraft/brainy",
3
- "version": "4.5.1",
3
+ "version": "4.5.2",
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",