Expand description
Bash command rewriter for hoisted bash.
When the agent calls bash("grep -n foo src/"), the rewriter detects this
pattern, dispatches internally to AFT’s grep command, and returns the
result with a footer hint nudging the agent to use the grep tool directly.
Modules§
Traits§
- Rewrite
Rule - A
RewriteRulematches a specific bash invocation pattern and dispatches internally to an AFT tool.
Functions§
- try_
rewrite - Try to rewrite a bash command into an internal AFT tool call.
Returns
Some(response)if rewritten andNonewhen no rule matched or the command must execute inside the native sandbox.