Evaluate a tool call against a permission policy
Usage
permissions_check(permissions, tool_name, tool_input, context = list())Arguments
- permissions
A Permissions S7 value.
- tool_name
Name of the tool.
- tool_input
Arguments passed to the tool.
- context
Additional context such as working directory, tool origin, and annotations.
Value
A PermissionResultAllow, PermissionResultDeny, or PermissionResultPending.
Examples
permissions_check(permissions_readonly(), "read_file", list(path = "x.txt"))
#> <deputy::PermissionResultAllow>
#> @ decision: chr "allow"
#> @ message : NULL