Wrap the text under TOML rule for easier readability in policy-engine.md… (#23076)

Co-authored-by: Sam Roberts <158088236+g-samroberts@users.noreply.github.com>
This commit is contained in:
CogitationOps
2026-03-21 05:00:09 +05:30
committed by GitHub
parent 3382e0413e
commit 974d29128f
+14 -9
View File
@@ -262,8 +262,8 @@ Here is a breakdown of the fields available in a TOML policy rule:
# A unique name for the tool, or an array of names. # A unique name for the tool, or an array of names.
toolName = "run_shell_command" toolName = "run_shell_command"
# (Optional) The name of a subagent. If provided, the rule only applies to tool calls # (Optional) The name of a subagent. If provided, the rule only applies to tool
# made by this specific subagent. # calls made by this specific subagent.
subagent = "generalist" subagent = "generalist"
# (Optional) The name of an MCP server. Can be combined with toolName # (Optional) The name of an MCP server. Can be combined with toolName
@@ -278,14 +278,17 @@ toolAnnotations = { readOnlyHint = true }
argsPattern = '"command":"(git|npm)' argsPattern = '"command":"(git|npm)'
# (Optional) A string or array of strings that a shell command must start with. # (Optional) A string or array of strings that a shell command must start with.
# This is syntactic sugar for `toolName = "run_shell_command"` and an `argsPattern`. # This is syntactic sugar for `toolName = "run_shell_command"` and an
# `argsPattern`.
commandPrefix = "git" commandPrefix = "git"
# (Optional) A regex to match against the entire shell command. # (Optional) A regex to match against the entire shell command.
# This is also syntactic sugar for `toolName = "run_shell_command"`. # This is also syntactic sugar for `toolName = "run_shell_command"`.
# Note: This pattern is tested against the JSON representation of the arguments (e.g., `{"command":"<your_command>"}`). # Note: This pattern is tested against the JSON representation of the arguments
# Because it prepends `"command":"`, it effectively matches from the start of the command. # (e.g., `{"command":"<your_command>"}`). Because it prepends `"command":"`,
# Anchors like `^` or `$` apply to the full JSON string, so `^` should usually be avoided here. # it effectively matches from the start of the command.
# Anchors like `^` or `$` apply to the full JSON string,
# so `^` should usually be avoided here.
# You cannot use commandPrefix and commandRegex in the same rule. # You cannot use commandPrefix and commandRegex in the same rule.
commandRegex = "git (commit|push)" commandRegex = "git (commit|push)"
@@ -295,14 +298,16 @@ decision = "ask_user"
# The priority of the rule, from 0 to 999. # The priority of the rule, from 0 to 999.
priority = 10 priority = 10
# (Optional) A custom message to display when a tool call is denied by this rule. # (Optional) A custom message to display when a tool call is denied by this
# This message is returned to the model and user, useful for explaining *why* it was denied. # rule. This message is returned to the model and user,
# useful for explaining *why* it was denied.
deny_message = "Deletion is permanent" deny_message = "Deletion is permanent"
# (Optional) An array of approval modes where this rule is active. # (Optional) An array of approval modes where this rule is active.
modes = ["autoEdit"] modes = ["autoEdit"]
# (Optional) A boolean to restrict the rule to interactive (true) or non-interactive (false) environments. # (Optional) A boolean to restrict the rule to interactive (true) or
# non-interactive (false) environments.
# If omitted, the rule applies to both. # If omitted, the rule applies to both.
interactive = true interactive = true
``` ```