Decode the opaque MRTR requestState as JSON into T. The server owns the
requestState value (the encoding contract is the server-side
ToolResponse.inputRequired(reqs, state), which carries
serializeToJson(state).toString()), so this is the typed inverse: parse
the echoed string and deserialise it into T. Returns T.init when the
client echoed no state (requestState empty). The value is untrusted input
the client round-tripped, so a malformed payload throws.
Decode the opaque MRTR requestState as JSON into T. The server owns the requestState value (the encoding contract is the server-side ToolResponse.inputRequired(reqs, state), which carries serializeToJson(state).toString()), so this is the typed inverse: parse the echoed string and deserialise it into T. Returns T.init when the client echoed no state (requestState empty). The value is untrusted input the client round-tripped, so a malformed payload throws.