fix: restore listAugmentations() functionality and add metadata support

- Fix listAugmentations() to return actual augmentation data instead of empty array
- Add category and description metadata to BaseAugmentation class
- Add getInfo() method to AugmentationRegistry for detailed augmentation listing
- Update augmentation classes with proper categorization (internal/core/premium)
- Enhance augmentation discovery and management capabilities

This fixes the broken augmentation listing API and provides better visibility
into installed augmentations with their status and metadata.
This commit is contained in:
David Snelling 2025-08-28 14:50:23 -07:00
parent 8208e63169
commit 7a0ec71d23
7 changed files with 59 additions and 6 deletions

View file

@ -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
*/