Module Permissions.Result

Results of permission checks.

type t =
  1. | Allow of {
    1. updated_input : Jsont.json option;
      (*

      Modified tool input

      *)
    2. updated_permissions : Update.t list option;
      (*

      Permission updates to apply

      *)
    3. unknown : Unknown.t;
      (*

      Unknown fields

      *)
    }
  2. | Deny of {
    1. message : string;
      (*

      Reason for denial

      *)
    2. interrupt : bool;
      (*

      Whether to interrupt execution

      *)
    3. unknown : Unknown.t;
      (*

      Unknown fields

      *)
    }
    (*

    The type of permission results. Wire format uses a discriminated union with "behavior" field set to "allow" or "deny".

    *)
val jsont : t Jsont.t

jsont is the Jsont codec for permission results. Preserves unknown fields for forward compatibility.

val allow : ?updated_input:Jsont.json -> ?updated_permissions:Update.t list -> ?unknown:Unknown.t -> unit -> t

allow ?updated_input ?updated_permissions ?unknown () creates an allow result.

  • parameter updated_input

    Optional modified tool input

  • parameter updated_permissions

    Optional permission updates to apply

  • parameter unknown

    Optional unknown fields to preserve

val deny : message:string -> interrupt:bool -> ?unknown:Unknown.t -> unit -> t

deny ~message ~interrupt ?unknown () creates a deny result.

  • parameter message

    The reason for denying permission

  • parameter interrupt

    Whether to interrupt further execution

  • parameter unknown

    Optional unknown fields to preserve