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
67 lines
1.5 KiB
TypeScript
67 lines
1.5 KiB
TypeScript
/**
|
|
* Configuration API for Brainy 3.0
|
|
* Provides configuration storage with optional encryption
|
|
*/
|
|
import { StorageAdapter } from '../coreTypes.js';
|
|
export interface ConfigOptions {
|
|
encrypt?: boolean;
|
|
decrypt?: boolean;
|
|
}
|
|
export interface ConfigEntry {
|
|
key: string;
|
|
value: any;
|
|
encrypted: boolean;
|
|
createdAt: number;
|
|
updatedAt: number;
|
|
}
|
|
export declare class ConfigAPI {
|
|
private storage;
|
|
private security;
|
|
private configCache;
|
|
private CONFIG_NOUN_PREFIX;
|
|
constructor(storage: StorageAdapter);
|
|
/**
|
|
* Set a configuration value with optional encryption
|
|
*/
|
|
set(params: {
|
|
key: string;
|
|
value: any;
|
|
encrypt?: boolean;
|
|
}): Promise<void>;
|
|
/**
|
|
* Get a configuration value with optional decryption
|
|
*/
|
|
get(params: {
|
|
key: string;
|
|
decrypt?: boolean;
|
|
defaultValue?: any;
|
|
}): Promise<any>;
|
|
/**
|
|
* Delete a configuration value
|
|
*/
|
|
delete(key: string): Promise<void>;
|
|
/**
|
|
* List all configuration keys
|
|
*/
|
|
list(): Promise<string[]>;
|
|
/**
|
|
* Check if a configuration key exists
|
|
*/
|
|
has(key: string): Promise<boolean>;
|
|
/**
|
|
* Clear all configuration
|
|
*/
|
|
clear(): Promise<void>;
|
|
/**
|
|
* Export all configuration
|
|
*/
|
|
export(): Promise<Record<string, ConfigEntry>>;
|
|
/**
|
|
* Import configuration
|
|
*/
|
|
import(config: Record<string, ConfigEntry>): Promise<void>;
|
|
/**
|
|
* Get raw config entry (without decryption)
|
|
*/
|
|
private getEntry;
|
|
}
|