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
83 lines
2.3 KiB
TypeScript
83 lines
2.3 KiB
TypeScript
/**
|
|
* 🧠 Brainy 3.0 - The Future of Neural Databases
|
|
*
|
|
* Beautiful, Professional, Planet-Scale, Fun to Use
|
|
* NO STUBS, NO MOCKS, REAL IMPLEMENTATION
|
|
*/
|
|
import { ImprovedNeuralAPI } from './neural/improvedNeuralAPI.js';
|
|
import { Entity, Relation, Result, AddParams, UpdateParams, RelateParams, FindParams, SimilarParams, GetRelationsParams, AddManyParams, DeleteManyParams, BatchResult, BrainyConfig } from './types/brainy.types.js';
|
|
/**
|
|
* The main Brainy class - Clean, Beautiful, Powerful
|
|
* REAL IMPLEMENTATION - No stubs, no mocks
|
|
*/
|
|
export declare class Brainy<T = any> {
|
|
private index;
|
|
private storage;
|
|
private embedder;
|
|
private distance;
|
|
private augmentationRegistry;
|
|
private config;
|
|
private _neural?;
|
|
private _nlp?;
|
|
private initialized;
|
|
private dimensions?;
|
|
constructor(config?: BrainyConfig);
|
|
/**
|
|
* Initialize Brainy - MUST be called before use
|
|
*/
|
|
init(): Promise<void>;
|
|
/**
|
|
* Ensure Brainy is initialized
|
|
*/
|
|
private ensureInitialized;
|
|
/**
|
|
* Add an entity to the database
|
|
*/
|
|
add(params: AddParams<T>): Promise<string>;
|
|
/**
|
|
* Get an entity by ID
|
|
*/
|
|
get(id: string): Promise<Entity<T> | null>;
|
|
/**
|
|
* Update an entity
|
|
*/
|
|
update(params: UpdateParams<T>): Promise<void>;
|
|
/**
|
|
* Delete an entity
|
|
*/
|
|
delete(id: string): Promise<void>;
|
|
/**
|
|
* Create a relationship between entities
|
|
*/
|
|
relate(params: RelateParams<T>): Promise<string>;
|
|
/**
|
|
* Delete a relationship
|
|
*/
|
|
unrelate(id: string): Promise<void>;
|
|
/**
|
|
* Get relationships
|
|
*/
|
|
getRelations(params?: GetRelationsParams): Promise<Relation<T>[]>;
|
|
/**
|
|
* Unified find method - supports natural language and structured queries
|
|
*/
|
|
find(query: string | FindParams<T>): Promise<Result<T>[]>;
|
|
/**
|
|
* Find similar entities
|
|
*/
|
|
similar(params: SimilarParams<T>): Promise<Result<T>[]>;
|
|
/**
|
|
* Add multiple entities
|
|
*/
|
|
addMany(params: AddManyParams<T>): Promise<BatchResult<string>>;
|
|
/**
|
|
* Delete multiple entities
|
|
*/
|
|
deleteMany(params: DeleteManyParams): Promise<BatchResult<string>>;
|
|
/**
|
|
* Neural API - Advanced AI operations
|
|
*/
|
|
neural(): ImprovedNeuralAPI;
|
|
}
|
|
export * from './types/brainy.types.js';
|
|
export { NounType, VerbType } from './types/graphTypes.js';
|