feat: add distributed architecture with sharding and coordination

- Wire up distributed components (Coordinator, ShardManager, CacheSync)
- Implement automatic sharding for S3 storage (256 shards)
- Add read/write separation for operational modes
- Zero-config automatic detection for distributed mode
- Add mutex implementation for thread safety
- Fix metadata filtering in find operations
- Fix neural API vector similarity calculations
- Improve batch operations performance
- Add Bluesky distributed setup example

BREAKING CHANGE: None - backward compatible
This commit is contained in:
David Snelling 2025-09-22 15:45:35 -07:00
parent 8aafc769a3
commit ed64c266ec
30 changed files with 2084 additions and 439 deletions

View file

@ -13,6 +13,7 @@ describe('Brainy Built-in Augmentations', () => {
beforeEach(async () => {
brain = new Brainy({
storage: { type: 'memory' },
augmentations: {
cache: { enabled: true, maxSize: 1000 },
display: { enabled: true },
@ -478,6 +479,7 @@ describe('Brainy Built-in Augmentations', () => {
it('should respect augmentation configuration', async () => {
// Test that augmentations can be configured
const configuredBrain = new Brainy({
storage: { type: 'memory' },
augmentations: {
cache: {
enabled: true,
@ -509,6 +511,7 @@ describe('Brainy Built-in Augmentations', () => {
it('should work with disabled augmentations', async () => {
const minimalBrain = new Brainy({
storage: { type: 'memory' },
augmentations: {
cache: { enabled: false },
display: { enabled: false },