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
This commit is contained in:
parent
f65455fb22
commit
8ff382ca3b
895 changed files with 143654 additions and 28268 deletions
97
.recovery-workspace/dist-backup-20250910-141917/augmentations/discovery/runtimeLoader.d.ts
vendored
Normal file
97
.recovery-workspace/dist-backup-20250910-141917/augmentations/discovery/runtimeLoader.d.ts
vendored
Normal file
|
|
@ -0,0 +1,97 @@
|
|||
/**
|
||||
* Runtime Augmentation Loader
|
||||
*
|
||||
* Dynamically loads and registers augmentations at runtime
|
||||
* Supports CDN loading for browser environments and npm imports for Node.js
|
||||
*/
|
||||
import { BrainyAugmentation, AugmentationRegistry } from '../brainyAugmentation.js';
|
||||
import { AugmentationManifest } from '../manifest.js';
|
||||
export interface LoaderOptions {
|
||||
cdnUrl?: string;
|
||||
allowUnsafe?: boolean;
|
||||
sandbox?: boolean;
|
||||
timeout?: number;
|
||||
cache?: boolean;
|
||||
}
|
||||
export interface LoadedAugmentation {
|
||||
id: string;
|
||||
instance: BrainyAugmentation;
|
||||
manifest: AugmentationManifest;
|
||||
source: 'cdn' | 'npm' | 'local';
|
||||
loadTime: number;
|
||||
}
|
||||
/**
|
||||
* Runtime Augmentation Loader
|
||||
*
|
||||
* Enables dynamic loading of augmentations from various sources
|
||||
*/
|
||||
export declare class RuntimeAugmentationLoader {
|
||||
private options;
|
||||
private loaded;
|
||||
private cdnCache;
|
||||
private registry?;
|
||||
constructor(options?: LoaderOptions);
|
||||
/**
|
||||
* Set the augmentation registry
|
||||
*/
|
||||
setRegistry(registry: AugmentationRegistry): void;
|
||||
/**
|
||||
* Load augmentation from CDN (browser)
|
||||
*/
|
||||
loadFromCDN(id: string, version?: string, config?: any): Promise<LoadedAugmentation>;
|
||||
/**
|
||||
* Load augmentation from NPM (Node.js)
|
||||
*/
|
||||
loadFromNPM(packageName: string, config?: any): Promise<LoadedAugmentation>;
|
||||
/**
|
||||
* Load augmentation from local file
|
||||
*/
|
||||
loadFromFile(path: string, config?: any): Promise<LoadedAugmentation>;
|
||||
/**
|
||||
* Load multiple augmentations
|
||||
*/
|
||||
loadBatch(augmentations: Array<{
|
||||
source: 'cdn' | 'npm' | 'local';
|
||||
id: string;
|
||||
version?: string;
|
||||
path?: string;
|
||||
config?: any;
|
||||
}>): Promise<LoadedAugmentation[]>;
|
||||
/**
|
||||
* Unload augmentation
|
||||
*/
|
||||
unload(id: string): boolean;
|
||||
/**
|
||||
* Get loaded augmentations
|
||||
*/
|
||||
getLoaded(): LoadedAugmentation[];
|
||||
/**
|
||||
* Check if augmentation is loaded
|
||||
*/
|
||||
isLoaded(id: string): boolean;
|
||||
/**
|
||||
* Get loaded augmentation
|
||||
*/
|
||||
getAugmentation(id: string): BrainyAugmentation | null;
|
||||
/**
|
||||
* Load CDN module (browser-specific)
|
||||
*/
|
||||
private loadCDNModule;
|
||||
/**
|
||||
* Validate augmentation instance
|
||||
*/
|
||||
private isValidAugmentation;
|
||||
/**
|
||||
* Clear all caches
|
||||
*/
|
||||
clearCache(): void;
|
||||
/**
|
||||
* Get load statistics
|
||||
*/
|
||||
getStats(): {
|
||||
loaded: number;
|
||||
totalLoadTime: number;
|
||||
averageLoadTime: number;
|
||||
sources: Record<string, number>;
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue