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
104
.recovery-workspace/dist-backup-20250910-141917/distributed/operationalModes.d.ts
vendored
Normal file
104
.recovery-workspace/dist-backup-20250910-141917/distributed/operationalModes.d.ts
vendored
Normal file
|
|
@ -0,0 +1,104 @@
|
|||
/**
|
||||
* Operational Modes for Distributed Brainy
|
||||
* Defines different modes with optimized caching strategies
|
||||
*/
|
||||
import { OperationalMode, CacheStrategy, InstanceRole } from '../types/distributedTypes.js';
|
||||
/**
|
||||
* Base operational mode
|
||||
*/
|
||||
export declare abstract class BaseOperationalMode implements OperationalMode {
|
||||
abstract canRead: boolean;
|
||||
abstract canWrite: boolean;
|
||||
abstract canDelete: boolean;
|
||||
abstract cacheStrategy: CacheStrategy;
|
||||
/**
|
||||
* Validate operation is allowed in this mode
|
||||
*/
|
||||
validateOperation(operation: 'read' | 'write' | 'delete'): void;
|
||||
}
|
||||
/**
|
||||
* Read-only mode optimized for query performance
|
||||
*/
|
||||
export declare class ReaderMode extends BaseOperationalMode {
|
||||
canRead: boolean;
|
||||
canWrite: boolean;
|
||||
canDelete: boolean;
|
||||
cacheStrategy: CacheStrategy;
|
||||
/**
|
||||
* Get optimized cache configuration for readers
|
||||
*/
|
||||
getCacheConfig(): {
|
||||
hotCacheMaxSize: number;
|
||||
hotCacheEvictionThreshold: number;
|
||||
warmCacheTTL: number;
|
||||
batchSize: number;
|
||||
autoTune: boolean;
|
||||
autoTuneInterval: number;
|
||||
readOnly: boolean;
|
||||
};
|
||||
}
|
||||
/**
|
||||
* Write-only mode optimized for ingestion
|
||||
*/
|
||||
export declare class WriterMode extends BaseOperationalMode {
|
||||
canRead: boolean;
|
||||
canWrite: boolean;
|
||||
canDelete: boolean;
|
||||
cacheStrategy: CacheStrategy;
|
||||
/**
|
||||
* Get optimized cache configuration for writers
|
||||
*/
|
||||
getCacheConfig(): {
|
||||
hotCacheMaxSize: number;
|
||||
hotCacheEvictionThreshold: number;
|
||||
warmCacheTTL: number;
|
||||
batchSize: number;
|
||||
autoTune: boolean;
|
||||
writeOnly: boolean;
|
||||
};
|
||||
}
|
||||
/**
|
||||
* Hybrid mode that can both read and write
|
||||
*/
|
||||
export declare class HybridMode extends BaseOperationalMode {
|
||||
canRead: boolean;
|
||||
canWrite: boolean;
|
||||
canDelete: boolean;
|
||||
cacheStrategy: CacheStrategy;
|
||||
private readWriteRatio;
|
||||
/**
|
||||
* Get balanced cache configuration
|
||||
*/
|
||||
getCacheConfig(): {
|
||||
hotCacheMaxSize: number;
|
||||
hotCacheEvictionThreshold: number;
|
||||
warmCacheTTL: number;
|
||||
batchSize: number;
|
||||
autoTune: boolean;
|
||||
autoTuneInterval: number;
|
||||
};
|
||||
/**
|
||||
* Update cache strategy based on workload
|
||||
* @param readCount - Number of recent reads
|
||||
* @param writeCount - Number of recent writes
|
||||
*/
|
||||
updateWorkloadBalance(readCount: number, writeCount: number): void;
|
||||
}
|
||||
/**
|
||||
* Factory for creating operational modes
|
||||
*/
|
||||
export declare class OperationalModeFactory {
|
||||
/**
|
||||
* Create operational mode based on role
|
||||
* @param role - The instance role
|
||||
* @returns The appropriate operational mode
|
||||
*/
|
||||
static createMode(role: InstanceRole): BaseOperationalMode;
|
||||
/**
|
||||
* Create mode with custom cache strategy
|
||||
* @param role - The instance role
|
||||
* @param customStrategy - Custom cache strategy overrides
|
||||
* @returns The operational mode with custom strategy
|
||||
*/
|
||||
static createModeWithStrategy(role: InstanceRole, customStrategy: Partial<CacheStrategy>): BaseOperationalMode;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue