CCR revival โ€” two bugs, two fixes, one working pipeline

ork's "compress MCP outputs" hook (#2264) was dead for two independent reasons โ€” both invisible to the unit tests, both caught by testing on a real MCP call. Toggle through the states and watch the pipeline.

The pipeline โ€” a 30,005-char MCP result trying to reach the model

The two bugs (independent โ€” fixing one didn't fix the other)

๐Ÿž Bug 1 โ€” wrong OUTPUT field (PR #2552, merged)

The hook returned the result via updatedMCPToolOutput โ€” a deprecated field CC silently ignores (verified 0 live transforms). Fix: emit updatedToolOutput, the current field that works for all tools.

๐Ÿž Bug 2 โ€” wrong INPUT field (this fix)

The hook read the result from tool_output ?? tool_result โ€” but CC delivers it in tool_response. So the hook got undefined, found nothing to transform, and exited silently. Fix: read tool_response first.
๐Ÿงช Why the tests didn't catch it: the unit tests fed the hook tool_output (what the hook read), not tool_response (what CC sends) โ€” they validated the wrong contract and passed all along. The bug only surfaced on a real MCP call. Added 3 regression tests on the real field (64 pass).

Verified live on CC 2.1.183: a real 30,005-char MCP result โ†’ 1,954 chars (โˆ’94%), reversible (a Read <stash> pointer recovers the 28,205-char middle; stash confirmed to hold the full original). Fires PRE-cache, so no cache-bust.