From 791fac54cd957aed16e30bff81ab2b358a7c487b Mon Sep 17 00:00:00 2001 From: David Snelling Date: Tue, 30 Sep 2025 16:04:00 -0700 Subject: [PATCH] refactor: remove deprecated BrainyData class completely Removes all traces of BrainyData to prevent user confusion: - Renamed brainyDataInterface.ts to brainyInterface.ts for clarity - Updated all imports and type references across 5 files - Removed BrainyData compiled artifacts (handled by clean build) - Added deprecation notice to CHANGELOG with migration guide BrainyData was never part of official Brainy 3.0 API but existed as legacy compiled artifacts. Users mistakenly imported it thinking neural API was missing, when it exists in modern Brainy class. All users should migrate to: new Brainy() with await brain.init() Neural API available via: brain.neural().visualize() etc. Resolves confusion reported by Brain Studio team. --- CHANGELOG.md | 9 +++++++++ src/brainy.ts | 2 +- src/mcp/brainyMCPAdapter.ts | 2 +- src/mcp/brainyMCPBroadcast.ts | 2 +- src/mcp/brainyMCPService.ts | 2 +- src/neural/embeddedPatterns.ts | 2 +- src/shared/default-augmentations.ts | 2 +- src/types/{brainyDataInterface.ts => brainyInterface.ts} | 0 8 files changed, 15 insertions(+), 6 deletions(-) rename src/types/{brainyDataInterface.ts => brainyInterface.ts} (100%) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7207bd02..0cafefae 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,15 @@ All notable changes to this project will be documented in this file. See [standa - Adds mutex-based concurrency control for mkdir operations - Adds explicit compression tracking for file reads +### BREAKING CHANGES (Deprecated API Removal) + +* **removed BrainyData**: The deprecated `BrainyData` class has been completely removed + - `BrainyData` was never part of the official Brainy 3.0 API + - All users should migrate to the `Brainy` class + - Migration is simple: Replace `new BrainyData()` with `new Brainy()` and add `await brain.init()` + - See `.strategy/NEURAL_API_RESPONSE.md` for complete migration guide + - Renamed `brainyDataInterface.ts` to `brainyInterface.ts` for clarity + ### [3.19.1](https://github.com/soulcraftlabs/brainy/compare/v3.19.0...v3.19.1) (2025-09-29) ## [3.19.0](https://github.com/soulcraftlabs/brainy/compare/v3.18.0...v3.19.0) (2025-09-29) diff --git a/src/brainy.ts b/src/brainy.ts index 99247c88..2c7a4fdd 100644 --- a/src/brainy.ts +++ b/src/brainy.ts @@ -49,7 +49,7 @@ import { BrainyConfig } from './types/brainy.types.js' import { NounType, VerbType } from './types/graphTypes.js' -import { BrainyInterface } from './types/brainyDataInterface.js' +import { BrainyInterface } from './types/brainyInterface.js' /** * The main Brainy class - Clean, Beautiful, Powerful diff --git a/src/mcp/brainyMCPAdapter.ts b/src/mcp/brainyMCPAdapter.ts index c51f23a5..11e43d43 100644 --- a/src/mcp/brainyMCPAdapter.ts +++ b/src/mcp/brainyMCPAdapter.ts @@ -7,7 +7,7 @@ */ import { v4 as uuidv4 } from '../universal/uuid.js' -import { BrainyInterface } from '../types/brainyDataInterface.js' +import { BrainyInterface } from '../types/brainyInterface.js' import { NounType } from '../types/graphTypes.js' import { MCPRequest, diff --git a/src/mcp/brainyMCPBroadcast.ts b/src/mcp/brainyMCPBroadcast.ts index 65dcaf60..314e891f 100644 --- a/src/mcp/brainyMCPBroadcast.ts +++ b/src/mcp/brainyMCPBroadcast.ts @@ -14,7 +14,7 @@ import { WebSocketServer, WebSocket } from 'ws' import { createServer, IncomingMessage } from 'node:http' import { BrainyMCPService } from './brainyMCPService.js' -import { BrainyInterface } from '../types/brainyDataInterface.js' +import { BrainyInterface } from '../types/brainyInterface.js' import { MCPServiceOptions } from '../types/mcpTypes.js' import { v4 as uuidv4 } from '../universal/uuid.js' diff --git a/src/mcp/brainyMCPService.ts b/src/mcp/brainyMCPService.ts index 7b35872f..d933dbe8 100644 --- a/src/mcp/brainyMCPService.ts +++ b/src/mcp/brainyMCPService.ts @@ -8,7 +8,7 @@ */ import { v4 as uuidv4 } from '../universal/uuid.js' -import { BrainyInterface } from '../types/brainyDataInterface.js' +import { BrainyInterface } from '../types/brainyInterface.js' import { MCPRequest, MCPResponse, diff --git a/src/neural/embeddedPatterns.ts b/src/neural/embeddedPatterns.ts index d68cf6d0..0d6a0d19 100644 --- a/src/neural/embeddedPatterns.ts +++ b/src/neural/embeddedPatterns.ts @@ -2,7 +2,7 @@ * 🧠 BRAINY EMBEDDED PATTERNS * * AUTO-GENERATED - DO NOT EDIT - * Generated: 2025-09-29T17:05:30.153Z + * Generated: 2025-09-30T23:01:33.167Z * Patterns: 220 * Coverage: 94-98% of all queries * diff --git a/src/shared/default-augmentations.ts b/src/shared/default-augmentations.ts index b82bc0c0..efd4e3d9 100644 --- a/src/shared/default-augmentations.ts +++ b/src/shared/default-augmentations.ts @@ -5,7 +5,7 @@ * These are the core "sensory organs" of the atomic age brain-in-jar system */ -import { BrainyInterface } from '../types/brainyDataInterface.js' +import { BrainyInterface } from '../types/brainyInterface.js' /** * Default augmentations that ship with Brainy diff --git a/src/types/brainyDataInterface.ts b/src/types/brainyInterface.ts similarity index 100% rename from src/types/brainyDataInterface.ts rename to src/types/brainyInterface.ts