diff --git a/hive-c0re/src/agent_config/tool_groups.rs b/hive-c0re/src/agent_config/tool_groups.rs index ae7ccc6e..c1379dd8 100644 --- a/hive-c0re/src/agent_config/tool_groups.rs +++ b/hive-c0re/src/agent_config/tool_groups.rs @@ -50,12 +50,14 @@ fn read_from(path: &Path) -> std::io::Result>> { Ok(map) } -/// True if `name` matches a recognised [`hive_sh4re::permissions::ToolGroup`] -/// exactly (same comparison [`validate_groups`] uses). +/// True if `name` matches a recognised [`hive_sh4re::permissions::ToolGroup`], +/// case-insensitive (same comparison [`validate_groups`] uses, and the same +/// comparison `capabilities::is_known` uses — a hand-edited `"Meta"` in the +/// file should round-trip, not get pruned). fn is_known(name: &str) -> bool { hive_sh4re::permissions::ToolGroup::ALL .iter() - .any(|g| <&str>::from(*g) == name) + .any(|g| name.eq_ignore_ascii_case(<&str>::from(*g))) } /// Drop any tool-group string in `map` that isn't a recognised