fix: add includeVFS parameter to getRelations() - VFS now visible
CRITICAL BUG FIX - VFS Files Were Completely Invisible
Workshop Team Issue:
- Import created 569 VFS files
- vfs.readdir('/') returned 0 items
- VFS was 100% unusable
Root Cause:
v4.4.0 added includeVFS to brain.find() but FORGOT brain.getRelations().
PathResolver.getChildren() calls getRelations() to find VFS relationships,
but those were being excluded by default - making ALL VFS files invisible!
Fix:
1. Add includeVFS parameter to GetRelationsParams interface
2. Wire includeVFS filtering in brain.getRelations()
- Excludes VFS relationships by default (metadata.isVFS != true)
- Include them when includeVFS: true
3. Update VFS to mark all relationships with metadata: { isVFS: true }
- 7 relate() calls updated in VirtualFileSystem.ts
4. Update PathResolver to use includeVFS: true
- resolveChild() line 200
- getChildren() line 229
Impact:
- VFS is now fully functional again
- Consistent with v4.4.0 architecture (VFS separate from knowledge graph)
- All APIs now have includeVFS where needed
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
2b38f8caba
commit
ae6fbd8c4c
4 changed files with 45 additions and 9 deletions
|
|
@ -1016,6 +1016,14 @@ export class Brainy<T = any> implements BrainyInterface<T> {
|
|||
filter.service = params.service
|
||||
}
|
||||
|
||||
// v4.5.1: Exclude VFS relationships by default (same pattern as brain.find())
|
||||
// VFS relationships have metadata.isVFS = true
|
||||
// Only include VFS relationships if explicitly requested
|
||||
if (params.includeVFS !== true) {
|
||||
filter.metadata = filter.metadata || {}
|
||||
filter.metadata.isVFS = { notEquals: true }
|
||||
}
|
||||
|
||||
// Fetch from storage with pagination at storage layer (efficient!)
|
||||
const result = await this.storage.getVerbs({
|
||||
pagination: {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue