Skip to main content

Module bash_rewrite

Module bash_rewrite 

Source
Expand description

Bash command rewriter for hoisted bash. Phase 0 stub; Phase 1 Track B fills in.

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§

dispatch
footer
parser
rules

Traits§

RewriteRule
A RewriteRule matches 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, None if no rule matched.