ccr-inject
Category: context · Cloud + Local · Status: v1 — production
When structured-crusher runs with ccr: true, originals are stored in blob storage and crushed payloads carry a __prxy_ccr hash. ccr-inject adds the prxy_retrieve tool so the model can pull originals back on demand.
What it does
Injects a single tool definition into each request (skips if already present):
prxy_retrieve({ hash: "<sha256 from __prxy_ccr>", query?: "<optional filter>" })
When to use it
✅ Reversible compression — crush by default, retrieve detail only when needed
✅ Agent workloads with occasional deep dives into large JSON tool results
✅ Pair with ccr-retrieve for gateway-side fulfillment
❌ Without structured-crusher + ccr: true (nothing to retrieve)
❌ Pipelines that don’t use tools
Configuration
ccr-inject:
toolName: prxy_retrieve
Metrics emitted
ccr-inject.applied(boolean)ccr-inject.tool(string)
Full CCR stack
- module: structured-crusher
config: { ccr: true }
- code-crusher
- ccr-inject
- ccr-retrieve
- ipc
ccr-retrieve fulfills prxy_retrieve automatically on non-streaming requests. Streaming clients should send assistant tool_use blocks back; ccr-retrieve injects tool_result in pre() before the next provider call.
See ccr-retrieve and structured-crusher.