//! Intelligence Layer - Migrated from frontend lib/ //! //! This module contains the intelligence components that were previously //! implemented in TypeScript/JavaScript in the frontend. //! //! ## Modules //! //! - `heartbeat` - Periodic proactive checks with quiet hours support //! - `compactor` - Context compaction for infinite-length conversations //! - `reflection` - Agent self-improvement through conversation analysis //! - `identity` - Agent identity file management (SOUL.md, AGENTS.md, USER.md) //! //! ## Migration Status //! //! | Component | Status | Notes | //! |-----------|--------|-------| //! | Heartbeat Engine | ✅ Active | Integrated via intelligence_hooks | //! | Context Compactor | ✅ Active | Integrated in kernel AgentLoop | //! | Reflection Engine | ✅ Active | Integrated via intelligence_hooks | //! | Agent Identity | ✅ Active | Integrated via intelligence_hooks | //! //! Removed (dead code, never called from frontend): //! - `pattern_detector` - 2026-03-26 //! - `recommender` - 2026-03-26 (was only used by mesh) //! - `mesh` - 2026-03-26 //! - `trigger_evaluator` - 2026-03-26 //! - `persona_evolver` - 2026-03-26 pub mod heartbeat; pub mod compactor; pub mod reflection; pub mod identity; pub mod validation; pub mod extraction_adapter; pub mod pain_aggregator; pub mod solution_generator; pub mod personality_detector; pub mod pain_storage; pub mod experience; pub mod triggers; pub mod user_profiler; pub mod trajectory_compressor; // Re-export main types for convenience pub use heartbeat::HeartbeatEngineState; pub use reflection::{ ReflectionEngine, ReflectionEngineState, }; pub use identity::{ AgentIdentityManager, IdentityManagerState, }; // Suppress dead-code warnings for extraction adapter accessors — they are // consumed externally via full path (crate::intelligence::extraction_adapter::*). #[allow(unused_imports)] use extraction_adapter::{ configure_extraction_driver as _, is_extraction_driver_configured as _, get_extraction_driver as _, TauriExtractionDriver as _, };