Module Permissions.Rule

Rules define specific permissions for tools.

type t

The type of permission rules.

val jsont : t Jsont.t

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

val create : tool_name:string -> ?rule_content:string -> ?unknown:Unknown.t -> unit -> t

create ~tool_name ?rule_content ?unknown () creates a new rule.

  • parameter tool_name

    The name of the tool this rule applies to

  • parameter rule_content

    Optional rule specification or pattern

  • parameter unknown

    Optional unknown fields to preserve

val tool_name : t -> string

tool_name t returns the tool name.

val rule_content : t -> string option

rule_content t returns the optional rule content.

val unknown : t -> Unknown.t

unknown t returns the unknown fields.