feat: v0.57.0 - rename CLI to brainy and Neural Import to Cortex

BREAKING CHANGES:
- CLI command renamed from 'cortex' to 'brainy'
- Neural Import renamed to Cortex augmentation
- Class CortexSenseAugmentation (was NeuralImportSenseAugmentation)

Benefits:
- npx @soulcraft/brainy now works automatically
- Better conceptual clarity: Cortex = AI intelligence layer
- Cleaner architecture: CLI = brainy, AI = Cortex, DB = BrainyData
This commit is contained in:
David Snelling 2025-08-07 20:13:02 -07:00
parent 27ce6c242d
commit bd39b71fbf
9 changed files with 136 additions and 88 deletions

View file

@ -2,6 +2,54 @@
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
## [0.57.0](https://github.com/soulcraft-research/brainy/compare/v0.56.0...v0.57.0) (2025-08-08)
### ⚠ BREAKING CHANGES
* CLI command renamed from `cortex` to `brainy`
* Neural Import renamed to Cortex augmentation
### Changed
* **CLI**: Renamed from `cortex` to `brainy` for better package alignment
- Now use `brainy chat` instead of `cortex chat`
- `npx @soulcraft/brainy` now works automatically
- Better alignment with package name
* **Cortex Augmentation**: Renamed from Neural Import
- Better conceptual clarity: Cortex = AI intelligence layer
- Class renamed: `CortexSenseAugmentation` (was `NeuralImportSenseAugmentation`)
- Augmentation name: `cortex-sense` (was `neural-import-sense`)
- The cortex is where thinking happens - perfect metaphor for AI processing
### Migration Guide
#### CLI Commands
```bash
# Old
cortex chat "What's in my data?"
cortex neural import data.csv
# New
brainy chat "What's in my data?"
brainy import data.csv --cortex
```
#### Code Changes
```typescript
// Old
import { NeuralImportSenseAugmentation } from '@soulcraft/brainy'
// New
import { CortexSenseAugmentation } from '@soulcraft/brainy'
```
### Why These Changes?
1. **CLI Alignment**: `brainy` command matches the package name `@soulcraft/brainy`
2. **Better Metaphor**: Cortex (brain's processing layer) better represents AI intelligence than generic "neural"
3. **Clearer Architecture**: CLI = brainy, AI = Cortex, Database = BrainyData
## [0.56.0](https://github.com/soulcraft-research/brainy/compare/v0.55.0...v0.56.0) (2025-08-08) ## [0.56.0](https://github.com/soulcraft-research/brainy/compare/v0.55.0...v0.56.0) (2025-08-08)
### Added ### Added

View file

@ -63,7 +63,7 @@ Throughput: 10K+ queries/second
- **Zero config** - no setup files, no tuning parameters - **Zero config** - no setup files, no tuning parameters
### 🧠 Built-in AI Intelligence (FREE) ### 🧠 Built-in AI Intelligence (FREE)
- **Neural Import**: AI understands your data structure automatically - **Cortex Augmentation**: AI understands your data structure automatically
- **Entity Detection**: Identifies people, companies, locations - **Entity Detection**: Identifies people, companies, locations
- **Relationship Mapping**: Discovers connections between entities - **Relationship Mapping**: Discovers connections between entities
- **Chat Interface**: Talk to your data naturally (v0.56+) - **Chat Interface**: Talk to your data naturally (v0.56+)
@ -145,23 +145,23 @@ const custom = new BrainyData({
</details> </details>
## 🎮 Cortex CLI - Command Center for Everything ## 🎮 Brainy CLI - Command Center for Everything
```bash ```bash
# Talk to your data # Talk to your data
cortex chat "What patterns do you see?" brainy chat "What patterns do you see?"
# AI-powered data import # AI-powered data import
cortex neural import data.csv --confidence 0.8 brainy import data.csv --cortex --confidence 0.8
# Real-time monitoring # Real-time monitoring
cortex monitor --dashboard brainy monitor --dashboard
# Start premium trials # Start premium trials
cortex license trial notion brainy license trial notion
``` ```
[📖 **Full Cortex Documentation**](/docs/cortex.md) [📖 **Full CLI Documentation**](/docs/brainy-cli.md)
## ⚙️ Configuration (Optional) ## ⚙️ Configuration (Optional)
@ -193,7 +193,7 @@ Brainy works with **zero configuration**, but you can customize
- **Asana** ($44/mo) - Project management - **Asana** ($44/mo) - Project management
```bash ```bash
cortex license trial notion # Start free trial brainy license trial notion # Start free trial
``` ```
**No vendor lock-in. Your data stays yours.** **No vendor lock-in. Your data stays yours.**
@ -306,7 +306,7 @@ Deploy anywhere: AWS, GCP, Azure, Cloudflare
- [Quick Start](docs/getting-started/) - [Quick Start](docs/getting-started/)
- [API Reference](docs/api-reference/) - [API Reference](docs/api-reference/)
- [Examples](docs/examples/) - [Examples](docs/examples/)
- [Cortex CLI](docs/cortex.md) - [Brainy CLI](docs/brainy-cli.md)
- [Performance Guide](docs/optimization-guides/) - [Performance Guide](docs/optimization-guides/)
## ❓ Does Brainy Impact Performance? ## ❓ Does Brainy Impact Performance?

View file

@ -1,7 +1,7 @@
#!/usr/bin/env node #!/usr/bin/env node
/** /**
* Cortex CLI - Beautiful command center for Brainy * Brainy CLI - Beautiful command center for the vector + graph database
*/ */
// @ts-ignore // @ts-ignore

View file

@ -24,7 +24,7 @@
| Component | Size | When Loaded | Impact | | Component | Size | When Loaded | Impact |
|-----------|------|------------|---------| |-----------|------|------------|---------|
| Core Brainy | 643KB | Always | Baseline | | Core Brainy | 643KB | Always | Baseline |
| Neural Import | +12KB | On demand | Optional | | Cortex | +12KB | On demand | Optional |
| Premium Connectors | +8KB each | Never (external) | **0%** | | Premium Connectors | +8KB each | Never (external) | **0%** |
| Monitoring | +5KB | On demand | Optional | | Monitoring | +5KB | On demand | Optional |
| Chat Interface | +7KB | On demand | Optional | | Chat Interface | +7KB | On demand | Optional |
@ -70,7 +70,7 @@ const brainy = new BrainyData({
## 📈 Actually IMPROVES Performance ## 📈 Actually IMPROVES Performance
### 1. Smarter Caching ### 1. Smarter Caching
- Neural Import pre-processes data for faster searches - Cortex pre-processes data for faster searches
- Augmentation pipeline can cache intermediate results - Augmentation pipeline can cache intermediate results
- 95%+ cache hit rates on repeated operations - 95%+ cache hit rates on repeated operations
@ -187,7 +187,7 @@ const brainy = new BrainyData({
### Customer C: AI Chat Platform ### Customer C: AI Chat Platform
- **Dataset**: 100K documents - **Dataset**: 100K documents
- **Usage**: RAG with chat interface - **Usage**: RAG with chat interface
- **Impact**: 30% faster responses (Neural Import preprocessing) - **Impact**: 30% faster responses (Cortex preprocessing)
--- ---

View file

@ -1,13 +1,13 @@
{ {
"name": "@soulcraft/brainy", "name": "@soulcraft/brainy",
"version": "0.56.0", "version": "0.57.0",
"description": "A vector graph database using HNSW indexing with Origin Private File System storage", "description": "A vector graph database using HNSW indexing with Origin Private File System storage",
"main": "dist/index.js", "main": "dist/index.js",
"module": "dist/index.js", "module": "dist/index.js",
"types": "dist/index.d.ts", "types": "dist/index.d.ts",
"type": "module", "type": "module",
"bin": { "bin": {
"cortex": "./bin/cortex.js" "brainy": "./bin/brainy.js"
}, },
"sideEffects": [ "sideEffects": [
"./dist/setup.js", "./dist/setup.js",

View file

@ -1,7 +1,7 @@
/** /**
* Neural Import SENSE Augmentation - Atomic Age AI-Powered Data Understanding * Cortex SENSE Augmentation - Atomic Age AI-Powered Data Understanding
* *
* 🧠 The brain-in-jar's sensory system for perceiving and structuring data * 🧠 The cerebral cortex layer for intelligent data processing
* Complete with confidence scoring and relationship weight calculation * Complete with confidence scoring and relationship weight calculation
*/ */
@ -11,12 +11,12 @@ import { NounType, VerbType } from '../types/graphTypes.js'
import * as fs from 'fs/promises' import * as fs from 'fs/promises'
import * as path from 'path' import * as path from 'path'
// Neural Import Types // Cortex Analysis Types
export interface NeuralAnalysisResult { export interface CortexAnalysisResult {
detectedEntities: DetectedEntity[] detectedEntities: DetectedEntity[]
detectedRelationships: DetectedRelationship[] detectedRelationships: DetectedRelationship[]
confidence: number confidence: number
insights: NeuralInsight[] insights: CortexInsight[]
} }
export interface DetectedEntity { export interface DetectedEntity {
@ -39,7 +39,7 @@ export interface DetectedRelationship {
metadata?: Record<string, any> metadata?: Record<string, any>
} }
export interface NeuralInsight { export interface CortexInsight {
type: 'hierarchy' | 'cluster' | 'pattern' | 'anomaly' | 'opportunity' type: 'hierarchy' | 'cluster' | 'pattern' | 'anomaly' | 'opportunity'
description: string description: string
confidence: number confidence: number
@ -47,7 +47,7 @@ export interface NeuralInsight {
recommendation?: string recommendation?: string
} }
export interface NeuralImportSenseConfig { export interface CortexSenseConfig {
confidenceThreshold: number confidenceThreshold: number
enableWeights: boolean enableWeights: boolean
skipDuplicates: boolean skipDuplicates: boolean
@ -57,15 +57,15 @@ export interface NeuralImportSenseConfig {
/** /**
* Neural Import SENSE Augmentation - The Brain's Perceptual System * Neural Import SENSE Augmentation - The Brain's Perceptual System
*/ */
export class NeuralImportSenseAugmentation implements ISenseAugmentation { export class CortexSenseAugmentation implements ISenseAugmentation {
readonly name: string = 'neural-import-sense' readonly name: string = 'cortex-sense'
readonly description: string = 'AI-powered data understanding and structuring augmentation' readonly description: string = 'AI-powered cortex for intelligent data understanding'
enabled: boolean = true enabled: boolean = true
private brainy: BrainyData private brainy: BrainyData
private config: NeuralImportSenseConfig private config: CortexSenseConfig
constructor(brainy: BrainyData, config: Partial<NeuralImportSenseConfig> = {}) { constructor(brainy: BrainyData, config: Partial<CortexSenseConfig> = {}) {
this.brainy = brainy this.brainy = brainy
this.config = { this.config = {
confidenceThreshold: 0.7, confidenceThreshold: 0.7,
@ -76,8 +76,8 @@ export class NeuralImportSenseAugmentation implements ISenseAugmentation {
} }
async initialize(): Promise<void> { async initialize(): Promise<void> {
// Initialize the neural analysis system // Initialize the cortex analysis system
console.log('🧠 Neural Import SENSE augmentation initialized') console.log('🧠 Cortex SENSE augmentation initialized')
} }
async shutDown(): Promise<void> { async shutDown(): Promise<void> {
@ -125,7 +125,7 @@ export class NeuralImportSenseAugmentation implements ISenseAugmentation {
nouns, nouns,
verbs, verbs,
confidence: analysis.confidence, confidence: analysis.confidence,
insights: analysis.insights.map(insight => ({ insights: analysis.insights.map((insight: any) => ({
type: insight.type, type: insight.type,
description: insight.description, description: insight.description,
confidence: insight.confidence confidence: insight.confidence
@ -286,7 +286,7 @@ export class NeuralImportSenseAugmentation implements ISenseAugmentation {
const suggestions: string[] = [] const suggestions: string[] = []
// Check for low confidence entities // Check for low confidence entities
const lowConfidenceEntities = analysis.detectedEntities.filter(e => e.confidence < 0.5) const lowConfidenceEntities = analysis.detectedEntities.filter((e: any) => e.confidence < 0.5)
if (lowConfidenceEntities.length > 0) { if (lowConfidenceEntities.length > 0) {
issues.push({ issues.push({
type: 'confidence', type: 'confidence',
@ -318,7 +318,7 @@ export class NeuralImportSenseAugmentation implements ISenseAugmentation {
} }
// Check for data completeness // Check for data completeness
const incompleteEntities = analysis.detectedEntities.filter(e => const incompleteEntities = analysis.detectedEntities.filter((e: any) =>
!e.originalData || Object.keys(e.originalData).length < 2 !e.originalData || Object.keys(e.originalData).length < 2
) )
if (incompleteEntities.length > 0) { if (incompleteEntities.length > 0) {
@ -360,7 +360,7 @@ export class NeuralImportSenseAugmentation implements ISenseAugmentation {
/** /**
* Get the full neural analysis result (custom method for Cortex integration) * Get the full neural analysis result (custom method for Cortex integration)
*/ */
async getNeuralAnalysis(rawData: Buffer | string, dataType: string): Promise<NeuralAnalysisResult> { async getNeuralAnalysis(rawData: Buffer | string, dataType: string): Promise<CortexAnalysisResult> {
const parsedData = await this.parseRawData(rawData, dataType) const parsedData = await this.parseRawData(rawData, dataType)
return await this.performNeuralAnalysis(parsedData) return await this.performNeuralAnalysis(parsedData)
} }
@ -421,7 +421,7 @@ export class NeuralImportSenseAugmentation implements ISenseAugmentation {
/** /**
* Perform neural analysis on parsed data * Perform neural analysis on parsed data
*/ */
private async performNeuralAnalysis(parsedData: any[], config = this.config): Promise<NeuralAnalysisResult> { private async performNeuralAnalysis(parsedData: any[], config = this.config): Promise<CortexAnalysisResult> {
// Phase 1: Neural Entity Detection // Phase 1: Neural Entity Detection
const detectedEntities = await this.detectEntitiesWithNeuralAnalysis(parsedData, config) const detectedEntities = await this.detectEntitiesWithNeuralAnalysis(parsedData, config)
@ -429,7 +429,7 @@ export class NeuralImportSenseAugmentation implements ISenseAugmentation {
const detectedRelationships = await this.detectRelationshipsWithNeuralAnalysis(detectedEntities, parsedData, config) const detectedRelationships = await this.detectRelationshipsWithNeuralAnalysis(detectedEntities, parsedData, config)
// Phase 3: Neural Insights Generation // Phase 3: Neural Insights Generation
const insights = await this.generateNeuralInsights(detectedEntities, detectedRelationships) const insights = await this.generateCortexInsights(detectedEntities, detectedRelationships)
// Phase 4: Confidence Scoring // Phase 4: Confidence Scoring
const overallConfidence = this.calculateOverallConfidence(detectedEntities, detectedRelationships) const overallConfidence = this.calculateOverallConfidence(detectedEntities, detectedRelationships)
@ -698,8 +698,8 @@ export class NeuralImportSenseAugmentation implements ISenseAugmentation {
/** /**
* Generate Neural Insights - The Intelligence Layer * Generate Neural Insights - The Intelligence Layer
*/ */
private async generateNeuralInsights(entities: DetectedEntity[], relationships: DetectedRelationship[]): Promise<NeuralInsight[]> { private async generateCortexInsights(entities: DetectedEntity[], relationships: DetectedRelationship[]): Promise<CortexInsight[]> {
const insights: NeuralInsight[] = [] const insights: CortexInsight[] = []
// Detect hierarchies // Detect hierarchies
const hierarchies = this.detectHierarchies(relationships) const hierarchies = this.detectHierarchies(relationships)
@ -842,13 +842,13 @@ export class NeuralImportSenseAugmentation implements ISenseAugmentation {
private calculateOverallConfidence(entities: DetectedEntity[], relationships: DetectedRelationship[]): number { private calculateOverallConfidence(entities: DetectedEntity[], relationships: DetectedRelationship[]): number {
if (entities.length === 0) return 0 if (entities.length === 0) return 0
const entityConfidence = entities.reduce((sum, e) => sum + e.confidence, 0) / entities.length const entityConfidence = entities.reduce((sum: number, e: any) => sum + e.confidence, 0) / entities.length
if (relationships.length === 0) return entityConfidence if (relationships.length === 0) return entityConfidence
const relationshipConfidence = relationships.reduce((sum, r) => sum + r.confidence, 0) / relationships.length const relationshipConfidence = relationships.reduce((sum: number, r: any) => sum + r.confidence, 0) / relationships.length
return (entityConfidence + relationshipConfidence) / 2 return (entityConfidence + relationshipConfidence) / 2
} }
private async storeNeuralAnalysis(analysis: NeuralAnalysisResult): Promise<void> { private async storeNeuralAnalysis(analysis: CortexAnalysisResult): Promise<void> {
// Store the full analysis result for later retrieval by Cortex or other systems // Store the full analysis result for later retrieval by Cortex or other systems
// This could be stored in the brainy instance metadata or a separate analysis store // This could be stored in the brainy instance metadata or a separate analysis store
} }
@ -886,7 +886,7 @@ export class NeuralImportSenseAugmentation implements ISenseAugmentation {
/** /**
* Assess data quality metrics * Assess data quality metrics
*/ */
private assessDataQuality(parsedData: any[], analysis: NeuralAnalysisResult): { private assessDataQuality(parsedData: any[], analysis: CortexAnalysisResult): {
completeness: number completeness: number
consistency: number consistency: number
accuracy: number accuracy: number
@ -921,7 +921,7 @@ export class NeuralImportSenseAugmentation implements ISenseAugmentation {
// Accuracy: average confidence of detected entities // Accuracy: average confidence of detected entities
const accuracy = analysis.detectedEntities.length > 0 ? const accuracy = analysis.detectedEntities.length > 0 ?
analysis.detectedEntities.reduce((sum, e) => sum + e.confidence, 0) / analysis.detectedEntities.length : analysis.detectedEntities.reduce((sum: number, e: any) => sum + e.confidence, 0) / analysis.detectedEntities.length :
0 0
return { return {
@ -936,7 +936,7 @@ export class NeuralImportSenseAugmentation implements ISenseAugmentation {
*/ */
private generateRecommendations( private generateRecommendations(
parsedData: any[], parsedData: any[],
analysis: NeuralAnalysisResult, analysis: CortexAnalysisResult,
entityTypes: Array<{ type: string; count: number; confidence: number }>, entityTypes: Array<{ type: string; count: number; confidence: number }>,
relationshipTypes: Array<{ type: string; count: number; confidence: number }> relationshipTypes: Array<{ type: string; count: number; confidence: number }>
): string[] { ): string[] {

View file

@ -1893,14 +1893,14 @@ export class Cortex {
} }
/** /**
* Neural Import System - AI-Powered Data Understanding * Cortex Augmentation System - AI-Powered Data Understanding
*/ */
async neuralImport(filePath: string, options: any = {}): Promise<void> { async neuralImport(filePath: string, options: any = {}): Promise<void> {
await this.ensureInitialized() await this.ensureInitialized()
// Import and create the Neural Import SENSE augmentation // Import and create the Cortex SENSE augmentation
const { NeuralImportSenseAugmentation } = await import('../augmentations/neuralImportSense.js') const { CortexSenseAugmentation } = await import('../augmentations/cortexSense.js')
const neuralSense = new NeuralImportSenseAugmentation(this.brainy!, options) const neuralSense = new CortexSenseAugmentation(this.brainy!, options)
// Initialize the augmentation // Initialize the augmentation
await neuralSense.initialize() await neuralSense.initialize()
@ -1915,7 +1915,7 @@ export class Cortex {
const result = await neuralSense.processRawData(fileContent, dataType, options) const result = await neuralSense.processRawData(fileContent, dataType, options)
if (result.success) { if (result.success) {
console.log(colors.success('✅ Neural import completed successfully')) console.log(colors.success('✅ Cortex import completed successfully'))
// Display summary // Display summary
console.log(colors.primary(`📊 Processed: ${result.data.nouns.length} entities, ${result.data.verbs.length} relationships`)) console.log(colors.primary(`📊 Processed: ${result.data.nouns.length} entities, ${result.data.verbs.length} relationships`))
@ -1926,12 +1926,12 @@ export class Cortex {
if (result.data.insights && result.data.insights.length > 0) { if (result.data.insights && result.data.insights.length > 0) {
console.log(colors.brain('\n🧠 Neural Insights:')) console.log(colors.brain('\n🧠 Neural Insights:'))
result.data.insights.forEach(insight => { result.data.insights.forEach((insight: any) => {
console.log(` ${colors.accent('◆')} ${insight.description} (${(insight.confidence * 100).toFixed(1)}%)`) console.log(` ${colors.accent('◆')} ${insight.description} (${(insight.confidence * 100).toFixed(1)}%)`)
}) })
} }
} else { } else {
console.error(colors.error('❌ Neural import failed:'), result.error) console.error(colors.error('❌ Cortex import failed:'), result.error)
} }
} finally { } finally {
@ -1942,8 +1942,8 @@ export class Cortex {
async neuralAnalyze(filePath: string): Promise<void> { async neuralAnalyze(filePath: string): Promise<void> {
await this.ensureInitialized() await this.ensureInitialized()
const { NeuralImportSenseAugmentation } = await import('../augmentations/neuralImportSense.js') const { CortexSenseAugmentation } = await import('../augmentations/cortexSense.js')
const neuralSense = new NeuralImportSenseAugmentation(this.brainy!) const neuralSense = new CortexSenseAugmentation(this.brainy!)
await neuralSense.initialize() await neuralSense.initialize()
@ -1966,7 +1966,7 @@ export class Cortex {
if (result.data.recommendations.length > 0) { if (result.data.recommendations.length > 0) {
console.log(colors.brain('\n💡 Recommendations:')) console.log(colors.brain('\n💡 Recommendations:'))
result.data.recommendations.forEach(rec => { result.data.recommendations.forEach((rec: any) => {
console.log(` ${colors.accent('◆')} ${rec}`) console.log(` ${colors.accent('◆')} ${rec}`)
}) })
} }
@ -1982,8 +1982,8 @@ export class Cortex {
async neuralValidate(filePath: string): Promise<void> { async neuralValidate(filePath: string): Promise<void> {
await this.ensureInitialized() await this.ensureInitialized()
const { NeuralImportSenseAugmentation } = await import('../augmentations/neuralImportSense.js') const { CortexSenseAugmentation } = await import('../augmentations/cortexSense.js')
const neuralSense = new NeuralImportSenseAugmentation(this.brainy!) const neuralSense = new CortexSenseAugmentation(this.brainy!)
await neuralSense.initialize() await neuralSense.initialize()
@ -2009,7 +2009,7 @@ export class Cortex {
if (result.data.issues.length > 0) { if (result.data.issues.length > 0) {
console.log(colors.warning('\n⚠ Issues:')) console.log(colors.warning('\n⚠ Issues:'))
result.data.issues.forEach(issue => { result.data.issues.forEach((issue: any) => {
const severityColor = issue.severity === 'high' ? colors.error : const severityColor = issue.severity === 'high' ? colors.error :
issue.severity === 'medium' ? colors.warning : colors.dim issue.severity === 'medium' ? colors.warning : colors.dim
console.log(` ${severityColor(`[${issue.severity.toUpperCase()}]`)} ${issue.description}`) console.log(` ${severityColor(`[${issue.severity.toUpperCase()}]`)} ${issue.description}`)
@ -2018,7 +2018,7 @@ export class Cortex {
if (result.data.suggestions.length > 0) { if (result.data.suggestions.length > 0) {
console.log(colors.brain('\n💡 Suggestions:')) console.log(colors.brain('\n💡 Suggestions:'))
result.data.suggestions.forEach(suggestion => { result.data.suggestions.forEach((suggestion: any) => {
console.log(` ${colors.accent('◆')} ${suggestion}`) console.log(` ${colors.accent('◆')} ${suggestion}`)
}) })
} }
@ -2056,7 +2056,7 @@ export class Cortex {
console.log(` ${colors.primary('•')} ${key}: ${colors.dim(value)}`) console.log(` ${colors.primary('•')} ${key}: ${colors.dim(value)}`)
}) })
console.log(`\n${colors.dim('Use')} ${colors.primary('cortex neural import <file>')} ${colors.dim('to leverage the full type system!')}`) console.log(`\n${colors.dim('Use')} ${colors.primary('brainy import --cortex <file>')} ${colors.dim('to leverage the full AI type system!')}`)
} }
/** /**
@ -2349,15 +2349,15 @@ export class Cortex {
const { DefaultAugmentationRegistry } = await import('../shared/default-augmentations.js') const { DefaultAugmentationRegistry } = await import('../shared/default-augmentations.js')
const registry = new DefaultAugmentationRegistry(this.brainy!) const registry = new DefaultAugmentationRegistry(this.brainy!)
// Check Neural Import health (default augmentation) // Check Cortex health (default augmentation)
const neuralHealth = await registry.checkNeuralImportHealth() const cortexHealth = await registry.checkCortexHealth()
console.log(`\n${this.emojis.sparkles} ${this.colors.accent('Default Augmentations:')}`) console.log(`\n${this.emojis.sparkles} ${this.colors.accent('Default Augmentations:')}`)
console.log(` ${this.emojis.brain} Neural Import: ${neuralHealth.available ? this.colors.success('Active') : this.colors.error('Inactive')}`) console.log(` ${this.emojis.brain} Cortex: ${cortexHealth.available ? this.colors.success('Active') : this.colors.error('Inactive')}`)
if (neuralHealth.version) { if (cortexHealth.version) {
console.log(` ${this.colors.dim('Version:')} ${neuralHealth.version}`) console.log(` ${this.colors.dim('Version:')} ${cortexHealth.version}`)
} }
console.log(` ${this.colors.dim('Status:')} ${neuralHealth.status}`) console.log(` ${this.colors.dim('Status:')} ${cortexHealth.status}`)
console.log(` ${this.colors.dim('Category:')} SENSE (AI-powered data understanding)`) console.log(` ${this.colors.dim('Category:')} SENSE (AI-powered data understanding)`)
console.log(` ${this.colors.dim('License:')} Open Source (included by default)`) console.log(` ${this.colors.dim('License:')} Open Source (included by default)`)
@ -2386,7 +2386,7 @@ export class Cortex {
// Augmentation pipeline health // Augmentation pipeline health
console.log(`\n${this.emojis.health} ${this.colors.accent('Pipeline Health:')}`) console.log(`\n${this.emojis.health} ${this.colors.accent('Pipeline Health:')}`)
console.log(` ${this.emojis.check} SENSE Pipeline: ${this.colors.success('1 active')} (Neural Import)`) console.log(` ${this.emojis.check} SENSE Pipeline: ${this.colors.success('1 active')} (Cortex)`)
console.log(` ${this.emojis.info} CONDUIT Pipeline: ${this.colors.dim('0 active')} (Premium connectors available)`) console.log(` ${this.emojis.info} CONDUIT Pipeline: ${this.colors.dim('0 active')} (Premium connectors available)`)
console.log(` ${this.emojis.info} COGNITION Pipeline: ${this.colors.dim('0 active')}`) console.log(` ${this.emojis.info} COGNITION Pipeline: ${this.colors.dim('0 active')}`)
console.log(` ${this.emojis.info} MEMORY Pipeline: ${this.colors.dim('0 active')}`) console.log(` ${this.emojis.info} MEMORY Pipeline: ${this.colors.dim('0 active')}`)

View file

@ -25,25 +25,25 @@ export class DefaultAugmentationRegistry {
async initializeDefaults(): Promise<void> { async initializeDefaults(): Promise<void> {
console.log('🧠⚛️ Initializing default augmentations...') console.log('🧠⚛️ Initializing default augmentations...')
// Register Neural Import as default SENSE augmentation // Register Cortex as default SENSE augmentation
await this.registerNeuralImport() await this.registerCortex()
console.log('🧠⚛️ Default augmentations initialized') console.log('🧠⚛️ Default augmentations initialized')
} }
/** /**
* Neural Import - Default SENSE Augmentation * Cortex - Default SENSE Augmentation
* AI-powered data understanding and entity extraction * AI-powered data understanding and entity extraction
*/ */
private async registerNeuralImport(): Promise<void> { private async registerCortex(): Promise<void> {
try { try {
// Import the Neural Import augmentation // Import the Cortex augmentation
const { NeuralImportSenseAugmentation } = await import('../augmentations/neuralImportSense.js') const { CortexSenseAugmentation } = await import('../augmentations/cortexSense.js')
// Note: The actual registration is commented out since BrainyData doesn't have addAugmentation method yet // Note: The actual registration is commented out since BrainyData doesn't have addAugmentation method yet
// This would create instance with default configuration // This would create instance with default configuration
/* /*
const neuralImport = new NeuralImportSenseAugmentation(this.brainy as any, { const cortex = new CortexSenseAugmentation(this.brainy as any, {
confidenceThreshold: 0.7, confidenceThreshold: 0.7,
enableWeights: true, enableWeights: true,
skipDuplicates: true skipDuplicates: true
@ -51,38 +51,38 @@ export class DefaultAugmentationRegistry {
// Add as SENSE augmentation to Brainy (when method is available) // Add as SENSE augmentation to Brainy (when method is available)
if (this.brainy.addAugmentation) { if (this.brainy.addAugmentation) {
await this.brainy.addAugmentation('SENSE', neuralImport, { await this.brainy.addAugmentation('SENSE', cortex, {
position: 1, // First in the SENSE pipeline position: 1, // First in the SENSE pipeline
name: 'neural-import', name: 'cortex',
autoStart: true autoStart: true
}) })
} }
*/ */
console.log('🧠⚛️ Neural Import module loaded (awaiting BrainyData augmentation support)') console.log('🧠⚛️ Cortex module loaded (awaiting BrainyData augmentation support)')
} catch (error) { } catch (error) {
console.error('❌ Failed to register Neural Import:', error instanceof Error ? error.message : String(error)) console.error('❌ Failed to register Cortex:', error instanceof Error ? error.message : String(error))
// Don't throw - Brainy should still work without Neural Import // Don't throw - Brainy should still work without Neural Import
} }
} }
/** /**
* Check if Neural Import is available and working * Check if Cortex is available and working
*/ */
async checkNeuralImportHealth(): Promise<{ async checkCortexHealth(): Promise<{
available: boolean available: boolean
status: string status: string
version?: string version?: string
}> { }> {
try { try {
// Check if Neural Import is registered as an augmentation // Check if Cortex is registered as an augmentation
// Note: hasAugmentation method doesn't exist yet in BrainyData // Note: hasAugmentation method doesn't exist yet in BrainyData
const hasNeuralImport = false // this.brainy.hasAugmentation && this.brainy.hasAugmentation('SENSE', 'neural-import') const hasCortex = false // this.brainy.hasAugmentation && this.brainy.hasAugmentation('SENSE', 'cortex')
return { return {
available: hasNeuralImport || false, available: hasCortex || false,
status: hasNeuralImport ? 'active' : 'not registered (awaiting BrainyData support)', status: hasCortex ? 'active' : 'not registered (awaiting BrainyData support)',
version: '1.0.0' version: '1.0.0'
} }
} catch (error) { } catch (error) {
@ -94,16 +94,16 @@ export class DefaultAugmentationRegistry {
} }
/** /**
* Reinstall Neural Import if it's missing or corrupted * Reinstall Cortex if it's missing or corrupted
*/ */
async reinstallNeuralImport(): Promise<void> { async reinstallCortex(): Promise<void> {
try { try {
// Remove existing if present // Remove existing if present
// Note: removeAugmentation method doesn't exist yet in BrainyData // Note: removeAugmentation method doesn't exist yet in BrainyData
/* /*
if (this.brainy.removeAugmentation) { if (this.brainy.removeAugmentation) {
try { try {
await this.brainy.removeAugmentation('SENSE', 'neural-import') await this.brainy.removeAugmentation('SENSE', 'cortex')
} catch (error) { } catch (error) {
// Ignore errors if augmentation doesn't exist // Ignore errors if augmentation doesn't exist
} }
@ -111,11 +111,11 @@ export class DefaultAugmentationRegistry {
*/ */
// Re-register // Re-register
await this.registerNeuralImport() await this.registerCortex()
console.log('🧠⚛️ Neural Import reinstalled successfully') console.log('🧠⚛️ Cortex reinstalled successfully')
} catch (error) { } catch (error) {
throw new Error(`Failed to reinstall Neural Import: ${error instanceof Error ? error.message : String(error)}`) throw new Error(`Failed to reinstall Cortex: ${error instanceof Error ? error.message : String(error)}`)
} }
} }
} }