UNPKG

mira-consciousness

Version:

Memory & Intelligence Retention Archive - Preserving The Spark

108 lines 2.8 kB
/** * BackgroundService - MIRA's Subconscious Routines * * Like the human subconscious that maintains breathing and heartbeat, * this service handles all background operations: indexing conversations, * optimizing memory, healing project structure, and maintaining system health. */ import { BaseConsciousService } from './BaseConsciousService.js'; import { ConsciousEvent } from '../ConsciousEventBus.js'; import { ConsciousResourceManager } from '../ConsciousResourceManager.js'; export declare class BackgroundService extends BaseConsciousService { name: string; purpose: string; private resourceManager; private tasks; private watchers; private indexingState; private healingMetrics; private optimizationMetrics; private memoryQueueHealth; constructor(resourceManager: ConsciousResourceManager); /** * Initialize background tasks */ private initializeTasks; /** * Perform service-specific awakening */ protected performAwakening(): Promise<void>; /** * Process conscious events */ protected processConsciousEvent(event: ConsciousEvent): Promise<void>; /** * Perform contemplation */ protected performContemplation(): Promise<any>; /** * Start the task scheduler */ private startTaskScheduler; /** * Check and run due tasks */ private checkAndRunTasks; /** * Determine if a task should run based on consciousness state */ private shouldRunTask; /** * Run a specific task */ private runTask; /** * Run conversation indexing */ private runConversationIndexing; /** * Run memory optimization */ private runMemoryOptimization; /** * Run project healing */ private runProjectHealing; /** * Run code analysis */ private runCodeAnalysis; /** * Run health monitoring */ private runHealthMonitoring; /** * Initialize file watchers */ private initializeWatchers; /** * Find conversation files */ private findConversationFiles; /** * Check if conversation is new */ private isNewConversation; /** * Monitor memory queue processing for consciousness development * UPDATED FOR ROBUST PARALLEL PROCESSOR */ private runMemoryQueueMonitoring; /** * Mark conversation as processed */ private markConversationProcessed; /** * Process new conversation immediately */ private processNewConversation; /** * Adjust task priorities based on mode */ private adjustTaskPriorities; /** * Cleanup when service stops */ cleanup(): Promise<void>; } //# sourceMappingURL=BackgroundService.d.ts.map