§
    ÚŽ’já  ã                   ó>   — d Z ddlmZ ddlmZ  G d„ de¦  «        ZdS )z%Permission rule model for tool usage.é    )Ú	BaseModelé   )ÚPermissionBehaviorc                   óH   — e Zd ZU dZeed<   	 edz  ed<   	 eed<   	 eed<   dS )ÚPermissionRuleak  Permission rule for tool usage.

    A permission rule defines whether a specific tool or tool operation
    should be allowed, denied, or require user confirmation. The
    rule_content field has different semantics depending on the tool_name:

    - For "Bash": rule_content is a substring pattern matched against the
      command Example: rule_content="npm install" matches "npm install express"

    - For "Write"/"Read": rule_content is a glob pattern matched against file
      paths Example: rule_content="src/**" matches "src/main.py"

    - For other tools: rule_content is a tool-specific filter pattern
    Ú	tool_nameNÚrule_contentÚbehaviorÚsource)Ú__name__Ú
__module__Ú__qualname__Ú__doc__ÚstrÚ__annotations__r   © ó    úIC:\Projects\DSCons\.venv\Lib\site-packages\agentscope\permission\_rule.pyr   r      s]   € € € € € € ðð ð €N€N�Nðð ˜‘*ÐÐÑØBà Ð Ð Ñ Ø>à€K€K�Kðð r   r   N)r   Úpydanticr   Ú_typesr   r   r   r   r   ú<module>r      sc   ðà +Ð +Ø Ð Ð Ð Ð Ð à &Ð &Ð &Ð &Ð &Ð &ðð ð ð ð �Yñ ô ð ð ð r   