def reply
import ezmcp@0.1.0.0/src/web.bend as Webimport Base
import emerging-ezhttp@0.21.0.0/src/http.bend as Http
221# a Web reply as ezhttp's reply (a Later or a Many never reaches here)
222def reply(wid: Web) -> Http.Reply: # noqa: L001 only src/io.bend calls it (MCP-TRUST-1)
223 match wid:
224 case Now{status, headers, body}:
225 Http.Reply{status, headers, body}
226 case Later{rev, id, name, args}:
227 Http.Reply{500, [], "ezmcp: a tool call was not run"}
228 case Many{rev, acts}:
229 Http.Reply{500, [], "ezmcp: a batch was not run"}