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
41
.recovery-workspace/dist-backup-20250910-141917/shared/default-augmentations.d.ts
vendored
Normal file
41
.recovery-workspace/dist-backup-20250910-141917/shared/default-augmentations.d.ts
vendored
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
/**
|
||||
* Default Augmentation Registry
|
||||
*
|
||||
* 🧠⚛️ Pre-installed augmentations that come with every Brainy installation
|
||||
* These are the core "sensory organs" of the atomic age brain-in-jar system
|
||||
*/
|
||||
import { BrainyInterface } from '../types/brainyDataInterface.js';
|
||||
/**
|
||||
* Default augmentations that ship with Brainy
|
||||
* These are automatically registered on startup
|
||||
*/
|
||||
export declare class DefaultAugmentationRegistry {
|
||||
private brainy;
|
||||
constructor(brainy: BrainyInterface);
|
||||
/**
|
||||
* Initialize all default augmentations
|
||||
* Called during Brainy startup to register core functionality
|
||||
*/
|
||||
initializeDefaults(): Promise<void>;
|
||||
/**
|
||||
* Neural Import - Default SENSE Augmentation
|
||||
* AI-powered data understanding and entity extraction (always free)
|
||||
*/
|
||||
private registerNeuralImport;
|
||||
/**
|
||||
* Check if Cortex is available and working
|
||||
*/
|
||||
checkCortexHealth(): Promise<{
|
||||
available: boolean;
|
||||
status: string;
|
||||
version?: string;
|
||||
}>;
|
||||
/**
|
||||
* Reinstall Cortex if it's missing or corrupted
|
||||
*/
|
||||
reinstallCortex(): Promise<void>;
|
||||
}
|
||||
/**
|
||||
* Helper function to initialize default augmentations for any Brainy instance
|
||||
*/
|
||||
export declare function initializeDefaultAugmentations(brainy: BrainyInterface): Promise<DefaultAugmentationRegistry>;
|
||||
|
|
@ -0,0 +1,112 @@
|
|||
/**
|
||||
* Default Augmentation Registry
|
||||
*
|
||||
* 🧠⚛️ Pre-installed augmentations that come with every Brainy installation
|
||||
* These are the core "sensory organs" of the atomic age brain-in-jar system
|
||||
*/
|
||||
/**
|
||||
* Default augmentations that ship with Brainy
|
||||
* These are automatically registered on startup
|
||||
*/
|
||||
export class DefaultAugmentationRegistry {
|
||||
constructor(brainy) {
|
||||
this.brainy = brainy;
|
||||
}
|
||||
/**
|
||||
* Initialize all default augmentations
|
||||
* Called during Brainy startup to register core functionality
|
||||
*/
|
||||
async initializeDefaults() {
|
||||
console.log('🧠⚛️ Initializing default augmentations...');
|
||||
// Register Neural Import as default SENSE augmentation
|
||||
await this.registerNeuralImport();
|
||||
console.log('🧠⚛️ Default augmentations initialized');
|
||||
}
|
||||
/**
|
||||
* Neural Import - Default SENSE Augmentation
|
||||
* AI-powered data understanding and entity extraction (always free)
|
||||
*/
|
||||
async registerNeuralImport() {
|
||||
try {
|
||||
// Import the Neural Import augmentation
|
||||
const { NeuralImportAugmentation } = await import('../augmentations/neuralImport.js');
|
||||
// Note: The actual registration is commented out since Brainy doesn't have addAugmentation method yet
|
||||
// This would create instance with default configuration
|
||||
/*
|
||||
const neuralImport = new NeuralImportAugmentation(this.brainy as any, {
|
||||
confidenceThreshold: 0.7,
|
||||
enableWeights: true,
|
||||
skipDuplicates: true
|
||||
})
|
||||
|
||||
// Add as SENSE augmentation to Brainy (when method is available)
|
||||
if (this.brainy.addAugmentation) {
|
||||
await this.brainy.addAugmentation('SENSE', cortex, {
|
||||
position: 1, // First in the SENSE pipeline
|
||||
name: 'cortex',
|
||||
autoStart: true
|
||||
})
|
||||
}
|
||||
*/
|
||||
console.log('🧠⚛️ Cortex module loaded (awaiting Brainy augmentation support)');
|
||||
}
|
||||
catch (error) {
|
||||
console.error('❌ Failed to register Cortex:', error instanceof Error ? error.message : String(error));
|
||||
// Don't throw - Brainy should still work without Neural Import
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Check if Cortex is available and working
|
||||
*/
|
||||
async checkCortexHealth() {
|
||||
try {
|
||||
// Check if Cortex is registered as an augmentation
|
||||
// Note: hasAugmentation method doesn't exist yet in Brainy
|
||||
const hasCortex = false; // this.brainy.hasAugmentation && this.brainy.hasAugmentation('SENSE', 'cortex')
|
||||
return {
|
||||
available: hasCortex || false,
|
||||
status: hasCortex ? 'active' : 'not registered (awaiting Brainy support)',
|
||||
version: '1.0.0'
|
||||
};
|
||||
}
|
||||
catch (error) {
|
||||
return {
|
||||
available: false,
|
||||
status: `Error: ${error instanceof Error ? error.message : String(error)}`
|
||||
};
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Reinstall Cortex if it's missing or corrupted
|
||||
*/
|
||||
async reinstallCortex() {
|
||||
try {
|
||||
// Remove existing if present
|
||||
// Note: removeAugmentation method doesn't exist yet in Brainy
|
||||
/*
|
||||
if (this.brainy.removeAugmentation) {
|
||||
try {
|
||||
await this.brainy.removeAugmentation('SENSE', 'cortex')
|
||||
} catch (error) {
|
||||
// Ignore errors if augmentation doesn't exist
|
||||
}
|
||||
}
|
||||
*/
|
||||
// Re-register (method exists on base class)
|
||||
// await this.registerCortex()
|
||||
console.log('🧠⚛️ Cortex reinstalled successfully');
|
||||
}
|
||||
catch (error) {
|
||||
throw new Error(`Failed to reinstall Cortex: ${error instanceof Error ? error.message : String(error)}`);
|
||||
}
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Helper function to initialize default augmentations for any Brainy instance
|
||||
*/
|
||||
export async function initializeDefaultAugmentations(brainy) {
|
||||
const registry = new DefaultAugmentationRegistry(brainy);
|
||||
await registry.initializeDefaults();
|
||||
return registry;
|
||||
}
|
||||
//# sourceMappingURL=default-augmentations.js.map
|
||||
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"default-augmentations.js","sourceRoot":"","sources":["../../src/shared/default-augmentations.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH;;;GAGG;AACH,MAAM,OAAO,2BAA2B;IAGtC,YAAY,MAAuB;QACjC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAA;IACtB,CAAC;IAED;;;OAGG;IACH,KAAK,CAAC,kBAAkB;QACtB,OAAO,CAAC,GAAG,CAAC,4CAA4C,CAAC,CAAA;QAEzD,uDAAuD;QACvD,MAAM,IAAI,CAAC,oBAAoB,EAAE,CAAA;QAEjC,OAAO,CAAC,GAAG,CAAC,wCAAwC,CAAC,CAAA;IACvD,CAAC;IAED;;;OAGG;IACK,KAAK,CAAC,oBAAoB;QAChC,IAAI,CAAC;YACH,wCAAwC;YACxC,MAAM,EAAE,wBAAwB,EAAE,GAAG,MAAM,MAAM,CAAC,kCAAkC,CAAC,CAAA;YAErF,sGAAsG;YACtG,wDAAwD;YACxD;;;;;;;;;;;;;;;cAeE;YAEF,OAAO,CAAC,GAAG,CAAC,kEAAkE,CAAC,CAAA;QAEjF,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,CAAC,KAAK,CAAC,8BAA8B,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAA;YACrG,+DAA+D;QACjE,CAAC;IACH,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,iBAAiB;QAKrB,IAAI,CAAC;YACH,mDAAmD;YACnD,2DAA2D;YAC3D,MAAM,SAAS,GAAG,KAAK,CAAA,CAAC,gFAAgF;YAExG,OAAO;gBACL,SAAS,EAAE,SAAS,IAAI,KAAK;gBAC7B,MAAM,EAAE,SAAS,CAAC,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