docs: 更新 README feature 表 + 升级指南 + 示例注释 + roadmap 同步

- README 添加 feature 组合表 + 模块级 features 清单 + 升级指南
- 18 个 example 顶部添加 Required features 注释
- roadmap.md 和 roadmap-v0.3.2.md 同步 Phase 26-27 完成状态
- cargo fmt 全量格式化(修复预存格式问题,CI format job 可通过)
This commit is contained in:
徐涛
2026-07-19 08:18:04 +08:00
parent bc4eac72e1
commit 5baa170508
53 changed files with 1112 additions and 615 deletions
+5 -1
View File
@@ -1,4 +1,5 @@
//! agent_switch_demo —— Agent 角色热切换示例。
//! Required features: cargo run --example agent_switch_demo --features "engine"
//!
//! 演示:
//! 1. 创建 session(绑定 Analyst agent
@@ -110,6 +111,9 @@ async fn main() {
};
println!("\n[verify] turn_index = {turn_index}, agent = {agent_name_owned}");
assert_eq!(turn_index, 2, "turn_index should be 2 after 2 turns");
assert_eq!(agent_name_owned, "reporter", "current agent should be reporter");
assert_eq!(
agent_name_owned, "reporter",
"current agent should be reporter"
);
println!("✓ context preserved across agent switch");
}