Io.act.reply: def of ezmcp@0.1.0.0 Import: import ezmcp@0.1.0.0/src/io.bend as Io Lines 20-40 of ezmcp@0.1.0.0/src/io.bend: https://jend.leeeet.dev/read.txt?path=ezmcp@0.1.0.0/src/io.bend&start_line=20&end_line=40 import Base import emerging-ezjson@1.2.0.0/src/value.bend as Value import ezmcp@0.1.0.0/src/rpc.bend as Rpc import ezmcp@0.1.0.0/src/server.bend as Server # one element of a batch, under revision `rev`: its reply, after running its # tool when it is a tool call; none for a notification or a response def act.reply( ~C: Data, ~run: C -> String -> Value.Json -> IO(Rpc.Out), +ctx: C, +rev: String, act: Server.Act ) -> IO(Maybe<&2, Value.Json>): match act: case Server.Quiet{}: IO.pure(Maybe<&2, Value.Json>, None{}) case Server.Send{reply}: IO.pure(Maybe<&2, Value.Json>, Some{reply}) case Server.Fault{reply}: IO.pure(Maybe<&2, Value.Json>, Some{reply}) case Server.Run{id, name, args}: IO.bind(Rpc.Out, Maybe<&2, Value.Json>, run(ctx, name, args), out => IO.pure(Maybe<&2, Value.Json>, Some{Server.ran(rev, id, out)})) case Server.Batch{acts}: IO.pure(Maybe<&2, Value.Json>, None{}) Uses (9): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=IO https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=IO.bind https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=IO.pure https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Maybe https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=emerging-ezjson@1.3.0.0/src/value.bend&name=Json https://jend.leeeet.dev/definition.txt?path=ezmcp@0.1.0.0/src/rpc.bend&name=Out https://jend.leeeet.dev/definition.txt?path=ezmcp@0.1.0.0/src/server.bend&name=Act https://jend.leeeet.dev/definition.txt?path=ezmcp@0.1.0.0/src/server.bend&name=ran