修复隔离子 Agent 的 Cocos 拒绝策略快照
Project CI / Repository checks (pull_request) Successful in 2m42s
Project CI / Frontend tests (pull_request) Successful in 3m26s
Project CI / Backend tests (pull_request) Successful in 6m36s
Project CI / Native shell tests (pull_request) Successful in 17m43s

在平台未提供 Cocos executable catalog 时仍显式展示 denied 工具

保持 isolated child 的跨平台工具边界一致
This commit is contained in:
2026-09-13 14:26:56 +08:00
parent ed5243c64e
commit 6669a3d497
@@ -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(),