diff --git a/src/augmentations/brainyAugmentation.ts b/src/augmentations/brainyAugmentation.ts index 970d31a8..ae3ea014 100644 --- a/src/augmentations/brainyAugmentation.ts +++ b/src/augmentations/brainyAugmentation.ts @@ -188,6 +188,11 @@ export abstract class BaseAugmentation implements BrainyAugmentation { )[] abstract priority: number + // Metadata for augmentation listing and management + category: 'internal' | 'core' | 'premium' | 'community' | 'external' = 'core' + description: string = '' + enabled: boolean = true + protected context?: AugmentationContext protected isInitialized = false @@ -348,6 +353,30 @@ export class AugmentationRegistry { return [...this.augmentations] } + /** + * Get augmentation info for listing + */ + getInfo(): Array<{ + name: string + type: string + enabled: boolean + description: string + category: string + priority: number + }> { + return this.augmentations.map(aug => { + const baseAug = aug as any + return { + name: aug.name, + type: baseAug.category || 'core', + enabled: baseAug.enabled !== false, + description: baseAug.description || `${aug.name} augmentation`, + category: baseAug.category || 'core', + priority: aug.priority + } + }) + } + /** * Get augmentations by name */ diff --git a/src/augmentations/cacheAugmentation.ts b/src/augmentations/cacheAugmentation.ts index 37c815a5..94b2bee0 100644 --- a/src/augmentations/cacheAugmentation.ts +++ b/src/augmentations/cacheAugmentation.ts @@ -35,6 +35,10 @@ export class CacheAugmentation extends BaseAugmentation { operations = ['search', 'add', 'delete', 'clear', 'all'] as ('search' | 'add' | 'delete' | 'clear' | 'all')[] readonly priority = 50 // Mid-priority, runs after data operations + // Augmentation metadata + readonly category = 'core' as const + readonly description = 'Transparent search result caching with automatic invalidation' + private searchCache: SearchCache | null = null private config: CacheConfig diff --git a/src/augmentations/indexAugmentation.ts b/src/augmentations/indexAugmentation.ts index 81034578..7617efdf 100644 --- a/src/augmentations/indexAugmentation.ts +++ b/src/augmentations/indexAugmentation.ts @@ -37,6 +37,10 @@ export class IndexAugmentation extends BaseAugmentation { operations = ['add', 'updateMetadata', 'delete', 'clear', 'all'] as ('add' | 'updateMetadata' | 'delete' | 'clear' | 'all')[] readonly priority = 60 // Run after data operations + // Augmentation metadata + readonly category = 'core' as const + readonly description = 'Fast metadata field indexing for O(1) filtering and lookups' + private metadataIndex: MetadataIndexManager | null = null private config: IndexConfig private flushTimer: NodeJS.Timeout | null = null diff --git a/src/augmentations/intelligentVerbScoringAugmentation.ts b/src/augmentations/intelligentVerbScoringAugmentation.ts index e4f31565..784f029f 100644 --- a/src/augmentations/intelligentVerbScoringAugmentation.ts +++ b/src/augmentations/intelligentVerbScoringAugmentation.ts @@ -72,11 +72,10 @@ export class IntelligentVerbScoringAugmentation extends BaseAugmentation { } // Adds scoring metadata to verbs operations = ['addVerb', 'relate'] as ('addVerb' | 'relate')[] priority = 10 // Enhancement feature - runs after core operations - - // Add enabled property for backward compatibility - get enabled(): boolean { - return this.config.enabled - } + + // Augmentation metadata + readonly category = 'premium' as const + readonly description = 'AI-powered intelligent scoring for relationship strength analysis' private config: Required private relationshipStats: Map = new Map() @@ -121,6 +120,9 @@ export class IntelligentVerbScoringAugmentation extends BaseAugmentation { maxWeight: config.maxWeight ?? 1.0, baseWeight: config.baseWeight ?? 0.5 } + + // Set enabled property based on config + this.enabled = this.config.enabled } protected async onInitialize(): Promise { diff --git a/src/augmentations/universalDisplayAugmentation.ts b/src/augmentations/universalDisplayAugmentation.ts index 44131213..947edcbd 100644 --- a/src/augmentations/universalDisplayAugmentation.ts +++ b/src/augmentations/universalDisplayAugmentation.ts @@ -55,6 +55,10 @@ export class UniversalDisplayAugmentation extends BaseAugmentation { } operations = ['get', 'search', 'findSimilar', 'getVerb' as any, 'addNoun', 'addVerb'] as any + // Augmentation metadata + readonly category = 'core' as const + readonly description = 'AI-powered intelligent display fields for enhanced data visualization' + // Computed fields declaration for TypeScript support and discovery computedFields = { display: { diff --git a/src/augmentations/walAugmentation.ts b/src/augmentations/walAugmentation.ts index 08f280c8..27fa0920 100644 --- a/src/augmentations/walAugmentation.ts +++ b/src/augmentations/walAugmentation.ts @@ -41,6 +41,10 @@ export class WALAugmentation extends BaseAugmentation { metadata = 'readonly' as const // Reads metadata for logging/recovery operations = ['addNoun', 'addVerb', 'saveNoun', 'saveVerb', 'updateMetadata', 'delete', 'deleteVerb', 'clear'] as ('addNoun' | 'addVerb' | 'saveNoun' | 'saveVerb' | 'updateMetadata' | 'delete' | 'deleteVerb' | 'clear')[] priority = 100 // Critical system operation - highest priority + + // Augmentation metadata + readonly category = 'internal' as const + readonly description = 'Write-ahead logging for durability and crash recovery' private config: Required private currentLogId: string diff --git a/src/brainyData.ts b/src/brainyData.ts index bcf3ce87..80ea6442 100644 --- a/src/brainyData.ts +++ b/src/brainyData.ts @@ -8309,7 +8309,13 @@ export class BrainyData implements BrainyDataInterface { enabled: boolean description: string }> { - return augmentationPipeline.listAugmentationsWithStatus() + // Use the real augmentation registry instead of deprecated pipeline + return this.augmentations.getInfo().map(aug => ({ + name: aug.name, + type: aug.category, // Map category to type for backward compatibility + enabled: aug.enabled, + description: aug.description + })) } /**