jeevesagent.security.permissions¶
Permission decisions for tool calls.
Three modes mirror the Claude Agent SDK so users don’t relearn:
DEFAULT— allow non-destructive tools, ask on destructiveACCEPT_EDITS— auto-approve filesystem writes; otherwise like defaultBYPASS— allow everything (CI / sandbox use only)
Allow- and deny-lists win over modes; deny-list wins over allow-list. The decision flow:
Tool in deny-list → deny
Allow-list set and tool not in it → deny
Mode == BYPASS → allow
Mode == ACCEPT_EDITS and call is a non-destructive edit → allow
Tool is destructive → ask
Otherwise → allow
Classes¶
Trivial permission policy: every call is allowed. |
|
Enum where members are also (and must be) strings |
|
Mode + allow/deny-list permission policy. |
Module Contents¶
- class jeevesagent.security.permissions.AllowAll[source]¶
Trivial permission policy: every call is allowed.
The default for
Agentwhen no permissions are configured.- async check(call: jeevesagent.core.types.ToolCall, *, context: collections.abc.Mapping[str, Any]) jeevesagent.core.types.PermissionDecision[source]¶
- class jeevesagent.security.permissions.Mode[source]¶
Bases:
enum.StrEnumEnum where members are also (and must be) strings
Initialize self. See help(type(self)) for accurate signature.
- ACCEPT_EDITS = 'acceptEdits'¶
- BYPASS = 'bypassPermissions'¶
- DEFAULT = 'default'¶
- class jeevesagent.security.permissions.StandardPermissions(*, mode: Mode = Mode.DEFAULT, allowed_tools: list[str] | None = None, denied_tools: list[str] | None = None)[source]¶
Mode + allow/deny-list permission policy.
- async check(call: jeevesagent.core.types.ToolCall, *, context: collections.abc.Mapping[str, Any]) jeevesagent.core.types.PermissionDecision[source]¶
- classmethod strict() StandardPermissions[source]¶
Convenience: default-mode permissions with no overrides.