brainy/.recovery-workspace/dist-backup-20250910-141917/augmentationManager.js
David Snelling 8ff382ca3b chore: recovery checkpoint - v3.0 API successfully recovered
CRITICAL CHECKPOINT - DO NOT PUSH TO GITHUB

Recovery Status:
- Successfully recovered brainy.ts from compiled JavaScript
- All core v3.0 API methods functional (add, get, update, delete, relate, find, etc.)
- Neural subsystem intact (562KB embedded patterns, NLP working)
- Augmentation pipeline operational (20+ augmentations)
- HNSW clustering system complete
- Triple Intelligence compiled (needs constructor fix)
- Test suite validates functionality

Changes preserved:
- 898 files with changes from last 3 days
- 144,475 insertions
- All augmentation improvements
- All test coverage enhancements
- Complete v3.0 feature set

This is a LOCAL checkpoint only - contains recovered work after corruption incident.
Created backup in .backups/brainy-full-20250910-151314.tar.gz

Branch: recovery-checkpoint-20250910-151433
Date: Wed Sep 10 03:18:04 PM PDT 2025
2025-09-10 15:18:04 -07:00

117 lines
No EOL
3.3 KiB
JavaScript

/**
* Type-safe augmentation management system for Brainy
* Provides a clean API for managing augmentations without string literals
*/
import { augmentationPipeline } from './augmentationPipeline.js';
/**
* Type-safe augmentation manager
* Accessed via brain.augmentations for all management operations
*/
export class AugmentationManager {
constructor() {
this.pipeline = augmentationPipeline;
}
/**
* List all registered augmentations with their status
* @returns Array of augmentation information
*/
list() {
// Deprecated: use brain.augmentations instead
return [];
}
/**
* Get information about a specific augmentation
* @param name The augmentation name
* @returns Augmentation info or undefined if not found
*/
get(name) {
const all = this.list();
return all.find(a => a.name === name);
}
/**
* Check if an augmentation is enabled
* @param name The augmentation name
* @returns True if enabled, false otherwise
*/
isEnabled(name) {
const aug = this.get(name);
return aug?.enabled ?? false;
}
/**
* Enable a specific augmentation
* @param name The augmentation name
* @returns True if successfully enabled
*/
enable(name) {
// Deprecated: use brain.augmentations instead
return false;
}
/**
* Disable a specific augmentation
* @param name The augmentation name
* @returns True if successfully disabled
*/
disable(name) {
// Deprecated: use brain.augmentations instead
return false;
}
/**
* Remove an augmentation from the pipeline
* @param name The augmentation name
* @returns True if successfully removed
*/
remove(name) {
// Deprecated: use brain.augmentations instead
return true;
}
/**
* Enable all augmentations of a specific type
* @param type The augmentation type
* @returns Number of augmentations enabled
*/
enableType(type) {
// Deprecated: use brain.augmentations instead
return 0;
}
/**
* Disable all augmentations of a specific type
* @param type The augmentation type
* @returns Number of augmentations disabled
*/
disableType(type) {
// Deprecated: use brain.augmentations instead
return 0;
}
/**
* Get all augmentations of a specific type
* @param type The augmentation type
* @returns Array of augmentations of that type
*/
listByType(type) {
return this.list().filter(a => a.type === type);
}
/**
* Get all enabled augmentations
* @returns Array of enabled augmentations
*/
listEnabled() {
return this.list().filter(a => a.enabled);
}
/**
* Get all disabled augmentations
* @returns Array of disabled augmentations
*/
listDisabled() {
return this.list().filter(a => !a.enabled);
}
/**
* Register a new augmentation (internal use)
* @param augmentation The augmentation to register
*/
register(augmentation) {
// Deprecated: use brain.augmentations instead
}
}
// Export types for external use
export { AugmentationType } from './types/augmentations.js';
//# sourceMappingURL=augmentationManager.js.map