pub fn compress_tool_result(content: &str, tool_name: Option<&str>) -> StringExpand description
Proxy compression funnel: routes a tool result to the right compressor.
- Already-cited research output (from
ctx_url_read/ the web layer) is kept verbatim — it is distilled and citation-stamped, so the shell pipeline must not touch its footer or claim markers. - Prose results (web fetches, doc reads, research MCP bridges) are squeezed by the prose-aware research compressor instead of the log/code-tuned shell engine.
- Everything else (shell/build/search output) flows through the unified
compress_if_beneficialpipeline. A$ ...command hint is extracted so the pattern engine gets the same routing as the CLI and MCP paths.