docs(roadmap): 更新 Phase 4b 状态为已完成

This commit is contained in:
徐涛
2026-06-11 21:57:10 +08:00
parent 2b189880a9
commit 4de7db0b2c
5 changed files with 162 additions and 11 deletions
+11
View File
@@ -20,6 +20,8 @@ pub enum HookEvent {
OnTurnStart,
/// Agent 会话完成一轮 turn 之后(Phase 4a 新增)。
OnTurnEnd,
/// TaskAgent 完成一个 Plan 步骤后触发(Phase 4b 新增)。
OnPlanStepComplete,
}
/// 此次钩子调用的上下文。
@@ -35,6 +37,8 @@ pub struct HookContext<'a> {
pub attempt: u32,
/// 当前 turn 序号(0-based,仅 OnTurnStart / OnTurnEnd 可用,Phase 4a 新增)。
pub turn_index: Option<u32>,
/// 当前 plan step 序号(0-based,仅 OnPlanStepComplete 可用,Phase 4b 新增)。
pub plan_step_index: Option<usize>,
}
impl<'a> HookContext<'a> {
@@ -45,6 +49,7 @@ impl<'a> HookContext<'a> {
error: None,
attempt: 0,
turn_index: None,
plan_step_index: None,
}
}
@@ -68,6 +73,12 @@ impl<'a> HookContext<'a> {
self.turn_index = Some(turn_index);
self
}
/// 设置 plan step 序号(仅 OnPlanStepComplete 使用,Phase 4b 新增)。
pub(crate) fn with_plan_step_index(mut self, plan_step_index: usize) -> Self {
self.plan_step_index = Some(plan_step_index);
self
}
}
/// 钩子执行结果。