Convert MCP params maps into the flat proto/Rego keyspace. Only `name` is currently enforced for tools/call, but this keeps the YAML shape compatible with any future MCP-owned params selectors.
(
params: BTreeMap<String, ParamMatcherDef>,
)
| 389 | // currently enforced for tools/call, but this keeps the YAML shape compatible |
| 390 | // with any future MCP-owned params selectors. |
| 391 | fn flatten_param_matchers( |
| 392 | params: BTreeMap<String, ParamMatcherDef>, |
| 393 | ) -> BTreeMap<String, QueryMatcherDef> { |
| 394 | let mut flattened = BTreeMap::new(); |
| 395 | for (key, matcher) in params { |
| 396 | flatten_param_matcher(&key, matcher, &mut flattened); |
| 397 | } |
| 398 | flattened |
| 399 | } |
| 400 | |
| 401 | // Walk one params subtree, carrying the flattened dot-path key accumulated so |
| 402 | // far. Leaf matchers are inserted into the map consumed by the runtime policy. |
no test coverage detected