refactor(core): 完成 v0.3.2 Cargo features 拆分基础设施

- 定义 16 个 features + 4 个快捷组合,default = ["full"] 保持向后兼容
- 12 个重型依赖 optional 化(tokio/reqwest/rusqlite 等)
- 全模块 #[cfg(feature)] 门控注入(llm/tools/memory/agent/engine)
- 将 LlmProvider trait 及关联类型移出 provider 模块归属 llm(ADR-1)
- 为 session.rs bundle() 方法添加 engine feature 门控
- 更新 12 个内部文件 + 4 个示例文件的 import 路径
- 向后兼容:provider.rs 保留 pub use 重导出老路径
This commit is contained in:
徐涛
2026-07-19 07:58:04 +08:00
parent 249fba8aaf
commit 932a06f512
26 changed files with 1366 additions and 124 deletions
+1 -1
View File
@@ -18,7 +18,7 @@ use std::time::Duration;
use crate::agent::summary::SummaryConfig;
use crate::llm::compact::CompactConfig;
use crate::llm::hooks::HookExecutor;
use crate::llm::provider::LlmProvider;
use crate::llm::LlmProvider;
use crate::memory::retriever::MemoryRetriever;
use crate::memory::store::MemoryStore;
use crate::tools::ToolRegistry;