恢复自主运行时根 Run 安全门禁
保留 relaxed lane 自由执行,同时校验持久 Run Profile 的当前根身份 确保 art-director Canvas-only 动作约束不被 relaxed lane 绕过
This commit is contained in:
@@ -66,12 +66,10 @@ pub(crate) async fn execute_game_creator_agent_runtime_tool_action_with_pending_
|
||||
return blocker;
|
||||
}
|
||||
}
|
||||
if !relaxed_autonomous {
|
||||
if let Some(blocker) =
|
||||
agent_runtime_autonomous_art_director_canvas_only_action_block(agent_id, task, tool)
|
||||
{
|
||||
return blocker;
|
||||
}
|
||||
if let Some(blocker) =
|
||||
agent_runtime_autonomous_art_director_canvas_only_action_block(agent_id, task, tool)
|
||||
{
|
||||
return blocker;
|
||||
}
|
||||
let command_id = game_creator_agent_runtime_tool_command_id(tool);
|
||||
if let Some(command_id) = command_id {
|
||||
|
||||
@@ -138,12 +138,16 @@ pub(crate) fn ensure_current_autonomous_ready_child_mutation_at_locked(
|
||||
if game_creator_agent_runtime_cancel_requested_for(root, &normalized_agent_id, run_id) {
|
||||
return Err("当前 Run 已收到取消请求,禁止继续修改项目".to_string());
|
||||
}
|
||||
if autonomous_relaxed_run_at(root, &normalized_agent_id, run_id)? {
|
||||
return Ok(());
|
||||
}
|
||||
let relaxed_autonomous = autonomous_relaxed_run_at(root, &normalized_agent_id, run_id)?;
|
||||
let binding =
|
||||
read_game_creator_agent_runtime_run_profile_binding(root, &normalized_agent_id, run_id)?;
|
||||
let Some(binding) = binding else {
|
||||
if relaxed_autonomous {
|
||||
// Keep the relaxed lane compatible with legacy runs that predate
|
||||
// durable Run Profile sidecars; bound runs still receive the
|
||||
// current-root and lineage checks below.
|
||||
return Ok(());
|
||||
}
|
||||
let task = read_latest_game_creator_agent_runtime_task_by_run_id(
|
||||
root,
|
||||
&normalized_agent_id,
|
||||
|
||||
Reference in New Issue
Block a user