修复隔离子 Agent 的 Cocos 拒绝策略快照
在平台未提供 Cocos executable catalog 时仍显式展示 denied 工具 保持 isolated child 的跨平台工具边界一致
This commit is contained in:
+10
@@ -179,6 +179,16 @@ pub(in crate::agent) fn agent_runtime_tool_policy_snapshot_at(
|
||||
auto_tools.push(tool.to_string());
|
||||
}
|
||||
}
|
||||
if isolated {
|
||||
// Keep the isolated-child contract explicit even when a denied tool
|
||||
// is unavailable on the current platform and therefore absent from
|
||||
// the executable catalog (for example, the Windows-only Cocos bridge).
|
||||
for tool in ISOLATED_AGENT_UNSCOPED_DENIED_TOOLS {
|
||||
if !denied_tools.iter().any(|candidate| candidate == tool) {
|
||||
denied_tools.push((*tool).to_string());
|
||||
}
|
||||
}
|
||||
}
|
||||
Ok(AgentRuntimeToolPolicySnapshot {
|
||||
run_profile: default_agent_runtime_run_profile(),
|
||||
run_profile_binding_fingerprint: String::new(),
|
||||
|
||||
Reference in New Issue
Block a user