Skip to main content

try_rewrite_for_request

Function try_rewrite_for_request 

Source
pub fn try_rewrite_for_request(
    command: &str,
    request_id: &str,
    session_id: Option<&str>,
    ctx: &AppContext,
    principal: &AuthenticatedPrincipal,
) -> Option<Response>
Expand description

Make the rewrite decision for one public bash request. A native route is recorded when the sandbox owns execution or when no rule accepts the command. The record is test-visible through dispatch::route_record and an opt-in JSONL sidecar, without changing the agent-facing response.