Defines limits for skill resource listing and loading.
A policy bounds file count, directory traversal, the encoded general-resource
list, file size, and text returned to model context. Binary content is
rejected by default. Set binary: :allow to permit image and file attachments
through the generic resource loader. Text-only APIs always reject binary data.
Summary
Functions
Returns the default resource policy.
Builds and validates a resource policy.
Converts a policy to a plain map.
Types
@type t() :: %Jido.AI.Skill.ResourcePolicy{ binary: :reject | :allow, max_depth: non_neg_integer(), max_directories: pos_integer(), max_file_bytes: pos_integer(), max_listing_bytes: pos_integer(), max_resources: pos_integer(), max_text_bytes: pos_integer() }
Functions
@spec default() :: t()
Returns the default resource policy.
Builds and validates a resource policy.
The input can be a policy, a keyword list, or a map with atom keys.
Converts a policy to a plain map.