-
Notifications
You must be signed in to change notification settings - Fork 3.4k
feat(execpolicy): add typed persistent permission rules #1186
Copy link
Copy link
Open
Labels
enhancementNew feature or requestNew feature or requestreliabilityReliability, flaky behavior, retries, fallbacks, and robustnessReliability, flaky behavior, retries, fallbacks, and robustnesssecuritySecurity, isolation, permissions, or trust-boundary workSecurity, isolation, permissions, or trust-boundary worktoolsTool execution, tool schemas, tool UX, and built-in tool behaviorTool execution, tool schemas, tool UX, and built-in tool behaviorv0.9.3Targeting v0.9.3Targeting v0.9.3
Milestone
Description
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestreliabilityReliability, flaky behavior, retries, fallbacks, and robustnessReliability, flaky behavior, retries, fallbacks, and robustnesssecuritySecurity, isolation, permissions, or trust-boundary workSecurity, isolation, permissions, or trust-boundary worktoolsTool execution, tool schemas, tool UX, and built-in tool behaviorTool execution, tool schemas, tool UX, and built-in tool behaviorv0.9.3Targeting v0.9.3Targeting v0.9.3
Projects
StatusShow more project fields
In progress
Summary
Add typed persistent permission rules to the execution policy/config layer.
The first version should support rules scoped by:
allow,deny, oraskThis should extend the existing
execpolicyruleset model instead of introducing a separate permission engine.Motivation
DeepSeek-TUI already has shell command approval rules through
auto_allow/ deny prefixes, layered rulesets, and bash arity-aware command matching.However, the current model is still mostly shell-command focused. Repeated tool workflows would benefit from a typed permission rule schema that can represent decisions such as:
This provides a foundation for future UI support such as “always allow this pattern” while keeping the first implementation focused on policy/config behavior.
Proposed Behavior
tooldecisioncommandpathallowdenyaskauto_allow/auto_denybehavior compatible by mapping them toexec_shellrules.askas an explicit rule that forces approval even when the broader policy would otherwise allow execution.Non-goals
Acceptance Criteria
execpolicyexposes typed permission rules.[[permissions.rules]].auto_allow/auto_denystill work.deny > ask > allowprecedence is covered by tests.Implementation Plan
#2242