pub fn resolve_script_permissions(
perms: &ScriptToolPermissions,
resolve_builtin: &dyn Fn(&str) -> ToolPolicy,
) -> ScriptAllowExpand description
Resolve [tool_script_permissions] into concrete allow/deny booleans.
Allow/Deny map directly. Inherit means:
read_file/write_file/shell: permitted only when the agent’s resolved policy for the equivalent built-in (resolve_builtin) isToolPolicy::Allow. This is evaluated once against the entry stage’s permission layers; a later stage’stool_permissionsdo not re-gate a script’s host calls.http_get/http_post/env_var: permitted (no built-in equivalent to inherit from, and the tool itself is still gated by Layers 1/2/4).
resolve_builtin is a &dyn Fn (not impl Fn) so this function has a single
monomorphization; otherwise each distinct caller closure type gets its own
copy of the net/filelike match arms, and coverage is attributed
per-instantiation (each only exercises the arms that caller hits).