Source: pinned pxpipe-proxy@0.13.2 tarball, package/dist/core/transform.js, lines 2150-2175

                            for (const img of imgs)
                                info.imageBytes += approxBlockBytes(img);
                            info.imagePixels = (info.imagePixels ?? 0) + pixels;
                            info.toolResultImgs = (info.toolResultImgs ?? 0) + imgs.length;
                            info.imageCount += imgs.length;
                            await recordRecoverable(info, o.emitRecoverable, {
                                kind: 'tool_result',
                                toolUseId: tr.tool_use_id,
                                text: innerRaw,
                                imageCount: imgs.length,
                            });
                            info.compressedChars += innerRaw.length; // original length = what text billing would be
                            info.droppedChars = (info.droppedChars ?? 0) + droppedChars;
                            for (const [cp, n] of dcp) {
                                droppedCodepoints.set(cp, (droppedCodepoints.get(cp) ?? 0) + n);
                            }
                            const trFactSheet = factSheetText(innerRaw);
                            rewritten.push({
                                ...tr,
                                content: trFactSheet ? [...imgs, { type: 'text', text: trFactSheet }] : imgs,
                            });
                            changed = true;
                            bumpBucket(info, toolResultBucket(classifyContent(inner)), innerRaw.length);
                        }
                    }
                    else if (Array.isArray(innerRaw)) {
