Some checks failed
CI / Lint & TypeCheck (push) Has been cancelled
CI / Unit Tests (push) Has been cancelled
CI / Build Frontend (push) Has been cancelled
CI / Rust Check (push) Has been cancelled
CI / Security Scan (push) Has been cancelled
CI / E2E Tests (push) Has been cancelled
- 新增 triggers.rs: 5 种触发信号(痛点确认/正反馈/复杂工具链/用户纠正/行业模式) - ExperienceStore 增加 industry_context + source_trigger 字段 - experience.rs format_for_injection 支持行业标签 - intelligence_hooks.rs 集成触发信号评估 - 17 个测试全通过 (7 trigger + 10 experience)
62 lines
2.0 KiB
Rust
62 lines
2.0 KiB
Rust
//! 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 _,
|
|
};
|