Return structured grep matches from an in-memory files mapping.
Performs literal text search (not regex).
Returns a GrepResult with matches on success. When max_count is set, at
most that many matches are returned; if more exist the scan stops and the
result is flagged truncated=True. Exactly max_count matches with none
dropped is reported complete (truncated=False).
We deliberately do not raise here to keep backends non-throwing in tool contexts and preserve user-facing error messages.