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
64 lines
2 KiB
TypeScript
64 lines
2 KiB
TypeScript
/**
|
|
* Hybrid Model Manager - BEST OF BOTH WORLDS
|
|
*
|
|
* NOW A WRAPPER AROUND SingletonModelManager
|
|
* Maintained for backward compatibility
|
|
*
|
|
* Previously combined:
|
|
* 1. Multi-source downloading strategy (GitHub → CDN → Hugging Face)
|
|
* 2. Singleton pattern preventing multiple ONNX model loads
|
|
* 3. Environment-specific optimizations
|
|
* 4. Graceful fallbacks and error handling
|
|
*
|
|
* Now delegates all operations to SingletonModelManager for true unification
|
|
*/
|
|
import { EmbeddingFunction } from '../coreTypes.js';
|
|
/**
|
|
* HybridModelManager - Now a wrapper around SingletonModelManager
|
|
* Maintained for backward compatibility
|
|
*/
|
|
declare class HybridModelManager {
|
|
private static instance;
|
|
private constructor();
|
|
static getInstance(): HybridModelManager;
|
|
/**
|
|
* Get the primary embedding model - delegates to SingletonModelManager
|
|
*/
|
|
getPrimaryModel(): Promise<any>;
|
|
/**
|
|
* Get embedding function - delegates to SingletonModelManager
|
|
*/
|
|
getEmbeddingFunction(): Promise<EmbeddingFunction>;
|
|
/**
|
|
* Check if model is ready - delegates to SingletonModelManager
|
|
*/
|
|
isModelReady(): boolean;
|
|
/**
|
|
* Force model reload - not supported with SingletonModelManager
|
|
*/
|
|
reloadModel(): Promise<void>;
|
|
/**
|
|
* Get model status - delegates to SingletonModelManager
|
|
*/
|
|
getModelStatus(): {
|
|
loaded: boolean;
|
|
ready: boolean;
|
|
modelType: string;
|
|
};
|
|
}
|
|
export declare const hybridModelManager: HybridModelManager;
|
|
/**
|
|
* Get the hybrid singleton embedding function - Now delegates to SingletonModelManager
|
|
* Maintained for backward compatibility
|
|
*/
|
|
export declare function getHybridEmbeddingFunction(): Promise<EmbeddingFunction>;
|
|
/**
|
|
* Hybrid embedding function - Now delegates to SingletonModelManager
|
|
* Maintained for backward compatibility
|
|
*/
|
|
export declare const hybridEmbeddingFunction: EmbeddingFunction;
|
|
/**
|
|
* Preload model for tests or production - Now delegates to SingletonModelManager
|
|
*/
|
|
export declare function preloadHybridModel(): Promise<void>;
|
|
export {};
|