chore: recovery checkpoint - v3.0 API successfully recovered
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
This commit is contained in:
parent
f65455fb22
commit
8ff382ca3b
895 changed files with 143654 additions and 28268 deletions
106
.recovery-workspace/dist-backup-20250910-141917/demo.d.ts
vendored
Normal file
106
.recovery-workspace/dist-backup-20250910-141917/demo.d.ts
vendored
Normal file
|
|
@ -0,0 +1,106 @@
|
|||
/**
|
||||
* Demo-specific entry point for browser environments
|
||||
* This excludes all Node.js-specific functionality to avoid import issues
|
||||
*/
|
||||
import { MemoryStorage } from './storage/adapters/memoryStorage.js';
|
||||
import { OPFSStorage } from './storage/adapters/opfsStorage.js';
|
||||
export interface Vector extends Array<number> {
|
||||
}
|
||||
export interface SearchResult {
|
||||
id: string;
|
||||
score: number;
|
||||
metadata: any;
|
||||
text?: string;
|
||||
}
|
||||
export interface VerbData {
|
||||
id: string;
|
||||
source: string;
|
||||
target: string;
|
||||
verb: string;
|
||||
metadata: any;
|
||||
timestamp: number;
|
||||
}
|
||||
/**
|
||||
* Simplified Brainy class for demo purposes
|
||||
* Only includes browser-compatible functionality
|
||||
*/
|
||||
export declare class DemoBrainy {
|
||||
private storage;
|
||||
private embedder;
|
||||
private initialized;
|
||||
private vectors;
|
||||
private metadata;
|
||||
private verbs;
|
||||
constructor();
|
||||
/**
|
||||
* Initialize the database
|
||||
*/
|
||||
init(): Promise<void>;
|
||||
/**
|
||||
* Add a document to the database
|
||||
*/
|
||||
add(text: string, metadata?: any): Promise<string>;
|
||||
/**
|
||||
* Search for similar documents
|
||||
*/
|
||||
searchText(query: string, limit?: number): Promise<SearchResult[]>;
|
||||
/**
|
||||
* Add a relationship between two documents
|
||||
*/
|
||||
addVerb(sourceId: string, targetId: string, verb: string, metadata?: any): Promise<string>;
|
||||
/**
|
||||
* Get relationships from a source document
|
||||
*/
|
||||
getVerbsBySource(sourceId: string): Promise<VerbData[]>;
|
||||
/**
|
||||
* Get a document by ID
|
||||
*/
|
||||
get(id: string): Promise<any | null>;
|
||||
/**
|
||||
* Delete a document
|
||||
*/
|
||||
delete(id: string): Promise<boolean>;
|
||||
/**
|
||||
* Update document metadata
|
||||
*/
|
||||
updateMetadata(id: string, newMetadata: any): Promise<boolean>;
|
||||
/**
|
||||
* Get the number of documents
|
||||
*/
|
||||
size(): number;
|
||||
/**
|
||||
* Generate a random ID
|
||||
*/
|
||||
private generateId;
|
||||
/**
|
||||
* Get storage info
|
||||
*/
|
||||
getStorage(): MemoryStorage | OPFSStorage;
|
||||
}
|
||||
export declare const NounType: {
|
||||
readonly Person: "Person";
|
||||
readonly Organization: "Organization";
|
||||
readonly Location: "Location";
|
||||
readonly Thing: "Thing";
|
||||
readonly Concept: "Concept";
|
||||
readonly Event: "Event";
|
||||
readonly Document: "Document";
|
||||
readonly Media: "Media";
|
||||
readonly File: "File";
|
||||
readonly Message: "Message";
|
||||
readonly Content: "Content";
|
||||
};
|
||||
export declare const VerbType: {
|
||||
readonly RelatedTo: "related_to";
|
||||
readonly Contains: "contains";
|
||||
readonly PartOf: "part_of";
|
||||
readonly LocatedAt: "located_at";
|
||||
readonly References: "references";
|
||||
readonly Owns: "owns";
|
||||
readonly CreatedBy: "created_by";
|
||||
readonly BelongsTo: "belongs_to";
|
||||
readonly Likes: "likes";
|
||||
readonly Follows: "follows";
|
||||
};
|
||||
export { DemoBrainy as Brainy };
|
||||
export default DemoBrainy;
|
||||
Loading…
Add table
Add a link
Reference in a new issue