/** * Make the protocol agree with the payload. * * Fifty-three tools in this package can answer `{"success": false, "error": * ...}`, and every one of those answers was returned as an MCP result with no * `isError` flag. Two things followed from that, both wrong: * * 1. A client reading the protocol saw a successful call. `health_monitor` * reporting that it could not reach what it monitors looked exactly like * `health_monitor` reporting that everything is fine, and only a client * that parses the text and knows this package's own field names could * tell them apart. * 2. `observeMcpToolCall` decides `ok` from `isError`, so every one of those * failures was counted as a success. The surface's measured success rate * was overstated by exactly the number of failures it reported in prose * -- a fabricated measurement, and the thing this repo treats as its * worst defect class. * * The flag is derived from the payload the tool returned rather than set at * each of the hundred-odd return sites, because one policy is checkable and a * hundred are not. An explicit `isError` already on the response wins: a tool * that has decided is not second-guessed. */ export declare function flagPayloadFailure(result: T): T; //# sourceMappingURL=payload-failure.d.ts.map