feat(vfs): fix VFS visibility by removing broken filtering

- Remove includeVFS parameter and broken isVFS filtering logic
- Add excludeVFS parameter for optional VFS entity filtering
- VFS entities now part of knowledge graph by default
- Enable O(1) graph adjacency optimizations for VFS operations
- Update all VFS projections and PathResolver
- Add comprehensive VFS visibility documentation

This fixes the bug where VFS operations returned empty results due to
operator object mismatch in storage adapters. VFS relationships now use
proper graph traversal without metadata filtering.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
David Snelling 2025-10-27 10:44:06 -07:00
parent 5c3d2e9b67
commit 8393d01209
9 changed files with 134 additions and 85 deletions

View file

@ -195,12 +195,11 @@ export class PathResolver {
// Still need to verify it exists
}
// Use proper graph traversal to find children
// Get all relationships where parentId contains other entities
// v4.7.0: Use proper graph traversal to find children
// VFS relationships are now part of the knowledge graph
const relations = await this.brain.getRelations({
from: parentId,
type: VerbType.Contains,
includeVFS: true // v4.5.1: Required to see VFS relationships
type: VerbType.Contains
})
// Find the child with matching name
@ -225,11 +224,11 @@ export class PathResolver {
* Uses proper graph relationships to traverse the tree
*/
async getChildren(dirId: string): Promise<VFSEntity[]> {
// Production-ready: Use graph relationships (VFS creates these in mkdir/writeFile)
// v4.7.0: Use O(1) graph relationships (VFS creates these in mkdir/writeFile)
// VFS relationships are now part of the knowledge graph (no special filtering needed)
const relations = await this.brain.getRelations({
from: dirId,
type: VerbType.Contains,
includeVFS: true // v4.5.1: Required to see VFS relationships
type: VerbType.Contains
})
const validChildren: VFSEntity[]= []