Skip to main content
The policy package provides the authorization layer for Toolshed — filtering tools by role and resolving whether tools require approval.

filterToolsByRole(tools, role)

Returns only the tools whose paths match at least one pattern in the role:

matchPattern(toolPath, pattern)

Tests whether a tool path matches a glob pattern:
Algorithm: recursive segment-by-segment matching.
  • * matches exactly one segment
  • ** matches zero or more segments

resolveAnnotations(tool)

Derives whether a tool requires user approval based on its metadata:
Resolution priority (first match wins):

Return type