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
145
.recovery-workspace/dist-backup-20250910-141917/cortex/neuralImport.d.ts
vendored
Normal file
145
.recovery-workspace/dist-backup-20250910-141917/cortex/neuralImport.d.ts
vendored
Normal file
|
|
@ -0,0 +1,145 @@
|
|||
/**
|
||||
* Neural Import - Atomic Age AI-Powered Data Understanding System
|
||||
*
|
||||
* 🧠 Leveraging the brain-in-jar to understand and automatically structure data
|
||||
* ⚛️ Complete with confidence scoring and relationship weight calculation
|
||||
*/
|
||||
import { Brainy } from '../brainy.js';
|
||||
export interface NeuralAnalysisResult {
|
||||
detectedEntities: DetectedEntity[];
|
||||
detectedRelationships: DetectedRelationship[];
|
||||
confidence: number;
|
||||
insights: NeuralInsight[];
|
||||
preview: ProcessedData[];
|
||||
}
|
||||
export interface DetectedEntity {
|
||||
originalData: any;
|
||||
nounType: string;
|
||||
confidence: number;
|
||||
suggestedId: string;
|
||||
reasoning: string;
|
||||
alternativeTypes: Array<{
|
||||
type: string;
|
||||
confidence: number;
|
||||
}>;
|
||||
}
|
||||
export interface DetectedRelationship {
|
||||
sourceId: string;
|
||||
targetId: string;
|
||||
verbType: string;
|
||||
confidence: number;
|
||||
weight: number;
|
||||
reasoning: string;
|
||||
context: string;
|
||||
metadata?: Record<string, any>;
|
||||
}
|
||||
export interface NeuralInsight {
|
||||
type: 'hierarchy' | 'cluster' | 'pattern' | 'anomaly' | 'opportunity';
|
||||
description: string;
|
||||
confidence: number;
|
||||
affectedEntities: string[];
|
||||
recommendation?: string;
|
||||
}
|
||||
export interface ProcessedData {
|
||||
id: string;
|
||||
nounType: string;
|
||||
data: any;
|
||||
relationships: Array<{
|
||||
target: string;
|
||||
verbType: string;
|
||||
weight: number;
|
||||
confidence: number;
|
||||
}>;
|
||||
}
|
||||
export interface NeuralImportOptions {
|
||||
confidenceThreshold: number;
|
||||
autoApply: boolean;
|
||||
enableWeights: boolean;
|
||||
previewOnly: boolean;
|
||||
validateOnly: boolean;
|
||||
categoryFilter?: string[];
|
||||
skipDuplicates: boolean;
|
||||
}
|
||||
/**
|
||||
* Neural Import Engine - The Brain Behind the Analysis
|
||||
*/
|
||||
export declare class NeuralImport {
|
||||
private brainy;
|
||||
private colors;
|
||||
private emojis;
|
||||
constructor(brainy: Brainy);
|
||||
/**
|
||||
* Main Neural Import Function - The Master Controller
|
||||
*/
|
||||
neuralImport(filePath: string, options?: Partial<NeuralImportOptions>): Promise<NeuralAnalysisResult>;
|
||||
/**
|
||||
* Parse file based on extension
|
||||
*/
|
||||
private parseFile;
|
||||
/**
|
||||
* Basic CSV parser
|
||||
*/
|
||||
private parseCSV;
|
||||
/**
|
||||
* Neural Entity Detection - The Core AI Engine
|
||||
*/
|
||||
private detectEntitiesWithNeuralAnalysis;
|
||||
/**
|
||||
* Calculate entity type confidence using AI
|
||||
*/
|
||||
private calculateEntityTypeConfidence;
|
||||
/**
|
||||
* Field-based confidence calculation
|
||||
*/
|
||||
private calculateFieldBasedConfidence;
|
||||
/**
|
||||
* Pattern-based confidence calculation
|
||||
*/
|
||||
private calculatePatternBasedConfidence;
|
||||
/**
|
||||
* Generate reasoning for entity type selection
|
||||
*/
|
||||
private generateEntityReasoning;
|
||||
/**
|
||||
* Neural Relationship Detection
|
||||
*/
|
||||
private detectRelationshipsWithNeuralAnalysis;
|
||||
/**
|
||||
* Calculate relationship confidence
|
||||
*/
|
||||
private calculateRelationshipConfidence;
|
||||
/**
|
||||
* Calculate relationship weight/strength
|
||||
*/
|
||||
private calculateRelationshipWeight;
|
||||
/**
|
||||
* Generate Neural Insights - The Intelligence Layer
|
||||
*/
|
||||
private generateNeuralInsights;
|
||||
/**
|
||||
* Display Neural Analysis Results
|
||||
*/
|
||||
private displayNeuralAnalysisResults;
|
||||
/**
|
||||
* Helper methods for the neural system
|
||||
*/
|
||||
private extractMainText;
|
||||
private generateSmartId;
|
||||
private extractRelationshipContext;
|
||||
private calculateTypeCompatibility;
|
||||
private getVerbSpecificity;
|
||||
private getRelevantFields;
|
||||
private getMatchedPatterns;
|
||||
private pruneRelationships;
|
||||
private detectHierarchies;
|
||||
private detectClusters;
|
||||
private detectPatterns;
|
||||
private summarizeEntities;
|
||||
private summarizeRelationships;
|
||||
private calculateOverallConfidence;
|
||||
private generatePreview;
|
||||
private confirmNeuralImport;
|
||||
private executeNeuralImport;
|
||||
private generateRelationshipReasoning;
|
||||
private extractRelationshipMetadata;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue