(*--------------------------------------------------------------------------- Copyright (c) 2025 Anil Madhavapeddy. All rights reserved. SPDX-License-Identifier: ISC ---------------------------------------------------------------------------*) (** Kitty Graphics Protocol Response Parse and interpret terminal responses to graphics commands. *) type t (** A parsed terminal response. *) val parse : string -> t option (** Parse a response from terminal output. *) val is_ok : t -> bool (** Check if the response indicates success. *) val message : t -> string (** Get the response message. *) val error_code : t -> string option (** Extract the error code if this is an error response. *) val image_id : t -> int option (** Get the image ID from the response. *) val image_number : t -> int option (** Get the image number from the response. *) val placement_id : t -> int option (** Get the placement ID from the response. *)