My agentic slop goes here. Not intended for anyone else!
at jsont 1.5 kB view raw
1(** Control messages for Claude session management. 2 3 Control messages are used to manage the interaction flow with Claude, 4 including session control, cancellation requests, and other operational 5 commands. *) 6 7open Ezjsonm 8 9(** The log source for control message operations *) 10val src : Logs.Src.t 11 12type t 13(** The type of control messages. *) 14 15val create : request_id:string -> subtype:string -> data:value -> t 16(** [create ~request_id ~subtype ~data] creates a new control message. 17 @param request_id Unique identifier for this control request 18 @param subtype The specific type of control message 19 @param data Additional JSON data for the control message *) 20 21val request_id : t -> string 22(** [request_id t] returns the unique request identifier. *) 23 24val subtype : t -> string 25(** [subtype t] returns the control message subtype. *) 26 27val data : t -> value 28(** [data t] returns the additional data associated with the control message. *) 29 30val to_json : t -> value 31(** [to_json t] converts the control message to its JSON representation. *) 32 33val of_json : value -> t 34(** [of_json json] parses a control message from JSON. 35 @raise Invalid_argument if the JSON is not a valid control message. *) 36 37val pp : Format.formatter -> t -> unit 38(** [pp fmt t] pretty-prints the control message. *) 39 40(** {1 Logging} *) 41 42val log_received : t -> unit 43(** [log_received t] logs that a control message was received. *) 44 45val log_sending : t -> unit 46(** [log_sending t] logs that a control message is being sent. *)