brainy/src/vfs/index.ts

24 lines
714 B
TypeScript
Raw Normal View History

feat: implement complete VFS with Knowledge Layer integration Add production-ready Virtual File System with intelligent Knowledge Layer: Core VFS Features: - Complete file system operations (read, write, mkdir, etc.) - Intelligent PathResolver with 4-layer caching system - Chunked storage for large files with real compression - Embedding generation for semantic operations - File relationships and metadata tracking - Import functionality from local filesystem Knowledge Layer Integration: - EventRecorder for complete file history and temporal coupling - SemanticVersioning with content-based change detection - PersistentEntitySystem for character/entity tracking across files - ConceptSystem for universal concept mapping and graphs - GitBridge for import/export between VFS and Git repositories Architecture: - KnowledgeAugmentation properly integrated into Brainy augmentation system - KnowledgeLayer wrapper provides real-time VFS operation interception - Background processing ensures VFS operations remain fast - All components use real Brainy embed() method for embeddings - Support for creative writing, coding projects, and project management Technical Implementation: - Fixed all stub/mock implementations with real working code - TypeScript compilation passes without errors - Comprehensive test suite demonstrating all features - Documentation covering architecture and usage patterns - Backwards compatible with existing Brainy functionality This enables scenarios like writing books with persistent characters, managing coding projects with concept tracking, and complete project coordination with intelligent file relationships.
2025-09-24 17:31:48 -07:00
/**
* Brainy Virtual Filesystem
*
* A simplified fs-compatible filesystem that stores data in Brainy
* Works across all storage adapters and scales to millions of files
*/
// Core VFS
export { VirtualFileSystem } from './VirtualFileSystem.js'
export { PathResolver } from './PathResolver.js'
export * from './types.js'
// fs compatibility layer
export { FSCompat, createFS } from './FSCompat.js'
// Directory import
export { DirectoryImporter } from './importers/DirectoryImporter.js'
// Streaming
export { VFSReadStream } from './streams/VFSReadStream.js'
export { VFSWriteStream } from './streams/VFSWriteStream.js'
// Convenience alias
export { VirtualFileSystem as VFS } from './VirtualFileSystem.js'