chore(8.0): final pre-RC1 sweep — API consistency, named errors, orphans, zero-cast codebase

This commit is contained in:
David Snelling 2026-06-11 14:51:00 -07:00
parent 970e08c466
commit 1f7e365a4e
237 changed files with 1951 additions and 49413 deletions

View file

@ -1,7 +1,7 @@
/**
* Path Resolution System with High-Performance Caching
*
* PRODUCTION-READY path resolution for VFS
* Path resolution for the VFS
* Handles millions of paths efficiently with multi-layer caching
*/
@ -201,8 +201,9 @@ export class PathResolver {
* Falls back to graph traversal if MetadataIndex unavailable
*/
private async resolveWithMetadataIndex(path: string): Promise<string> {
// Access MetadataIndexManager from brain instance (not storage — metadataIndex lives on Brainy)
const metadataIndex = (this.brain as any).metadataIndex
// Access MetadataIndexManager from brain instance (not storage — metadataIndex
// lives on Brainy). Bracket access reaches the private field.
const metadataIndex = this.brain['metadataIndex']
if (!metadataIndex) {
// MetadataIndex not available, use graph traversal
@ -256,7 +257,7 @@ export class PathResolver {
// Use proper graph traversal to find children
// VFS relationships are now part of the knowledge graph
const relations = await this.brain.getRelations({
const relations = await this.brain.related({
from: parentId,
type: VerbType.Contains
})
@ -293,7 +294,7 @@ export class PathResolver {
async getChildren(dirId: string): Promise<VFSEntity[]> {
// 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({
const relations = await this.brain.related({
from: dirId,
type: VerbType.Contains
})