@soulcraft/brainy 0.55.0 → 0.57.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +172 -730
- package/bin/brainy.js +592 -0
- package/dist/augmentations/cortexSense.d.ts +196 -0
- package/dist/augmentations/cortexSense.js +747 -0
- package/dist/augmentations/cortexSense.js.map +1 -0
- package/dist/augmentations/memoryAugmentations.d.ts.map +1 -1
- package/dist/augmentations/neuralImportSense.d.ts +196 -0
- package/dist/augmentations/neuralImportSense.js +747 -0
- package/dist/augmentations/neuralImportSense.js.map +1 -0
- package/dist/brainyData.d.ts.map +1 -1
- package/dist/brainyData.js +12 -0
- package/dist/brainyData.js.map +1 -1
- package/dist/chat/brainyChat.d.ts +42 -0
- package/dist/chat/brainyChat.js +340 -0
- package/dist/chat/brainyChat.js.map +1 -0
- package/dist/connectors/interfaces/IConnector.d.ts +143 -0
- package/dist/connectors/interfaces/IConnector.js +8 -0
- package/dist/connectors/interfaces/IConnector.js.map +1 -0
- package/dist/coreTypes.d.ts.map +1 -1
- package/dist/cortex/backupRestore.d.ts +85 -0
- package/dist/cortex/backupRestore.js +326 -0
- package/dist/cortex/backupRestore.js.map +1 -0
- package/dist/cortex/cortex.d.ts +249 -0
- package/dist/cortex/cortex.js +2304 -0
- package/dist/cortex/cortex.js.map +1 -0
- package/dist/cortex/healthCheck.d.ts +85 -0
- package/dist/cortex/healthCheck.js +546 -0
- package/dist/cortex/healthCheck.js.map +1 -0
- package/dist/cortex/licensingSystem.d.ts +126 -0
- package/dist/cortex/licensingSystem.js +474 -0
- package/dist/cortex/licensingSystem.js.map +1 -0
- package/dist/cortex/neuralImport.d.ts +145 -0
- package/dist/cortex/neuralImport.js +620 -0
- package/dist/cortex/neuralImport.js.map +1 -0
- package/dist/cortex/performanceMonitor.d.ts +150 -0
- package/dist/cortex/performanceMonitor.js +371 -0
- package/dist/cortex/performanceMonitor.js.map +1 -0
- package/dist/cortex/serviceIntegration.d.ts +156 -0
- package/dist/cortex/serviceIntegration.js +384 -0
- package/dist/cortex/serviceIntegration.js.map +1 -0
- package/dist/cortex/webhookManager.d.ts +39 -0
- package/dist/cortex/webhookManager.js +326 -0
- package/dist/cortex/webhookManager.js.map +1 -0
- package/dist/hnsw/hnswIndex.d.ts.map +1 -1
- package/dist/hnsw/hnswIndexOptimized.d.ts.map +1 -1
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -0
- package/dist/index.js.map +1 -1
- package/dist/patched-platform-node.d.ts +17 -0
- package/dist/patched-platform-node.d.ts.map +1 -0
- package/dist/shared/default-augmentations.d.ts +41 -0
- package/dist/shared/default-augmentations.js +112 -0
- package/dist/shared/default-augmentations.js.map +1 -0
- package/dist/storage/adapters/baseStorageAdapter.d.ts.map +1 -1
- package/dist/storage/adapters/fileSystemStorage.d.ts +14 -0
- package/dist/storage/adapters/fileSystemStorage.d.ts.map +1 -1
- package/dist/storage/adapters/fileSystemStorage.js +68 -0
- package/dist/storage/adapters/fileSystemStorage.js.map +1 -1
- package/dist/storage/adapters/memoryStorage.d.ts +13 -0
- package/dist/storage/adapters/memoryStorage.d.ts.map +1 -1
- package/dist/storage/adapters/memoryStorage.js +19 -0
- package/dist/storage/adapters/memoryStorage.js.map +1 -1
- package/dist/storage/adapters/opfsStorage.d.ts.map +1 -1
- package/dist/storage/adapters/s3CompatibleStorage.d.ts.map +1 -1
- package/dist/storage/baseStorage.d.ts.map +1 -1
- package/dist/storage/storageFactory.d.ts.map +1 -1
- package/dist/testing/prettyReporter.d.ts +23 -0
- package/dist/testing/prettyReporter.d.ts.map +1 -0
- package/dist/testing/prettySummaryReporter.d.ts +22 -0
- package/dist/testing/prettySummaryReporter.d.ts.map +1 -0
- package/dist/types/augmentations.d.ts +48 -1
- package/dist/unified.min.js +12511 -0
- package/dist/unified.min.js.map +1 -0
- package/dist/utils/embedding.d.ts.map +1 -1
- package/dist/utils/embedding.js +1 -0
- package/dist/utils/embedding.js.map +1 -1
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/tensorflowUtils.d.ts +17 -0
- package/dist/utils/tensorflowUtils.d.ts.map +1 -0
- package/dist/webhooks/webhookSystem.d.ts +114 -0
- package/dist/webhooks/webhookSystem.js +321 -0
- package/dist/webhooks/webhookSystem.js.map +1 -0
- package/package.json +11 -1
- package/dist/browserFramework.d.ts.map +0 -1
- package/dist/cortex/cli.d.ts +0 -8
- package/dist/cortex/cli.js +0 -207
- package/dist/cortex/cli.js.map +0 -1
- package/dist/cortex/commands/index.d.ts +0 -79
- package/dist/cortex/commands/index.js +0 -614
- package/dist/cortex/commands/index.js.map +0 -1
- package/dist/cortex/config.d.ts +0 -112
- package/dist/cortex/config.js +0 -312
- package/dist/cortex/config.js.map +0 -1
- package/dist/demo.d.ts.map +0 -1
- package/dist/distributed/configManager.d.ts.map +0 -1
- package/dist/distributed/domainDetector.d.ts.map +0 -1
- package/dist/distributed/hashPartitioner.d.ts.map +0 -1
- package/dist/distributed/healthMonitor.d.ts.map +0 -1
- package/dist/distributed/index.d.ts.map +0 -1
- package/dist/distributed/operationalModes.d.ts.map +0 -1
- package/dist/hnsw/distributedSearch.d.ts.map +0 -1
- package/dist/hnsw/optimizedHNSWIndex.d.ts.map +0 -1
- package/dist/hnsw/partitionedHNSWIndex.d.ts.map +0 -1
- package/dist/hnsw/scaledHNSWSystem.d.ts.map +0 -1
- package/dist/storage/adapters/batchS3Operations.d.ts.map +0 -1
- package/dist/storage/adapters/optimizedS3Search.d.ts.map +0 -1
- package/dist/storage/cacheManager.d.ts.map +0 -1
- package/dist/storage/enhancedCacheManager.d.ts.map +0 -1
- package/dist/storage/readOnlyOptimizations.d.ts.map +0 -1
- package/dist/types/distributedTypes.d.ts.map +0 -1
- package/dist/types/paginationTypes.d.ts.map +0 -1
- package/dist/types/tensorflowTypes.js +0 -6
- package/dist/types/tensorflowTypes.js.map +0 -1
- package/dist/utils/autoConfiguration.d.ts.map +0 -1
- package/dist/utils/cacheAutoConfig.d.ts.map +0 -1
- package/dist/utils/crypto.d.ts.map +0 -1
- package/dist/utils/fieldNameTracking.d.ts.map +0 -1
- package/dist/utils/jsonProcessing.d.ts.map +0 -1
- package/dist/utils/logger.d.ts.map +0 -1
- package/dist/utils/robustModelLoader.d.ts +0 -112
- package/dist/utils/robustModelLoader.d.ts.map +0 -1
- package/dist/utils/robustModelLoader.js +0 -624
- package/dist/utils/robustModelLoader.js.map +0 -1
- package/dist/utils/searchCache.d.ts.map +0 -1
- package/dist/utils/statisticsCollector.d.ts.map +0 -1
- package/dist/utils/typeUtils.d.ts.map +0 -1
- package/dist/utils/version.d.ts.map +0 -1
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Neural Import - Atomic Age AI-Powered Data Understanding System
|
|
3
|
+
*
|
|
4
|
+
* 🧠 Leveraging the brain-in-jar to understand and automatically structure data
|
|
5
|
+
* ⚛️ Complete with confidence scoring and relationship weight calculation
|
|
6
|
+
*/
|
|
7
|
+
import { BrainyData } from '../brainyData.js';
|
|
8
|
+
export interface NeuralAnalysisResult {
|
|
9
|
+
detectedEntities: DetectedEntity[];
|
|
10
|
+
detectedRelationships: DetectedRelationship[];
|
|
11
|
+
confidence: number;
|
|
12
|
+
insights: NeuralInsight[];
|
|
13
|
+
preview: ProcessedData[];
|
|
14
|
+
}
|
|
15
|
+
export interface DetectedEntity {
|
|
16
|
+
originalData: any;
|
|
17
|
+
nounType: string;
|
|
18
|
+
confidence: number;
|
|
19
|
+
suggestedId: string;
|
|
20
|
+
reasoning: string;
|
|
21
|
+
alternativeTypes: Array<{
|
|
22
|
+
type: string;
|
|
23
|
+
confidence: number;
|
|
24
|
+
}>;
|
|
25
|
+
}
|
|
26
|
+
export interface DetectedRelationship {
|
|
27
|
+
sourceId: string;
|
|
28
|
+
targetId: string;
|
|
29
|
+
verbType: string;
|
|
30
|
+
confidence: number;
|
|
31
|
+
weight: number;
|
|
32
|
+
reasoning: string;
|
|
33
|
+
context: string;
|
|
34
|
+
metadata?: Record<string, any>;
|
|
35
|
+
}
|
|
36
|
+
export interface NeuralInsight {
|
|
37
|
+
type: 'hierarchy' | 'cluster' | 'pattern' | 'anomaly' | 'opportunity';
|
|
38
|
+
description: string;
|
|
39
|
+
confidence: number;
|
|
40
|
+
affectedEntities: string[];
|
|
41
|
+
recommendation?: string;
|
|
42
|
+
}
|
|
43
|
+
export interface ProcessedData {
|
|
44
|
+
id: string;
|
|
45
|
+
nounType: string;
|
|
46
|
+
data: any;
|
|
47
|
+
relationships: Array<{
|
|
48
|
+
target: string;
|
|
49
|
+
verbType: string;
|
|
50
|
+
weight: number;
|
|
51
|
+
confidence: number;
|
|
52
|
+
}>;
|
|
53
|
+
}
|
|
54
|
+
export interface NeuralImportOptions {
|
|
55
|
+
confidenceThreshold: number;
|
|
56
|
+
autoApply: boolean;
|
|
57
|
+
enableWeights: boolean;
|
|
58
|
+
previewOnly: boolean;
|
|
59
|
+
validateOnly: boolean;
|
|
60
|
+
categoryFilter?: string[];
|
|
61
|
+
skipDuplicates: boolean;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Neural Import Engine - The Brain Behind the Analysis
|
|
65
|
+
*/
|
|
66
|
+
export declare class NeuralImport {
|
|
67
|
+
private brainy;
|
|
68
|
+
private colors;
|
|
69
|
+
private emojis;
|
|
70
|
+
constructor(brainy: BrainyData);
|
|
71
|
+
/**
|
|
72
|
+
* Main Neural Import Function - The Master Controller
|
|
73
|
+
*/
|
|
74
|
+
neuralImport(filePath: string, options?: Partial<NeuralImportOptions>): Promise<NeuralAnalysisResult>;
|
|
75
|
+
/**
|
|
76
|
+
* Parse file based on extension
|
|
77
|
+
*/
|
|
78
|
+
private parseFile;
|
|
79
|
+
/**
|
|
80
|
+
* Basic CSV parser
|
|
81
|
+
*/
|
|
82
|
+
private parseCSV;
|
|
83
|
+
/**
|
|
84
|
+
* Neural Entity Detection - The Core AI Engine
|
|
85
|
+
*/
|
|
86
|
+
private detectEntitiesWithNeuralAnalysis;
|
|
87
|
+
/**
|
|
88
|
+
* Calculate entity type confidence using AI
|
|
89
|
+
*/
|
|
90
|
+
private calculateEntityTypeConfidence;
|
|
91
|
+
/**
|
|
92
|
+
* Field-based confidence calculation
|
|
93
|
+
*/
|
|
94
|
+
private calculateFieldBasedConfidence;
|
|
95
|
+
/**
|
|
96
|
+
* Pattern-based confidence calculation
|
|
97
|
+
*/
|
|
98
|
+
private calculatePatternBasedConfidence;
|
|
99
|
+
/**
|
|
100
|
+
* Generate reasoning for entity type selection
|
|
101
|
+
*/
|
|
102
|
+
private generateEntityReasoning;
|
|
103
|
+
/**
|
|
104
|
+
* Neural Relationship Detection
|
|
105
|
+
*/
|
|
106
|
+
private detectRelationshipsWithNeuralAnalysis;
|
|
107
|
+
/**
|
|
108
|
+
* Calculate relationship confidence
|
|
109
|
+
*/
|
|
110
|
+
private calculateRelationshipConfidence;
|
|
111
|
+
/**
|
|
112
|
+
* Calculate relationship weight/strength
|
|
113
|
+
*/
|
|
114
|
+
private calculateRelationshipWeight;
|
|
115
|
+
/**
|
|
116
|
+
* Generate Neural Insights - The Intelligence Layer
|
|
117
|
+
*/
|
|
118
|
+
private generateNeuralInsights;
|
|
119
|
+
/**
|
|
120
|
+
* Display Neural Analysis Results
|
|
121
|
+
*/
|
|
122
|
+
private displayNeuralAnalysisResults;
|
|
123
|
+
/**
|
|
124
|
+
* Helper methods for the neural system
|
|
125
|
+
*/
|
|
126
|
+
private extractMainText;
|
|
127
|
+
private generateSmartId;
|
|
128
|
+
private extractRelationshipContext;
|
|
129
|
+
private calculateTypeCompatibility;
|
|
130
|
+
private getVerbSpecificity;
|
|
131
|
+
private getRelevantFields;
|
|
132
|
+
private getMatchedPatterns;
|
|
133
|
+
private pruneRelationships;
|
|
134
|
+
private detectHierarchies;
|
|
135
|
+
private detectClusters;
|
|
136
|
+
private detectPatterns;
|
|
137
|
+
private summarizeEntities;
|
|
138
|
+
private summarizeRelationships;
|
|
139
|
+
private calculateOverallConfidence;
|
|
140
|
+
private generatePreview;
|
|
141
|
+
private confirmNeuralImport;
|
|
142
|
+
private executeNeuralImport;
|
|
143
|
+
private generateRelationshipReasoning;
|
|
144
|
+
private extractRelationshipMetadata;
|
|
145
|
+
}
|