mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-07-31 20:32:20 +03:00
The native-Claude OAuth anti-fingerprint cloak renames a tool named `read` to `Read` on the wire and records the reverse alias on a non-enumerable `_toolNameMap`, which the response side un-cloaks to restore the client's original casing. Since v3.8.27 (#3941/#3968) `execute()` returned a JSON-round-tripped `serializedBody` as `transformedBody`; the round-trip drops the non-enumerable map, so the restore saw an empty map and the cloaked `Read` streamed verbatim to the client. Re-attach the live `_toolNameMap` onto the serialized body before returning (non-enumerable, mirrors antigravity.ts::attachToolNameMap) so tool-name casing round-trips correctly. Regression test exercises base.ts execute() through the claude-OAuth cloak path and asserts the returned transformedBody carries the reverse map. Closes #4307