Skip to main content

Crate codewhale_execpolicy

Crate codewhale_execpolicy 

Source

Re-exports§

pub use approval_mode::ApprovalMode;

Modules§

approval_mode
The user-facing approval posture (Ask / Accept Edits / Auto-Review / Full Access / Never). Lives beside AskForApproval so policy code and the TUI share one definition; the TUI adds only presentation on top.
bash_arity
Bash arity dictionary for command-prefix allow rule matching.
canonical_action
Semantic aliases for the model-facing action tools.
command_safety
Command safety analysis for shell execution
matcher
Command matching helpers for execpolicy rules.
shell_expand
Expand a shell command line into the set of commands a shell would run.
toml_rules
Execpolicy rules loaded from TOML configuration.
tool_rules

Structs§

ExecPolicyAmendment
A proposed amendment to the execution policy, suggesting new trusted prefixes.
ExecPolicyCheckOutcome
ExecPolicyContext
Input context provided to the execution policy engine for a single check.
ExecPolicyDecision
The result of evaluating a command against the execution policy.
ExecPolicyEngine
Ruleset
A named set of allow/deny prefix rules at a given priority layer.
ToolAskRule
Typed rule that controls whether a tool invocation is denied, allowed, or requires approval.

Enums§

AskForApproval
Policy mode controlling when tool invocations require human approval.
ExecApprovalRequirement
The approval requirement determined by the execution policy engine.
PermissionAction
Permission action for a tool invocation rule.
RulesetLayer
Priority layer for typed permission-rule selection. Higher ordinal = higher priority. Matching typed rules compare layer before action and specificity. Hard denied prefixes are merged across layers and checked first.
TypedAllowKind

Functions§

is_broad_allow_rule
is_broad_shell_command
normalize_workspace_relative_path
Returns a slash-separated path relative to workspace_root when value is a safe path within that workspace.
normalize_workspace_scope
Return a stable absolute workspace scope suitable for a persisted rule.