brainy/.recovery-workspace/dist-backup-20250910-141917/augmentations/discovery.d.ts
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

152 lines
4.7 KiB
TypeScript

/**
* Augmentation Discovery API
*
* Provides discovery and configuration capabilities for augmentations
* Enables tools like brain-cloud to dynamically discover, configure, and manage augmentations
*/
import { AugmentationRegistry } from './brainyAugmentation.js';
import { AugmentationManifest, JSONSchema } from './manifest.js';
/**
* Augmentation listing with manifest and status
*/
export interface AugmentationListing {
id: string;
name: string;
manifest: AugmentationManifest;
status: {
enabled: boolean;
initialized: boolean;
category: string;
priority: number;
};
config?: {
current: any;
schema?: JSONSchema;
sources?: any[];
};
}
/**
* Configuration validation result
*/
export interface ConfigValidationResult {
valid: boolean;
errors?: string[];
warnings?: string[];
suggestions?: string[];
}
/**
* Discovery API options
*/
export interface DiscoveryOptions {
includeConfig?: boolean;
includeSchema?: boolean;
includeSources?: boolean;
category?: string;
enabled?: boolean;
}
/**
* Augmentation Discovery API
*
* Provides a unified interface for discovering and managing augmentations
*/
export declare class AugmentationDiscovery {
private registry;
constructor(registry: AugmentationRegistry);
/**
* Discover all registered augmentations with manifests
* @param options Discovery options
* @returns List of augmentation listings
*/
discover(options?: DiscoveryOptions): Promise<AugmentationListing[]>;
/**
* Get a specific augmentation's manifest
* @param augId Augmentation ID
* @returns Augmentation manifest or null if not found
*/
getManifest(augId: string): Promise<AugmentationManifest | null>;
/**
* Get configuration schema for an augmentation
* @param augId Augmentation ID
* @returns Configuration schema or null
*/
getConfigSchema(augId: string): Promise<JSONSchema | null>;
/**
* Get current configuration for an augmentation
* @param augId Augmentation ID
* @returns Current configuration or null
*/
getConfig(augId: string): Promise<any | null>;
/**
* Update configuration for an augmentation
* @param augId Augmentation ID
* @param config New configuration
* @returns Updated configuration or null on failure
*/
updateConfig(augId: string, config: any): Promise<any | null>;
/**
* Validate configuration against schema
* @param augId Augmentation ID
* @param config Configuration to validate
* @returns Validation result
*/
validateConfig(augId: string, config: any): Promise<ConfigValidationResult>;
/**
* Validate a property value against its schema
*/
private validatePropertyValue;
/**
* Get environment variables for an augmentation
* @param augId Augmentation ID
* @returns Map of environment variable names to descriptions
*/
getEnvironmentVariables(augId: string): Promise<Record<string, any> | null>;
/**
* Get configuration examples for an augmentation
* @param augId Augmentation ID
* @returns Configuration examples or empty array
*/
getConfigExamples(augId: string): Promise<any[]>;
/**
* Check if an augmentation supports configuration
* @param augId Augmentation ID
* @returns True if augmentation supports configuration
*/
supportsConfiguration(augId: string): Promise<boolean>;
/**
* Get augmentations by category
* @param category Category to filter by
* @returns List of augmentations in the category
*/
getByCategory(category: string): Promise<AugmentationListing[]>;
/**
* Get enabled augmentations
* @returns List of enabled augmentations
*/
getEnabled(): Promise<AugmentationListing[]>;
/**
* Search augmentations by keyword
* @param query Search query
* @returns Matching augmentations
*/
search(query: string): Promise<AugmentationListing[]>;
/**
* Export configuration for all augmentations
* @returns Map of augmentation IDs to configurations
*/
exportConfigurations(): Promise<Record<string, any>>;
/**
* Import configurations for multiple augmentations
* @param configs Map of augmentation IDs to configurations
* @returns Results of import operation
*/
importConfigurations(configs: Record<string, any>): Promise<Record<string, {
success: boolean;
error?: string;
}>>;
/**
* Generate configuration documentation
* @param augId Augmentation ID
* @returns Markdown documentation
*/
generateConfigDocs(augId: string): Promise<string | null>;
}