Skip to main content

PermissionAllowlist

Defined in the approval module.
Persistent permission allowlist for tools. Allows pre-approving tools and paths to skip interactive approval. Can be saved/loaded from JSON for persistence across sessions.

Methods

Usage

allowlist = PermissionAllowlist()
    allowlist.add_tool("read_file")
    allowlist.add_tool("write_file", paths=["./src", "./tests"])
    
    if allowlist.is_allowed("read_file"):
        # Skip approval prompt
        pass