(rules: McpRedactionRules)
| 225 | } |
| 226 | |
| 227 | function parseRules(rules: McpRedactionRules): ParsedRules { |
| 228 | const statePathPatterns = rules.statePathPatterns ?? [] |
| 229 | return { |
| 230 | sensitiveKeysLower: new Set((rules.sensitiveKeys ?? []).map((k) => k.toLowerCase())), |
| 231 | combinedValueRegex: compileCombinedValueRegex(rules.valuePatterns ?? []), |
| 232 | statePathPatterns, |
| 233 | trackPaths: statePathPatterns.length > 0, |
| 234 | } |
| 235 | } |
| 236 | |
| 237 | /** Per-call state threaded through recursion. */ |
| 238 | interface RedactionContext { |
no test coverage detected