Content search tool.
Searches file contents using regex patterns. Uses ripgrep (rg)
when available for performance, falls back to pure Elixir regex.
Sandbox exemption
ripgrep is spawned with System.cmd/3, outside NetRunner, and is
deliberately not confined by Nous.Sandbox. This is the documented
exception to "NetRunner is the single execution path". The reasoning:
- Neither provider restricts reads. Seatbelt's profile is
(allow default) (deny file-write*)and bwrap binds/read-only, so confining a process that only ever reads adds exactly zero enforcement. - The argv is already hardened: the pattern goes through
--regexpand a--terminator ends option parsing before the positional path, and the environment is scrubbed viaNous.Tools.Env.scrubbed_overrides/0. - The environment is genuinely scrubbed rather than merged: Erlang's
{env, _}option adds to the inherited environment, so the allowlist is passed asscrubbed_overrides/0, which also emits{name, false}for every other currently-set variable and thereby actually unsets it. - Every matched path is re-validated through
Nous.Tools.PathGuardbefore it reaches the caller. Nous.Sandboxfails closed, so routing this tool through it would delete a working read-only search tool on every host with no provider installed — for no security gain whatsoever.
Summary
Functions
Return the full tool schema definition for introspection.
Functions
@spec __tool_schema__() :: map()
Return the full tool schema definition for introspection.
Includes parameter declarations, category, and tags.