Extends the import progress callback system to provide real-time updates during the relationship building phase, eliminating the 1-2 minute silent period for large imports. New Features: - Progress callbacks now fire during relationship building (brain.relateMany) - New 'phase' field distinguishes 'extraction' vs 'relationships' phases - Chunk-based progress emission (<0.01% overhead for 573 relationships) - Works across all import paths: ImportCoordinator, SmartImportOrchestrator, UniversalImportAPI API Enhancements: - ImportProgress: Added 'phase' and 'current' fields - SmartImportProgress: Added 'relationships' phase - NeuralImportProgress: New interface for UniversalImportAPI - Refactored to use brain.relateMany() for batch operations Examples: - NEW: examples/import-with-progress.ts - Complete demo with progress bars and ETA - UPDATED: examples/complete-import-demo.ts - Shows both extraction and relationship phases Performance: - Minimal overhead: 6 callbacks for 573 relationships = 0.6ms / 5730ms = 0.01% - Chunk size: 100 relationships per batch (configurable) - Storage agnostic: Works with all adapters (FileSystem, S3, R2, GCS, Memory, OPFS, TypeAware) Backward Compatible: - All new fields are optional - Existing code continues to work unchanged - Zero breaking changes This addresses the UX issue where users couldn't tell if imports were frozen during the relationship building phase for large datasets. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| tests | ||
| api-server-example.ts | ||
| augmentations-zero-config.ts | ||
| bluesky-distributed-setup.js | ||
| brainy-backup.ts | ||
| complete-import-demo.ts | ||
| debug-vector-similarity.js | ||
| demo.ts | ||
| directory-import-with-caching.ts | ||
| hybrid-type-inference-demo.js | ||
| import-excel-pdf-csv.ts | ||
| import-with-progress.ts | ||
| monitor-cache-performance.ts | ||
| production-ready-demo.js | ||
| quick-import-test.ts | ||
| README.md | ||
| smart-import-example.ts | ||
| test-csv-performance.ts | ||
| test-deduplication.ts | ||
| test-excel-import.ts | ||
| test-excel-performance.ts | ||
| test-pdf-performance.ts | ||
| test-threshold-tuning.js | ||
| unified-import-example.ts | ||
Brainy Examples
This directory contains example code and test scripts for Brainy.
Structure
demo.ts- Basic demonstration of Brainy's core featurestests/- Various test scripts demonstrating different aspects of Brainy- Performance tests
- Memory tests
- Storage adapter tests
- API functionality tests
- CLI tests
Running Examples
Basic Demo
npm run build
node dist/examples/demo.js
Test Scripts
The scripts in tests/ are standalone Node.js scripts that can be run directly:
node examples/tests/test-simple.js
node examples/tests/test-core-functionality.js
Note
These are examples and test scripts for reference. For production use, see the main documentation in the project root.