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
50
.recovery-workspace/dist-backup-20250910-141917/api/SecurityAPI.d.ts
vendored
Normal file
50
.recovery-workspace/dist-backup-20250910-141917/api/SecurityAPI.d.ts
vendored
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
/**
|
||||
* Security API for Brainy 3.0
|
||||
* Provides encryption, decryption, hashing, and secure storage
|
||||
*/
|
||||
export declare class SecurityAPI {
|
||||
private config?;
|
||||
private encryptionKey?;
|
||||
constructor(config?: {
|
||||
encryptionKey?: string;
|
||||
} | undefined);
|
||||
/**
|
||||
* Encrypt data using AES-256-CBC
|
||||
*/
|
||||
encrypt(data: string): Promise<string>;
|
||||
/**
|
||||
* Decrypt data encrypted with encrypt()
|
||||
*/
|
||||
decrypt(encryptedData: string): Promise<string>;
|
||||
/**
|
||||
* Create a one-way hash of data (for passwords, etc)
|
||||
*/
|
||||
hash(data: string, algorithm?: 'sha256' | 'sha512'): Promise<string>;
|
||||
/**
|
||||
* Compare data with a hash (for password verification)
|
||||
*/
|
||||
compare(data: string, hash: string, algorithm?: 'sha256' | 'sha512'): Promise<boolean>;
|
||||
/**
|
||||
* Generate a secure random token
|
||||
*/
|
||||
generateToken(bytes?: number): Promise<string>;
|
||||
/**
|
||||
* Derive a key from a password using PBKDF2
|
||||
* Note: Simplified version using hash instead of PBKDF2 which may not be available
|
||||
*/
|
||||
deriveKey(password: string, salt?: string, iterations?: number): Promise<{
|
||||
key: string;
|
||||
salt: string;
|
||||
}>;
|
||||
/**
|
||||
* Sign data with HMAC
|
||||
*/
|
||||
sign(data: string, secret?: string): Promise<string>;
|
||||
/**
|
||||
* Verify HMAC signature
|
||||
*/
|
||||
verify(data: string, signature: string, secret: string): Promise<boolean>;
|
||||
private hexToBytes;
|
||||
private bytesToHex;
|
||||
private constantTimeCompare;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue