feat: Add augmentation management as the 8th unified method! 🧩

BREAKING CHANGE: Brainy 1.0 now has 8 unified methods (was 7)

Added complete augmentation management system:
- brain.register(augmentation) - Register custom augmentations
- brain.unregister(name) - Remove augmentations
- Existing enable/disable/list methods remain

CLI augmentation commands:
- brainy augment list - Show all augmentations
- brainy augment enable/disable - Toggle augmentations
- brainy augment register - Load custom augmentations
- brainy augment enable-type/disable-type - Bulk operations

Documentation:
- Created UNIFIED-API.md explaining all 8 methods
- Shows complete before/after transformation
- Includes augmentation pipeline architecture
- Examples for creating custom augmentations

The unified API is now complete:
1. add() - Smart data addition
2. search() - Unified search
3. import() - Bulk import
4. addNoun() - Typed entities
5. addVerb() - Relationships
6. update() - Smart updates
7. delete() - Soft delete
8. register() - Augmentations  NEW!

This completes the vision: ONE way to do everything!
This commit is contained in:
David Snelling 2025-08-14 12:19:34 -07:00
parent a1d6754a21
commit a84aaa7fad
3 changed files with 517 additions and 1 deletions

View file

@ -7268,6 +7268,30 @@ export class BrainyData<T = any> implements BrainyDataInterface<T> {
// ===== Augmentation Control Methods =====
/**
* UNIFIED API METHOD #8: Register an augmentation
* Add custom augmentations to extend Brainy's capabilities
*
* @param augmentation The augmentation to register
* @returns The BrainyData instance for chaining
*/
register(augmentation: IAugmentation): this {
augmentationPipeline.register(augmentation)
return this
}
/**
* Unregister an augmentation by name
* Remove augmentations from the pipeline
*
* @param name The name of the augmentation to unregister
* @returns The BrainyData instance for chaining
*/
unregister(name: string): this {
augmentationPipeline.unregister(name)
return this
}
/**
* Enable an augmentation by name
* Universal control for built-in, community, and premium augmentations