feat: add comprehensive zero-config validation system

- Implement self-configuring validation that adapts to system resources
- Add validation for all CRUD operations (add, update, delete, find, relate)
- Auto-configure limits based on available memory (1GB = 10K limit, 8GB = 80K)
- Monitor and auto-tune performance based on query response times
- Fix multiple type filtering with proper anyOf structure
- Enhance type safety by requiring NounType/VerbType enums
- Fix tests to validate correct behavior (no fake implementations)
- Add comprehensive VALIDATION.md documentation
- Update API_REFERENCE.md with validation rules and examples
- Clarify metadata update behavior (null keeps existing, {} clears)

BREAKING CHANGE: getFieldsForType() now requires NounType enum instead of string

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
David Snelling 2025-09-12 14:37:39 -07:00
parent e9a2c41b0a
commit 7eaf5a9252
12 changed files with 979 additions and 76 deletions

View file

@ -201,7 +201,7 @@ describe('Brainy.relate()', () => {
from: entity1Id,
to: entity2Id,
type: 'invalidType' as any
})).rejects.toThrow('Invalid verb type')
})).rejects.toThrow('invalid VerbType')
})
it('should handle missing required parameters', async () => {