Package ripgrep is a shared wrapper around the rg binary.
It mirrors utils/ripgrep.ts from Claude Code: shared utility used by
GrepTool, GlobalSearchDialog, and any other consumer that needs
fast text search over files.
Search runs rg with the given pattern in dir and returns matches.
Returns nil results (not an error) if rg exits 1 (no matches).
maxResults caps output; 0 = no limit.