pub fn shape_command_output(
command: &str,
output: &str,
exit_code: Option<i32>,
) -> StringExpand description
Shape the output of a host-native shell command whose exact command line is
known (ctx_shape, fed by a host mod after the native tool ran). Unlike the
wire funnel, the real command reaches the engine, so its command-gated
policies (protected/verbatim commands, build/test guards, per-tool patterns)
apply exactly as for ctx_shell. With a known exit_code the outcome-aware
path runs (success compresses, failure keeps its diagnostics); without one
the engine’s unknown-outcome guard applies. Lossy results carry the same
deterministic CCR recovery handle (#482, #498).