dsh-tool-regex: Deterministic regex tool for DSH
`dsh-tool-regex` is a zero-dependency regex tool plugin for the DSH workflow, designed to address the challenges of verifying regex results directly performed by models and the risks associated with introducing temporary scripts. This plugin adopts a pure function design and outputs JSON uniformly. It provides four core operations: `test` to check for matches, `find` to extract capture groups and indices, `replace` to perform safe global replacements with backreference support, and `explain` to statically parse regex structure without executing matches. The plugin features strict security boundaries, including limits on input length, pattern size, output volume, and the number of matches, as well as a 1000ms hard timeout mechanism to prevent resource exhaustion caused by malicious or complex regex patterns. It requires Node.js ^22.19.0 or higher and is installed to a specified path via the DSH plugin command.
Read More