@soulcraft/brainy 0.56.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 +9 -9
- package/bin/{cortex.js → brainy.js} +1 -1
- 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/cortex/cortex.d.ts +1 -1
- package/dist/cortex/cortex.js +22 -22
- package/dist/cortex/cortex.js.map +1 -1
- package/dist/shared/default-augmentations.d.ts +6 -6
- package/dist/shared/default-augmentations.js +23 -23
- package/dist/shared/default-augmentations.js.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -63,7 +63,7 @@ Throughput: 10K+ queries/second
|
|
|
63
63
|
- **Zero config** - no setup files, no tuning parameters
|
|
64
64
|
|
|
65
65
|
### 🧠 Built-in AI Intelligence (FREE)
|
|
66
|
-
- **
|
|
66
|
+
- **Cortex Augmentation**: AI understands your data structure automatically
|
|
67
67
|
- **Entity Detection**: Identifies people, companies, locations
|
|
68
68
|
- **Relationship Mapping**: Discovers connections between entities
|
|
69
69
|
- **Chat Interface**: Talk to your data naturally (v0.56+)
|
|
@@ -145,23 +145,23 @@ const custom = new BrainyData({
|
|
|
145
145
|
|
|
146
146
|
</details>
|
|
147
147
|
|
|
148
|
-
## 🎮
|
|
148
|
+
## 🎮 Brainy CLI - Command Center for Everything
|
|
149
149
|
|
|
150
150
|
```bash
|
|
151
151
|
# Talk to your data
|
|
152
|
-
|
|
152
|
+
brainy chat "What patterns do you see?"
|
|
153
153
|
|
|
154
154
|
# AI-powered data import
|
|
155
|
-
|
|
155
|
+
brainy import data.csv --cortex --confidence 0.8
|
|
156
156
|
|
|
157
157
|
# Real-time monitoring
|
|
158
|
-
|
|
158
|
+
brainy monitor --dashboard
|
|
159
159
|
|
|
160
160
|
# Start premium trials
|
|
161
|
-
|
|
161
|
+
brainy license trial notion
|
|
162
162
|
```
|
|
163
163
|
|
|
164
|
-
[📖 **Full
|
|
164
|
+
[📖 **Full CLI Documentation**](/docs/brainy-cli.md)
|
|
165
165
|
|
|
166
166
|
## ⚙️ Configuration (Optional)
|
|
167
167
|
|
|
@@ -193,7 +193,7 @@ Brainy works with **zero configuration**, but you can customize
|
|
|
193
193
|
- **Asana** ($44/mo) - Project management
|
|
194
194
|
|
|
195
195
|
```bash
|
|
196
|
-
|
|
196
|
+
brainy license trial notion # Start free trial
|
|
197
197
|
```
|
|
198
198
|
|
|
199
199
|
**No vendor lock-in. Your data stays yours.**
|
|
@@ -306,7 +306,7 @@ Deploy anywhere: AWS, GCP, Azure, Cloudflare
|
|
|
306
306
|
- [Quick Start](docs/getting-started/)
|
|
307
307
|
- [API Reference](docs/api-reference/)
|
|
308
308
|
- [Examples](docs/examples/)
|
|
309
|
-
- [
|
|
309
|
+
- [Brainy CLI](docs/brainy-cli.md)
|
|
310
310
|
- [Performance Guide](docs/optimization-guides/)
|
|
311
311
|
|
|
312
312
|
## ❓ Does Brainy Impact Performance?
|
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Cortex SENSE Augmentation - Atomic Age AI-Powered Data Understanding
|
|
3
|
+
*
|
|
4
|
+
* 🧠 The cerebral cortex layer for intelligent data processing
|
|
5
|
+
* ⚛️ Complete with confidence scoring and relationship weight calculation
|
|
6
|
+
*/
|
|
7
|
+
import { ISenseAugmentation, AugmentationResponse } from '../types/augmentations.js';
|
|
8
|
+
import { BrainyData } from '../brainyData.js';
|
|
9
|
+
export interface CortexAnalysisResult {
|
|
10
|
+
detectedEntities: DetectedEntity[];
|
|
11
|
+
detectedRelationships: DetectedRelationship[];
|
|
12
|
+
confidence: number;
|
|
13
|
+
insights: CortexInsight[];
|
|
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 CortexInsight {
|
|
37
|
+
type: 'hierarchy' | 'cluster' | 'pattern' | 'anomaly' | 'opportunity';
|
|
38
|
+
description: string;
|
|
39
|
+
confidence: number;
|
|
40
|
+
affectedEntities: string[];
|
|
41
|
+
recommendation?: string;
|
|
42
|
+
}
|
|
43
|
+
export interface CortexSenseConfig {
|
|
44
|
+
confidenceThreshold: number;
|
|
45
|
+
enableWeights: boolean;
|
|
46
|
+
skipDuplicates: boolean;
|
|
47
|
+
categoryFilter?: string[];
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Neural Import SENSE Augmentation - The Brain's Perceptual System
|
|
51
|
+
*/
|
|
52
|
+
export declare class CortexSenseAugmentation implements ISenseAugmentation {
|
|
53
|
+
readonly name: string;
|
|
54
|
+
readonly description: string;
|
|
55
|
+
enabled: boolean;
|
|
56
|
+
private brainy;
|
|
57
|
+
private config;
|
|
58
|
+
constructor(brainy: BrainyData, config?: Partial<CortexSenseConfig>);
|
|
59
|
+
initialize(): Promise<void>;
|
|
60
|
+
shutDown(): Promise<void>;
|
|
61
|
+
getStatus(): Promise<'active' | 'inactive' | 'error'>;
|
|
62
|
+
/**
|
|
63
|
+
* Process raw data into structured nouns and verbs using neural analysis
|
|
64
|
+
*/
|
|
65
|
+
processRawData(rawData: Buffer | string, dataType: string, options?: Record<string, unknown>): Promise<AugmentationResponse<{
|
|
66
|
+
nouns: string[];
|
|
67
|
+
verbs: string[];
|
|
68
|
+
confidence?: number;
|
|
69
|
+
insights?: Array<{
|
|
70
|
+
type: string;
|
|
71
|
+
description: string;
|
|
72
|
+
confidence: number;
|
|
73
|
+
}>;
|
|
74
|
+
metadata?: Record<string, unknown>;
|
|
75
|
+
}>>;
|
|
76
|
+
/**
|
|
77
|
+
* Listen to real-time data feeds and process them
|
|
78
|
+
*/
|
|
79
|
+
listenToFeed(feedUrl: string, callback: (data: {
|
|
80
|
+
nouns: string[];
|
|
81
|
+
verbs: string[];
|
|
82
|
+
confidence?: number;
|
|
83
|
+
}) => void): Promise<void>;
|
|
84
|
+
/**
|
|
85
|
+
* Analyze data structure without processing (preview mode)
|
|
86
|
+
*/
|
|
87
|
+
analyzeStructure(rawData: Buffer | string, dataType: string, options?: Record<string, unknown>): Promise<AugmentationResponse<{
|
|
88
|
+
entityTypes: Array<{
|
|
89
|
+
type: string;
|
|
90
|
+
count: number;
|
|
91
|
+
confidence: number;
|
|
92
|
+
}>;
|
|
93
|
+
relationshipTypes: Array<{
|
|
94
|
+
type: string;
|
|
95
|
+
count: number;
|
|
96
|
+
confidence: number;
|
|
97
|
+
}>;
|
|
98
|
+
dataQuality: {
|
|
99
|
+
completeness: number;
|
|
100
|
+
consistency: number;
|
|
101
|
+
accuracy: number;
|
|
102
|
+
};
|
|
103
|
+
recommendations: string[];
|
|
104
|
+
}>>;
|
|
105
|
+
/**
|
|
106
|
+
* Validate data compatibility with current knowledge base
|
|
107
|
+
*/
|
|
108
|
+
validateCompatibility(rawData: Buffer | string, dataType: string): Promise<AugmentationResponse<{
|
|
109
|
+
compatible: boolean;
|
|
110
|
+
issues: Array<{
|
|
111
|
+
type: string;
|
|
112
|
+
description: string;
|
|
113
|
+
severity: 'low' | 'medium' | 'high';
|
|
114
|
+
}>;
|
|
115
|
+
suggestions: string[];
|
|
116
|
+
}>>;
|
|
117
|
+
/**
|
|
118
|
+
* Get the full neural analysis result (custom method for Cortex integration)
|
|
119
|
+
*/
|
|
120
|
+
getNeuralAnalysis(rawData: Buffer | string, dataType: string): Promise<CortexAnalysisResult>;
|
|
121
|
+
/**
|
|
122
|
+
* Parse raw data based on type
|
|
123
|
+
*/
|
|
124
|
+
private parseRawData;
|
|
125
|
+
/**
|
|
126
|
+
* Basic CSV parser
|
|
127
|
+
*/
|
|
128
|
+
private parseCSV;
|
|
129
|
+
/**
|
|
130
|
+
* Perform neural analysis on parsed data
|
|
131
|
+
*/
|
|
132
|
+
private performNeuralAnalysis;
|
|
133
|
+
/**
|
|
134
|
+
* Neural Entity Detection - The Core AI Engine
|
|
135
|
+
*/
|
|
136
|
+
private detectEntitiesWithNeuralAnalysis;
|
|
137
|
+
/**
|
|
138
|
+
* Calculate entity type confidence using AI
|
|
139
|
+
*/
|
|
140
|
+
private calculateEntityTypeConfidence;
|
|
141
|
+
/**
|
|
142
|
+
* Field-based confidence calculation
|
|
143
|
+
*/
|
|
144
|
+
private calculateFieldBasedConfidence;
|
|
145
|
+
/**
|
|
146
|
+
* Pattern-based confidence calculation
|
|
147
|
+
*/
|
|
148
|
+
private calculatePatternBasedConfidence;
|
|
149
|
+
/**
|
|
150
|
+
* Generate reasoning for entity type selection
|
|
151
|
+
*/
|
|
152
|
+
private generateEntityReasoning;
|
|
153
|
+
/**
|
|
154
|
+
* Neural Relationship Detection
|
|
155
|
+
*/
|
|
156
|
+
private detectRelationshipsWithNeuralAnalysis;
|
|
157
|
+
/**
|
|
158
|
+
* Calculate relationship confidence
|
|
159
|
+
*/
|
|
160
|
+
private calculateRelationshipConfidence;
|
|
161
|
+
/**
|
|
162
|
+
* Calculate relationship weight/strength
|
|
163
|
+
*/
|
|
164
|
+
private calculateRelationshipWeight;
|
|
165
|
+
/**
|
|
166
|
+
* Generate Neural Insights - The Intelligence Layer
|
|
167
|
+
*/
|
|
168
|
+
private generateCortexInsights;
|
|
169
|
+
/**
|
|
170
|
+
* Helper methods for the neural system
|
|
171
|
+
*/
|
|
172
|
+
private extractMainText;
|
|
173
|
+
private generateSmartId;
|
|
174
|
+
private extractRelationshipContext;
|
|
175
|
+
private calculateTypeCompatibility;
|
|
176
|
+
private getVerbSpecificity;
|
|
177
|
+
private getRelevantFields;
|
|
178
|
+
private getMatchedPatterns;
|
|
179
|
+
private pruneRelationships;
|
|
180
|
+
private detectHierarchies;
|
|
181
|
+
private detectClusters;
|
|
182
|
+
private detectPatterns;
|
|
183
|
+
private calculateOverallConfidence;
|
|
184
|
+
private storeNeuralAnalysis;
|
|
185
|
+
private getDataTypeFromPath;
|
|
186
|
+
private generateRelationshipReasoning;
|
|
187
|
+
private extractRelationshipMetadata;
|
|
188
|
+
/**
|
|
189
|
+
* Assess data quality metrics
|
|
190
|
+
*/
|
|
191
|
+
private assessDataQuality;
|
|
192
|
+
/**
|
|
193
|
+
* Generate recommendations based on analysis
|
|
194
|
+
*/
|
|
195
|
+
private generateRecommendations;
|
|
196
|
+
}
|