Expand description
Compiled-regex cache for patterns a user or model supplies (tool search, purge). Those patterns are untrusted input, so compilation is bounded: the pattern length is capped, the compiled program and lazy DFA have explicit size limits, compilation runs outside the cache lock, and a rejected pattern is remembered so repeating it costs a lookup.
Constants§
- MAX_
USER_ REGEX_ PATTERN_ BYTES - Longest pattern accepted, in bytes. Search and purge patterns are short.