/** * Brain Worker * * Phase 4 Organic Brain Feature * * Background worker that performs brain-like maintenance operations: * - Light tick (5 min): Prune activation cache, check predictive consolidation * - Medium tick (30 min): Discover missing links, scan for contradictions * * This transforms the memory system from reactive to continuously organic. */ import { WorkerConfig, LightTickResult, MediumTickResult, WorkerStatus } from './types.js'; /** * Brain Worker Class * * Manages background processing timers and operations. * Designed to be started by the visualization server and run continuously. */ export declare class BrainWorker { private lightTimer; private mediumTimer; private isRunning; private config; private stats; private lastLightTick; private lastMediumTick; private lastConsolidation; /** * Create a new BrainWorker * * @param config - Partial configuration to override defaults */ constructor(config?: Partial); /** * Start the background worker * Sets up interval timers for light and medium ticks */ start(): void; /** * Stop the background worker * Clears all interval timers */ stop(): void; /** * Check if the worker is currently running */ isActive(): boolean; /** * Light tick - runs every 5 minutes * * Operations: * 1. Prune stale activation cache entries * 2. Check if predictive consolidation should run */ lightTick(): Promise; /** * Medium tick - runs every 30 minutes * * Operations: * 1. Discover and create missing links * 2. Scan for contradictions */ mediumTick(): Promise; /** * Get current worker status */ getStatus(): WorkerStatus; /** * Get current configuration */ getConfig(): WorkerConfig; /** * Update configuration * Note: Changes won't affect running timers until restart */ updateConfig(config: Partial): void; /** * Manually trigger a light tick * Useful for testing or immediate cache pruning */ triggerLightTick(): Promise; /** * Manually trigger a medium tick * Useful for testing or immediate link discovery */ triggerMediumTick(): Promise; } /** * Get or create the default worker instance */ export declare function getDefaultWorker(): BrainWorker; /** * Start the default worker if not already running */ export declare function startDefaultWorker(): BrainWorker; /** * Stop the default worker */ export declare function stopDefaultWorker(): void; //# sourceMappingURL=brain-worker.d.ts.map