sig
  type json = Json.t
  type kind = [ `EXEC | `GET | `SET ]
  val string_of_kind : Main.kind -> string
  val pp_kind : Format.formatter -> Main.kind -> unit
  val register : Main.kind -> string -> (Main.json -> Main.json) -> unit
  val find : string -> (Main.kind * (Main.json -> Main.json)) option
  val exec : string -> Main.json -> Main.json
  type 'a request =
      [ `Kill of '| `Poll | `Request of 'a * string * Main.json | `Shutdown ]
  type 'a response =
      [ `Data of 'a * Main.json
      | `Error of 'a * string
      | `Killed of 'a
      | `Rejected of 'a ]
  type 'a message = {
    requests : 'Main.request list;
    callback : 'Main.response list -> unit;
  }
  val run :
    pretty:(Format.formatter -> '-> unit) ->
    ?equal:('-> '-> bool) ->
    fetch:(unit -> 'Main.message option) -> unit -> unit
  val yield : unit -> unit
  val kill : unit -> 'a
  val on : (bool -> unit) -> unit
end